2026-11-03 13:06:00 +06:00
using System ;
using Ease.Core.Model ;
using Ease.Core.DataAccess ;
using Ease.Core.Utility ;
using System.Collections.Generic ;
using HRM.BO ;
using System.Data ;
using System.Linq ;
using Payroll.BO ;
using static System . Net . Mime . MediaTypeNames ;
namespace HRM.DA
{
public class DataUploadColumnDefinationService : ServiceTemplate , IDataUploadColumnDefinition
{
#region Class variable
private List < Category > _categorys = new List < Category > ( ) ;
private List < Grade > _grades = new List < Grade > ( ) ;
private List < Department > _departments = new List < Department > ( ) ;
private List < Location > _locations = new List < Location > ( ) ;
private List < Religion > _religions = new List < Religion > ( ) ;
private List < Designation > _designations = new List < Designation > ( ) ;
private List < Bank > _banks = new List < Bank > ( ) ;
private List < Branch > _branches = new List < Branch > ( ) ;
// private List<SubCategory> _subcategorys = new List<SubCategory>();
private List < UploadErrorOrSuccess > _errorOrSuccessList ;
private List < Employee > _employees = new List < Employee > ( ) ;
private List < IncomeTax > _incomeTaxs = new List < IncomeTax > ( ) ;
private List < AccessCard > _accessCards = new List < AccessCard > ( ) ;
private List < Employee > _allEmployee = new List < Employee > ( ) ;
#endregion Class variable
private int _departmentid = 0 ;
private int _locationid = 0 ;
private int _categoryID = 0 ;
private int _religionID = 0 ;
private int _designationid = 0 ;
private int _gradeid = 0 ;
private int _branchid = 0 ;
private int _bankid = 0 ;
private int _emloyeeId = 0 ;
private int _accessCardID = 0 ;
private int _payrollTypeID = 0 ;
DepartmentService dserv = new DepartmentService ( ) ;
MiscellaneousService miserv = new MiscellaneousService ( ) ;
CategoryService cserv = new CategoryService ( ) ;
GradeService gserv = new GradeService ( ) ;
ReligionService rserv = new ReligionService ( ) ;
LocationService locserv = new LocationService ( ) ;
DesignationService degserv = new DesignationService ( ) ;
BankService bankserv = new BankService ( ) ;
BranchService branchserve = new BranchService ( ) ;
SearchEmployeeService seserv = new SearchEmployeeService ( ) ;
public int _userID ;
public DataUploadColumnDefinationService ( )
{
_errorOrSuccessList = new List < UploadErrorOrSuccess > ( ) ;
}
#region Service Implementation
public void RefreshObject ( )
{
// MiscellaneousService ms = new MiscellaneousService();
//_departments = Department.Get(_payrollTypeID);
//_departmentid = Miscellaneous.Service.GetNextID("Department", "DepartmentID", "");
_departments = dserv . Get ( EnumStatus . Regardless , this . _payrollTypeID ) ;
_departmentid = miserv . GetNextID ( "Department" , "DepartmentID" , "" ) ;
//_categorys = Category.Get(EnumStatus.Regardless);
//_categoryID = Category.GetMaxID();
// _categorys = Category.Get(EnumStatus.Regardless);
_categorys = cserv . Get ( EnumStatus . Regardless , this . _payrollTypeID ) ;
//_categoryID = Miscellaneous.Service.GetNextID("Category", "CategoryID", "");
_categoryID = miserv . GetNextID ( "Category" , "CategoryID" , "" ) ;
//_subcategorys = SubCategory.GetSubCategories(EnumStatus.Regardless);
//_subcategoryID = Miscellaneous.Service.GetNextID("SubCategory", "SubCategoryID", "");
//_subcategorys = SubCategory.Get(EnumStatus.Regardless);
//_subcategoryID = SubCategory.GetMaxID();
// _grades = Grade.Get(EnumStatus.Regardless);
_grades = gserv . Get ( EnumStatus . Regardless , this . _payrollTypeID ) ;
//_gradeid = Miscellaneous.Service.GetNextID("Grades", "GradeID", "");
_gradeid = miserv . GetNextID ( "Grades" , "GradeID" , "" ) ;
_locations = locserv . Get ( EnumStatus . Regardless , this . _payrollTypeID ) ;
//_locationid = Miscellaneous.Service.GetNextID("Location", "LocationID", "");
_locationid = miserv . GetNextID ( "Location" , "LocationID" , "" ) ;
_religions = rserv . Get ( EnumStatus . Regardless ) ;
//_/*religionID = Miscellaneous.Service.GetNextID("Religion", "ReligionID", "");*/
_religionID = miserv . GetNextID ( "Religion" , "ReligionID" , "" ) ;
_designations = degserv . Get ( EnumStatus . Regardless , this . _payrollTypeID ) ;
_designationid = miserv . GetNextID ( "Designation" , "DesignationID" , "" ) ;
//_designationid = Designation.GetMaxID();
_banks = bankserv . Get ( EnumStatus . Regardless , this . _payrollTypeID ) ;
_bankid = miserv . GetNextID ( "Banks" , "BankID" , "" ) ;
_branches = branchserve . Get ( EnumStatus . Regardless , this . _payrollTypeID ) ;
_branchid = miserv . GetNextID ( "BRANCHES" , "BranchID" , "" ) ; ;
SearchManager omanager = new SearchManager ( EnumSearchFrom . Employee ) ;
omanager . Parameter . Remove ( EnumSearchParameter . PayrollTypeID ) ;
// List<SearchEmployee> oemployees = omanager.Find();
List < SearchEmployee > oemployees = seserv . Find ( omanager ) ;
if ( oemployees . Count > 0 )
{
//_emloyeeId = oemployees.Max(x => x.EmployeeID.Integer);
_emloyeeId = oemployees . Max ( x = > x . EmployeeID ) ;
}
//_accessCards = AccessCard.Get();
//if (_accessCards.Count > 0)
//{
// _accessCardID = _accessCards.Max(x => x.ID.Integer);
//}
}
public List < UploadErrorOrSuccess > ErrorOrSuccessList
{
get { return _errorOrSuccessList ; }
}
public void ImportEmpBasicInfo ( DataTable odataTable , int payrollTypeID , int userid , EnumRegularDataUpload uploaid )
{
Employee oemployee = null ;
this . _payrollTypeID = payrollTypeID ;
this . _userID = userid ;
#region Refresh Objects
if ( ProcessBasicData ( odataTable ) = = false ) return ;
int nRow = 0 ;
bool isGrossApplicable = new SystemConfigarationService ( ) . GetconfigBooleanValue ( EnumConfigurationType . Logic , "grade" , "grossapplicable" ) ;
bool IsFinantialAprovalRequired = new SystemConfigarationService ( ) . GetconfigBooleanValue ( EnumConfigurationType . Logic , "finantialaproval" , "finantialaprovalrequired" ) ;
bool autopf = new SystemConfigarationService ( ) . GetconfigBooleanValue ( EnumConfigurationType . Logic , "confirmation" , "autopfmembership" ) ;
_allEmployee = new EmployeeService ( ) . GetAllEmps ( ) ;
try
{
foreach ( DataRow dr in odataTable . Rows )
{
// Application.DoEvents();
nRow = nRow + 1 ;
oemployee = _employees . Find ( delegate ( Employee emp ) { return emp . EmployeeNo = = dr [ "Employee No" ] . ToString ( ) ; } ) ;
if ( oemployee = = null ) throw new ServiceException ( "Employee not found in the collection; employeeNo:" + dr [ "Employee No" ] . ToString ( ) ) ;
oemployee . Name = dr [ "Employee Name" ] . ToString ( ) . Trim ( ) ;
var empExist = this . _allEmployee . FirstOrDefault ( x = > x . EmployeeNo = = oemployee . EmployeeNo ) ;
if ( empExist ! = null )
{
_errorOrSuccessList . Add ( UploadErrorOrSuccess . Create ( "Employee No" , nRow , "Employee-No is already exist in the Database" + oemployee . EmployeeNo , oemployee . EmployeeNo , oemployee . Name ) ) ;
}
oemployee . FatherName = dr [ "Father's Name" ] . ToString ( ) . Trim ( ) ;
oemployee . BirthDate = Convert . ToDateTime ( dr [ "Date of Birth" ] ) ;
oemployee . JoiningDate = Convert . ToDateTime ( dr [ "Date of Joining" ] ) ;
oemployee . LineManagerNo = dr [ "Line Manager ID" ] . ToString ( ) ! = string . Empty ? dr [ "Line Manager ID" ] . ToString ( ) : null ;
if ( oemployee . EmployeeNo = = oemployee . LineManagerNo )
throw new ServiceException ( "Invalid line manager ID, Employee can not be his ownLine-manger; employeeNo:" + dr [ "Employee No" ] . ToString ( ) ) ;
//For Novartis Discontinue Employee Upload and Fund Management Data Issue
//oemployee.Status = EnumEmployeeStatus.Discontinued;
oemployee . Gender = ( dr [ "Gender" ] . ToString ( ) . Trim ( ) = = "Male" | | dr [ "Gender" ] . ToString ( ) . Trim ( ) = = "M" | | dr [ "Gender" ] . ToString ( ) . Trim ( ) = = "MALE" ) ? EnumGender . Male : EnumGender . Female ;
oemployee . MaritalStatus = ( dr [ "Marital Status" ] . ToString ( ) . Trim ( ) . ToUpper ( ) = = "MARRIED" ) ? EnumMaritalStatus . Married : EnumMaritalStatus . UnMarried ;
//oemployee.TaxCircle = dr["Tax Circle"].ToString() != string.Empty ? (EnumTaxCircle)Enum.Parse(typeof(EnumTaxCircle), dr["Tax Circle"].ToString(), true) : EnumTaxCircle.CityCorporation;
//oemployee.TaxCircle = dr["Tax Circle"].ToString().Trim();
oemployee . TinNo = dr [ "TIN" ] . ToString ( ) . Trim ( ) ;
if ( ( uploaid = = EnumRegularDataUpload . EmployeeWithBasic | | ! IsFinantialAprovalRequired ) & & dr [ "Confirmation Date" ] . ToString ( ) . Trim ( ) ! = string . Empty )
{
oemployee . ConfirDate = Convert . ToDateTime ( dr [ "Confirmation Date" ] ) ;
oemployee . IsConfirmed = true ;
if ( autopf )
{
oemployee . PFMemberType = EnumPFMembershipType . Live ;
oemployee . PFMemberShiptDate = Convert . ToDateTime ( dr [ "Confirmation Date" ] ) ;
}
}
2026-11-25 14:24:56 +06:00
// PF Percentage column exists only when autopfmembership is on; it is needed when this row makes the employee a Live PF member
if ( autopf & & odataTable . Columns . Contains ( "PF Percentage" ) )
{
string sPFPercentage = dr [ "PF Percentage" ] . ToString ( ) . Trim ( ) ;
double pfPercentage = 0 ;
if ( sPFPercentage ! = string . Empty
& & ( ! double . TryParse ( sPFPercentage , out pfPercentage ) | | pfPercentage < = 0 | | pfPercentage > 100 ) )
{
_errorOrSuccessList . Add ( UploadErrorOrSuccess . Create ( "PF Percentage" , nRow , "PF Percentage must be greater than 0 and up to 100" , oemployee . EmployeeNo , oemployee . Name ) ) ;
}
else if ( oemployee . PFMemberType = = EnumPFMembershipType . Live )
{
if ( sPFPercentage = = string . Empty )
_errorOrSuccessList . Add ( UploadErrorOrSuccess . Create ( "PF Percentage" , nRow , "PF Percentage can't be empty when Confirmation Date is given" , oemployee . EmployeeNo , oemployee . Name ) ) ;
else
oemployee . PFPercentage = pfPercentage ;
}
}
2026-11-03 13:06:00 +06:00
//Refresh Employee Grade Salary
if ( oemployee . GradeID ! = null )
{
Grade ograde = _grades . FirstOrDefault ( x = > x . ID = = ( int ) oemployee . GradeID ) ;
// oemployee.EmployeeGradeSalary.ID = oemployee.ID;
// oemployee.EmployeeGradeSalary.SetObjectID(oemployee.ID);
oemployee . EmployeeGradeSalary = new EmployeeGradeSalary ( ) ;
oemployee . EmployeeGradeSalary . GradeID = ( int ) oemployee . GradeID ;
oemployee . EmployeeGradeSalary . GradeSalaryTypeID = ( 1 ) ;
if ( isGrossApplicable = = true ) oemployee . EmployeeGradeSalary . GrossSalary = dr [ "Gross Salary" ] . ToString ( ) ! = string . Empty ? Convert . ToDouble ( dr [ "Gross Salary" ] ) : 0.0 ;
oemployee . EmployeeGradeSalary . BasicSalary = dr [ "Basic Salary" ] . ToString ( ) ! = string . Empty ? Convert . ToDouble ( dr [ "Basic Salary" ] ) : 0.0 ;
oemployee . BasicSalary = oemployee . EmployeeGradeSalary . BasicSalary ;
oemployee . GrossSalary = oemployee . EmployeeGradeSalary . GrossSalary ;
oemployee . EmployeeGradeSalary . EffectDate = oemployee . JoiningDate ;
}
//Refresh Employee Posting
oemployee . EmployeePosting = new EmployeePosting ( ) ;
oemployee . EmployeePosting . EffectDate = oemployee . JoiningDate ;
oemployee . EmployeePosting . SetObjectID ( oemployee . ID ) ;
oemployee . EmployeePosting . DepartmentID = oemployee . DepartmentID ! = null ? ( int ) oemployee . DepartmentID : 0 ;
oemployee . EmployeePosting . LocationID = oemployee . LocationID ! = null ? ( int ) oemployee . LocationID : 0 ;
oemployee . EmployeePosting . DesignationID = oemployee . DesignationID ! = null ? ( int ) oemployee . DesignationID : 0 ;
//Refresh Emloyee Bank Account
if ( oemployee . BranchID ! = null )
{
if ( dr [ "Salary Account Number" ] . ToString ( ) ! = "" )
{
oemployee . AccountNo = dr [ "Salary Account Number" ] . ToString ( ) ;
oemployee . EmployeeBankAccount = new EmployeeBankAccount ( ) ;
// oemployee.EmployeeBankAccount.SetObjectID(oemployee.ID.Integer);
oemployee . PaymentMode = EnumPaymentMode . BankTransfer ;
oemployee . EmployeeBankAccount . EffectDate = oemployee . JoiningDate ;
oemployee . EmployeeBankAccount . BranchID = oemployee . BranchID ! = null ? ( int ) oemployee . BranchID : 0 ;
oemployee . EmployeeBankAccount . AccountType = EnumBankAccountType . SalaryAccount ;
oemployee . EmployeeBankAccount . AccountNo = dr [ "Salary Account Number" ] . ToString ( ) ;
}
else
_errorOrSuccessList . Add ( UploadErrorOrSuccess . Create ( "Salary Account Number" , nRow , "'Salary Account Number' Column not found for the employee No:" + oemployee . EmployeeNo , oemployee . EmployeeNo , oemployee . Name ) ) ;
}
if ( oemployee . OutPayBranchID ! = null )
{
if ( dr [ "OPI Account Number" ] . ToString ( ) ! = "" )
{
oemployee . OutPayAccountNo = dr [ "OPI Account Number" ] . ToString ( ) ;
// oemployee.EmployeeOPIBankAccount.SetObjectID(oemployee.ID.Integer);
oemployee . EmployeeOPIBankAccount = new EmployeeBankAccount ( ) ;
oemployee . OutPayPaymentMode = EnumPaymentMode . BankTransfer ;
oemployee . EmployeeOPIBankAccount . EffectDate = oemployee . JoiningDate ;
oemployee . EmployeeOPIBankAccount . BranchID = ( int ) oemployee . OutPayBranchID ;
oemployee . EmployeeOPIBankAccount . AccountType = EnumBankAccountType . OutPayAccount ;
oemployee . EmployeeOPIBankAccount . AccountNo = dr [ "OPI Account Number" ] . ToString ( ) ;
}
else
_errorOrSuccessList . Add ( UploadErrorOrSuccess . Create ( "OPI Account Number" , nRow , "'OPI Account Number' Column not found for the employee No:" + oemployee . EmployeeNo , oemployee . EmployeeNo , oemployee . Name ) ) ;
}
//if (dr["PROXID"].ToString() != "")
//{
// _accessCardID = _accessCardID + 1;
// oemployee.CardID = (_accessCardID);
// AccessCard ocard = new AccessCard();
// // ocard.SetObjectID(_accessCardID);
// ocard.ID = _accessCardID;
// ocard.CardNumber = dr["PROXID"].ToString();
// ocard.TypeID = (1);
// ocard.Status = EnumCardStatus.Attached;
// ocard.CardOperation.EmployeeID = oemployee.ID;
// ocard.CardOperation.CardID = ocard.ID;
// ocard.CardOperation.AssignDate = oemployee.JoiningDate;
// _accessCards.Add(ocard);
//}
oemployee . CreatedBy = userid ;
oemployee . CreatedDate = DateTime . Today ;
}
foreach ( Employee item in _employees )
{
if ( item . LineManagerNo ! = null & & item . LineManagerNo ! = string . Empty )
{
var linemanger = _employees . Find ( delegate ( Employee emp ) { return emp . EmployeeNo = = item . LineManagerNo ; } ) ;
if ( linemanger = = null )
{
var existLineManager = _allEmployee . Find ( delegate ( Employee emp ) { return emp . EmployeeNo = = item . LineManagerNo ; } ) ;
if ( existLineManager = = null )
_errorOrSuccessList . Add ( UploadErrorOrSuccess . Create ( "Line Manager ID" , nRow , "Invalid Line Manager" ) ) ;
}
}
nRow = nRow + 1 ;
}
}
catch ( Exception ex )
{
throw new ServiceException ( "Error occered on row:" + nRow + " Reason:" + ex . Message ) ;
}
#endregion
}
public void Save ( int nPayrollTypeID , int userid , EnumRegularDataUpload uploaid )
{
try
{
foreach ( Employee item in _employees )
{
item . PayrollTypeID = nPayrollTypeID ;
item . CreatedBy = userid ;
}
RegularDataUploadService rdsrv = new RegularDataUploadService ( ) ;
rdsrv . Save ( _categorys , _grades , _departments , _locations , _religions ,
_designations , _banks , _branches , _employees , _accessCards , nPayrollTypeID , uploaid ) ;
//new SystemDataUpload().SaveOrganogram(_employees, _designations);
//new SystemDataUpload().ImportPosting(_employees);
}
catch ( Exception ex )
{
throw new ServiceException ( ex . Message ) ;
}
}
public bool ProcessBasicData ( DataTable uploadTable )
{
RefreshObject ( ) ;
// ConfigurationManager ocManager = new ConfigurationManager();
SystemConfigarationService ocManager = new SystemConfigarationService ( ) ;
// List<SystemConfigaration> deptConfig = ocManager.GetChilds("department", EnumConfigurationType.Logic);
List < SystemConfigaration > deptConfig = ocManager . GetAllChildrenByParentNode ( EnumConfigurationType . Logic , "department" ) ;
List < SystemConfigaration > locConfig = ocManager . GetAllChildrenByParentNode ( EnumConfigurationType . Logic , "location" ) ;
bool isCategoryCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "category" , "codeautogenerate" ) ) ;
bool isGradeCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "grade" , "codeautogenerate" ) ) ;
bool isDeptCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "department" , "codeautogenerate" ) ) ;
bool islocCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "location" , "codeautogenerate" ) ) ;
bool isreligionCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "religion" , "codeautogenerate" ) ) ;
bool isdesignationCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "designation" , "codeautogenerate" ) ) ;
bool isbankCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "bank" , "codeautogenerate" ) ) ;
bool isbranchCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "branch" , "codeautogenerate" ) ) ;
Employee oemployee = new Employee ( ) ;
int nRow = 0 ;
int nIndex = 0 ;
int count = 0 ;
foreach ( DataRow row in uploadTable . Rows )
{
//Application.DoEvents();
_emloyeeId = _emloyeeId + 1 ;
count + + ;
oemployee = new Employee ( ) ;
oemployee . EmployeeNo = row [ "Employee No" ] . ToString ( ) ;
oemployee . SetObjectID ( _emloyeeId + 1 ) ;
object [ ] obj = row . ItemArray ;
nRow = nRow + 1 ;
//uploadStatus.Text = string.Format("Processing Basic Data... {0}/{1}", index, uploadTable.Rows.Count);
//uploadStatus.Refresh();
/// <summary>
/// Process category whether it is already in the system or new category
/// </summary>
#region Category upload
Category oCategory = null ;
if ( isCategoryCodeAutoGen = = false )
oCategory = _categorys . Find ( delegate ( Category item ) { return item . Code = = row [ "Category Code" ] . ToString ( ) ; } ) ;
else
oCategory = _categorys . Find ( delegate ( Category item ) { return item . Name = = row [ "Category Name" ] . ToString ( ) ; } ) ;
if ( oCategory = = null )
{
oCategory = new Category ( ) ;
oCategory . Name = row [ "Category Name" ] . ToString ( ) ;
oCategory . Status = EnumStatus . Active ;
if ( isCategoryCodeAutoGen = = false )
oCategory . Code = row [ "Category Code" ] . ToString ( ) ;
_categoryID = _categoryID + 1 ;
oemployee . CategoryID = ( _categoryID ) ;
oCategory . SetObjectID ( _categoryID ) ;
oCategory . WagesType = EnumWagesType . Monthly ;
oCategory . CreatedBy = _userID ;
oCategory . PayrollTypeID = this . _payrollTypeID ;
_categorys . Add ( oCategory ) ;
}
else
{
oemployee . CategoryID = oCategory . ID ;
oCategory . ModifiedBy = this . _userID ;
}
#endregion Category upload
/// <summary>
/// Process grade whether it is already in the system or new grade
/// </summary>
///
#region Grade upload
Grade ograde = null ;
if ( isGradeCodeAutoGen = = false )
ograde = _grades . Find ( delegate ( Grade item ) { return item . Code = = row [ "Grade Code" ] . ToString ( ) ; } ) ;
else
ograde = _grades . Find ( delegate ( Grade item ) { return item . Name = = row [ "Grade Name" ] . ToString ( ) ; } ) ;
if ( ograde = = null )
{
ograde = new Grade ( ) ;
ograde . Status = EnumStatus . Active ;
ograde . GradeSegmentID = ( 1 ) ;
ograde . HasPayscale = false ; //new SystemConfigarationService().GetconfigBooleanValue(EnumConfigurationType.Logic, "grade", "payscaleapplicable ");
ograde . HasGrossConcept = false ; //new SystemConfigarationService().GetconfigBooleanValue(EnumConfigurationType.Logic, "grade", "grossapplicable");
ograde . Name = row [ "Grade Name" ] . ToString ( ) . Trim ( ) ;
if ( isGradeCodeAutoGen = = false )
ograde . Code = row [ "Grade Code" ] . ToString ( ) . Trim ( ) ;
_gradeid = _gradeid + 1 ;
oemployee . GradeID = ( _gradeid ) ;
ograde . SetObjectID ( _gradeid ) ;
ograde . CreatedBy = this . _userID ;
ograde . PayrollTypeID = this . _payrollTypeID ;
_grades . Add ( ograde ) ;
if ( gserv . Get ( ograde . Code ) ! = null )
_errorOrSuccessList . Add ( UploadErrorOrSuccess . Create ( "Grade" , nRow , "Grade Code already exist in other payroll type." ) ) ;
}
else
{
oemployee . GradeID = ograde . ID ;
ograde . ModifiedBy = this . _userID ;
}
#endregion Grade upload
/// <summary>
/// Process Department whether it is already in the system or new location
/// </summary>
#region Department
int nparentid = 0 ;
nIndex = 0 ;
var dtires = deptConfig . FindAll ( x = > x . Node = = "text" ) ;
foreach ( SystemConfigaration oconfig in dtires )
{
//string sValue = oconfig.ConAttributes.GetAttributeValue("tier");
//if (sValue == "") continue;
nIndex = nIndex + 1 ;
if ( row [ oconfig . Value + " Name" ] . ToString ( ) = = "" ) continue ;
Department odepartment = null ;
if ( isDeptCodeAutoGen = = false )
{
if ( nIndex > 1 )
odepartment = _departments . Find ( delegate ( Department item ) { return item . Code = = row [ oconfig . Value + " Code" ] . ToString ( ) . Trim ( ) & & item . Tier = = nIndex & & item . ParentID = = nparentid ; } ) ;
else
odepartment = _departments . Find ( delegate ( Department item ) { return item . Code = = row [ oconfig . Value + " Code" ] . ToString ( ) . Trim ( ) & & item . Tier = = nIndex ; } ) ;
}
else
{
if ( nIndex > 1 )
odepartment = _departments . Find ( delegate ( Department item ) { return item . Name = = row [ oconfig . Value + " Name" ] . ToString ( ) . Trim ( ) & & item . Tier = = nIndex & & item . ParentID = = nparentid ; } ) ;
else
odepartment = _departments . Find ( delegate ( Department item ) { return item . Name = = row [ oconfig . Value + " Name" ] . ToString ( ) . Trim ( ) & & item . Tier = = nIndex ; } ) ;
}
if ( odepartment = = null )
{
odepartment = new Department ( ) ;
odepartment . Name = row [ oconfig . Value + " Name" ] . ToString ( ) . Trim ( ) ;
odepartment . Tier = nIndex ;
odepartment . Status = EnumStatus . Active ;
odepartment . CreatedBy = this . _userID ;
odepartment . PayrollTypeID = this . _payrollTypeID ;
if ( isDeptCodeAutoGen = = false )
{
odepartment . Code = row [ oconfig . Value + " Code" ] . ToString ( ) . Trim ( ) ;
if ( odepartment . Code = = "" )
_errorOrSuccessList . Add ( UploadErrorOrSuccess . Create ( oconfig . Value + " Code" , nRow , oconfig . Value + " Code can't be empty" ) ) ;
}
if ( nIndex > 1 ) odepartment . ParentID = ( nparentid ) ;
_departmentid = _departmentid + 1 ;
nparentid = _departmentid ;
oemployee . DepartmentID = ( _departmentid ) ;
odepartment . SetObjectID ( _departmentid ) ;
_departments . Add ( odepartment ) ;
}
else
{
nparentid = odepartment . ID ;
oemployee . DepartmentID = odepartment . ID ;
odepartment . ModifiedBy = this . _userID ;
}
}
#endregion
/// <summary>
/// Process location whether it is already in the system or new location
/// </summary>
#region Location
nparentid = 0 ;
nIndex = 0 ;
var ltires = locConfig . FindAll ( x = > x . Node = = "text" ) ;
foreach ( SystemConfigaration oconfig in ltires )
{
//string sValue = oconfig.ConAttributes.GetAttributeValue("tier");
//if (sValue == "") continue;
nIndex = nIndex + 1 ;
if ( row [ oconfig . Value + " Name" ] . ToString ( ) = = "" ) continue ;
Location olocation = null ;
if ( islocCodeAutoGen = = false )
{
if ( nIndex > 1 )
{
olocation = _locations . Find ( delegate ( Location item ) { return item . Code = = row [ oconfig . Value + " Code" ] . ToString ( ) . Trim ( ) & & item . Tier = = nIndex & & item . ParentID = = nparentid ; } ) ;
}
else
{
olocation = _locations . Find ( delegate ( Location item ) { return item . Code = = row [ oconfig . Value + " Code" ] . ToString ( ) . Trim ( ) & & item . Tier = = nIndex ; } ) ;
}
}
else
{
if ( nIndex > 1 )
{
olocation = _locations . Find ( delegate ( Location item ) { return item . Name = = row [ oconfig . Value + " Name" ] . ToString ( ) . Trim ( ) & & item . Tier = = nIndex & & item . ParentID = = nparentid ; } ) ;
}
else
{
olocation = _locations . Find ( delegate ( Location item ) { return item . Name = = row [ oconfig . Value + " Name" ] . ToString ( ) . Trim ( ) & & item . Tier = = nIndex ; } ) ;
}
}
if ( olocation = = null )
{
olocation = new Location ( ) ;
olocation . Name = row [ oconfig . Value + " Name" ] . ToString ( ) . Trim ( ) ;
olocation . Tier = nIndex ;
olocation . Status = EnumStatus . Active ;
if ( olocation . Name = = "" )
_errorOrSuccessList . Add ( UploadErrorOrSuccess . Create ( oconfig . Value + " Name" , nRow , oconfig . Value + " Name can't be empty" ) ) ;
if ( islocCodeAutoGen = = false )
{
olocation . Code = row [ oconfig . Value + " Code" ] . ToString ( ) . Trim ( ) ;
if ( olocation . Code = = "" )
_errorOrSuccessList . Add ( UploadErrorOrSuccess . Create ( oconfig . Value + " Code" , nRow , oconfig . Value + " Code can't be empty" ) ) ;
}
if ( nIndex > 1 ) olocation . ParentID = ( nparentid ) ;
_locationid = _locationid + 1 ;
nparentid = _locationid ;
oemployee . LocationID = ( _locationid ) ;
olocation . SetObjectID ( _locationid ) ;
olocation . PayrollTypeID = this . _payrollTypeID ;
olocation . CreatedBy = this . _userID ;
_locations . Add ( olocation ) ;
}
else
{
nparentid = olocation . ID ;
oemployee . LocationID = olocation . ID ;
olocation . ModifiedBy = this . _userID ;
}
}
#endregion
/// <summary>
/// Process religion whether it is already in the system or new religion
/// </summary>
#region Religion upload
Religion oreligion = null ;
if ( isreligionCodeAutoGen = = false )
oreligion = _religions . Find ( delegate ( Religion item ) { return item . Code = = row [ "Religion Code" ] . ToString ( ) . Trim ( ) ; } ) ;
else
oreligion = _religions . Find ( delegate ( Religion item ) { return item . Name = = row [ "Religion Name" ] . ToString ( ) . Trim ( ) ; } ) ;
if ( oreligion = = null )
{
oreligion = new Religion ( ) ;
oreligion . Name = row [ "Religion Name" ] . ToString ( ) . Trim ( ) ;
if ( isreligionCodeAutoGen = = false )
{
oreligion . Code = row [ "Religion Name" ] . ToString ( ) . Trim ( ) ;
}
_religionID = _religionID + 1 ;
oemployee . ReligionID = ( _religionID ) ;
oreligion . CreatedBy = this . _userID ;
oreligion . SetObjectID ( _religionID ) ;
_religions . Add ( oreligion ) ;
}
else
{
oemployee . ReligionID = oreligion . ID ;
oreligion . ModifiedBy = this . _userID ;
}
#endregion Religion upload
/// <summary>
/// Process designation whether it is already in the system or new designation
/// </summary>
#region Designation upload
Designation odesignation = null ;
if ( isdesignationCodeAutoGen = = false )
odesignation = _designations . Find ( delegate ( Designation item ) { return item . Code = = row [ "Designation Code" ] . ToString ( ) . Trim ( ) ; } ) ;
else
odesignation = _designations . Find ( delegate ( Designation item ) { return item . Name = = row [ "Designation Name" ] . ToString ( ) . Trim ( ) ; } ) ;
if ( odesignation = = null )
{
odesignation = new Designation ( ) ;
odesignation . Name = row [ "Designation Name" ] . ToString ( ) . Trim ( ) ;
if ( isdesignationCodeAutoGen = = false )
odesignation . Code = row [ "Designation Code" ] . ToString ( ) . Trim ( ) ;
_designationid = _designationid + 1 ;
oemployee . DesignationID = ( _designationid ) ;
odesignation . SetObjectID ( _designationid ) ;
odesignation . Status = EnumStatus . Active ;
odesignation . CreatedBy = this . _userID ;
odesignation . PayrollTypeID = this . _payrollTypeID ;
_designations . Add ( odesignation ) ;
}
else
{
oemployee . DesignationID = odesignation . ID ;
odesignation . ModifiedBy = this . _userID ;
}
#endregion Designation upload
#region Bank & Branch upload
if ( row [ "Salary Bank Name" ] . ToString ( ) . Trim ( ) ! = "" )
{
Bank obank = null ;
if ( isbankCodeAutoGen = = false )
{
obank = _banks . Where ( x = >
x . Code . ToUpper ( ) . Trim ( ) = = row [ "Salary Bank Code" ] . ToString ( ) . ToUpper ( ) . Trim ( ) )
. FirstOrDefault ( ) ;
}
else
{
obank = _banks . Where ( x = >
x . Name . ToUpper ( ) . Trim ( ) = = row [ "Salary Bank Name" ] . ToString ( ) . ToUpper ( ) . Trim ( ) )
. FirstOrDefault ( ) ;
}
if ( obank = = null )
{
obank = new Bank ( ) ;
obank . Name = row [ "Salary Bank Name" ] . ToString ( ) . Trim ( ) ;
if ( isbankCodeAutoGen = = false )
obank . Code = row [ "Salary Bank Code" ] . ToString ( ) . Trim ( ) ;
_bankid = _bankid + 1 ;
obank . SetObjectID ( _bankid ) ;
obank . CreatedBy = this . _userID ;
obank . PayrollTypeID = this . _payrollTypeID ;
_banks . Add ( obank ) ;
}
if ( row [ "Salary Branch Name" ] . ToString ( ) ! = "" )
{
Branch oBranch = null ;
if ( isbranchCodeAutoGen = = false )
{
oBranch = _branches . Where ( item = >
item . Code . ToUpper ( ) . Trim ( ) = = row [ "Salary Branch Code" ] . ToString ( ) . ToUpper ( ) . Trim ( )
& & item . BankID = = obank . ID )
. FirstOrDefault ( ) ;
}
else
{
oBranch = _branches . Where ( item = >
item . Name . ToUpper ( ) . Trim ( ) = = row [ "Salary Branch Name" ] . ToString ( ) . ToUpper ( ) . Trim ( )
& & item . BankID = = obank . ID )
. FirstOrDefault ( ) ;
}
if ( oBranch = = null )
{
oBranch = new Branch ( ) ;
oBranch . Name = row [ "Salary Branch Name" ] . ToString ( ) . Trim ( ) ;
if ( isbranchCodeAutoGen = = false )
oBranch . Code = row [ "Salary Branch Code" ] . ToString ( ) . Trim ( ) ;
_branchid = _branchid + 1 ;
oBranch . BankID = obank . ID ;
oBranch . SetObjectID ( _branchid ) ;
oemployee . BranchID = ( _branchid ) ;
oBranch . CreatedBy = this . _userID ;
oBranch . PayrollTypeID = this . _payrollTypeID ;
_branches . Add ( oBranch ) ;
}
else
{
oemployee . BranchID = oBranch . ID ;
oBranch . ModifiedBy = this . _userID ;
}
}
}
bool isOPISeparateAcountApplicable = false ; // ConfigurationManager.GetBoolValue("opi", "separateaccount", EnumConfigurationType.Logic);
if ( isOPISeparateAcountApplicable )
{
if ( row [ "OPI Bank Name" ] . ToString ( ) ! = "" )
{
Bank obank = null ;
if ( isbankCodeAutoGen = = false )
{
obank = _banks . Where ( x = >
x . Code . ToUpper ( ) . Trim ( ) = = row [ "OPI Bank Code" ] . ToString ( ) . ToUpper ( ) . Trim ( ) )
. FirstOrDefault ( ) ;
}
else
{
obank = _banks . Where ( x = >
x . Name . ToUpper ( ) . Trim ( ) = = row [ "OPI Bank Name" ] . ToString ( ) . ToUpper ( ) . Trim ( ) )
. FirstOrDefault ( ) ;
}
if ( obank = = null )
{
obank = new Bank ( ) ;
obank . Name = row [ "OPI Bank Name" ] . ToString ( ) . Trim ( ) ;
if ( isbankCodeAutoGen = = false )
obank . Code = row [ "OPI Bank Code" ] . ToString ( ) . Trim ( ) ;
_bankid = _bankid + 1 ;
obank . SetObjectID ( _bankid ) ;
obank . CreatedBy = this . _userID ;
_banks . Add ( obank ) ;
}
if ( row [ "OPI Branch Name" ] . ToString ( ) ! = "" )
{
Branch oBranch = null ;
if ( isbranchCodeAutoGen = = false )
{
oBranch = _branches . Where ( item = >
item . Code . ToUpper ( ) . Trim ( ) = = row [ "OPI Branch Code" ] . ToString ( ) . ToUpper ( ) . Trim ( )
& & item . BankID = = obank . ID )
. FirstOrDefault ( ) ;
}
else
{
oBranch = _branches . Where ( item = >
item . Name . ToUpper ( ) . Trim ( ) = = row [ "OPI Branch Name" ] . ToString ( ) . ToUpper ( ) . Trim ( )
& & item . BankID = = obank . ID )
. FirstOrDefault ( ) ;
}
if ( oBranch = = null )
{
oBranch = new Branch ( ) ;
oBranch . Name = row [ "OPI Branch Name" ] . ToString ( ) . Trim ( ) ;
if ( isbranchCodeAutoGen = = false )
oBranch . Code = row [ "OPI Branch Code" ] . ToString ( ) . Trim ( ) ;
_branchid = _branchid + 1 ;
oBranch . BankID = obank . ID ;
oBranch . CreatedBy = this . _userID ;
oBranch . SetObjectID ( _branchid ) ;
oemployee . OutPayBranchID = ( _branchid ) ;
_branches . Add ( oBranch ) ;
}
else
{
oemployee . OutPayBranchID = oBranch . ID ;
obank . ModifiedBy = this . _userID ;
}
}
}
}
#endregion Bank & Branch upload
_employees . Add ( oemployee ) ;
}
return true ;
}
#endregion
public DataUploadColumnDefinition getEmployeeProfileUpload ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "EmployeeProfileUpload" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Email" , "String" , "Yes" ) ;
item . Add ( "Mobile" , "String" , "Yes" ) ;
item . Add ( "Blood Group" , "String" , "Yes" ) ;
item . Add ( "National ID" , "String" , "Yes" ) ;
item . Add ( "TIN" , "String" , "Yes" ) ;
item . ItemThreeDateData = null ;
item . FormText = "Upload Employee Profile Information" ;
return item ;
}
public DataUploadColumnDefinition getTrainingEnrollment ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "TrainingEnrollment" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Name" , "String" , "Yes" ) ;
item . ItemThreeDateData = null ;
item . FormText = "Upload Employee Training Enrollment" ;
return item ;
}
public DataUploadColumnDefinition getTrainingAttendance ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "TrainingAttendance" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Name" , "String" , "Yes" ) ;
item . ItemThreeDateData = null ;
item . FormText = "Upload Employee Training Attendance" ;
return item ;
}
public DataUploadColumnDefinition getBasicInfoColumns ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
SystemConfigarationService ocManager = new SystemConfigarationService ( ) ;
List < SystemConfigaration > deptConfig = ocManager . GetAllChildrenByParentNode ( EnumConfigurationType . Logic , "department" ) ;
List < SystemConfigaration > locConfig = ocManager . GetAllChildrenByParentNode ( EnumConfigurationType . Logic , "location" ) ;
bool isCategoryCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "category" , "codeautogenerate" ) ) ;
bool isGradeCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "grade" , "codeautogenerate" ) ) ;
bool isDeptCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "department" , "codeautogenerate" ) ) ;
bool islocCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "location" , "codeautogenerate" ) ) ;
bool isreligionCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "religion" , "codeautogenerate" ) ) ;
bool isdesignationCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "designation" , "codeautogenerate" ) ) ;
bool isbankCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "bank" , "codeautogenerate" ) ) ;
bool isbranchCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "branch" , "codeautogenerate" ) ) ;
bool isGrossApplicable = ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "grade" , "grossapplicable" ) ;
2026-11-25 14:24:56 +06:00
bool autopf = ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "confirmation" , "autopfmembership" ) ;
2026-11-03 13:06:00 +06:00
item . SheetName = "EmpBasicInformation" ;
item . Add ( "Employee No" , "String" , "No" ) ; //3
//item.Add("PROXID", "String", "Yes"); //2
item . Add ( "Employee Name" , "String" , "No" ) ; //4
item . Add ( "Father's Name" , "String" , "Yes" ) ; //5
item . Add ( "Date of Birth" , "Date" , "No" ) ; //6
item . Add ( "Date of Joining" , "Date" , "No" ) ; //7
if ( isCategoryCodeAutoGen = = false )
item . Add ( "Category Code" , "String" , "No" ) ; //14
item . Add ( "Category Name" , "String" , "No" ) ; //15
//CodeautoGenerate = ConfigurationManager.GetBoolValue("subcategory", "codeautogenerate", EnumConfigurationType.Logic);
//if (CodeautoGenerate == false)
// item.Add("Sub Category Code", "String", "No"); //14
//item.Add("Sub Category Name", "String", "Yes"); //15
item . Add ( "Gender" , "String" , "No" ) ; //9
if ( isreligionCodeAutoGen = = false )
item . Add ( "Religion Code" , "String" , "No" ) ; //14
item . Add ( "Religion Name" , "String" , "No" ) ; //15
item . Add ( "Marital Status" , "String" , "No" ) ; //11
item . Add ( "Tax Circle" , "String" , "Yes" ) ; //12
item . Add ( "TIN" , "String" , "Yes" ) ; //13
if ( isGradeCodeAutoGen = = false )
item . Add ( "Grade Code" , "String" , "No" ) ; //14
item . Add ( "Grade Name" , "String" , "Yes" ) ; //15
//CodeautoGenerate = ConfigurationManager.GetBoolValue("grade", "payscaleapplicable", EnumConfigurationType.Logic);
//if (CodeautoGenerate == true)
// item.Add("PayScaleID", "String", "Yes"); //15
item . Add ( "Confirmation Date" , "Date" , "Yes" ) ; //17
2026-11-25 14:24:56 +06:00
// auto PF membership on confirmation: the employee's own PF % (Employee.PFPercentage)
if ( autopf = = true )
item . Add ( "PF Percentage" , "Double" , "Yes" ) ;
2026-11-03 13:06:00 +06:00
item . Add ( "Basic Salary" , "Double" , "No" ) ; //16
if ( isGrossApplicable = = true )
item . Add ( "Gross Salary" , "Double" , "No" ) ; //15
var dtires = deptConfig . FindAll ( x = > x . Node = = "text" ) ;
#region Department
int nIndex = 0 ;
foreach ( SystemConfigaration oconfig in dtires )
{
nIndex = nIndex + 1 ;
if ( isDeptCodeAutoGen = = false )
item . Add ( oconfig . Value + " Code" , "String" , ( nIndex = = 1 ) ? "No" : "Yes" ) ; //16
item . Add ( oconfig . Value + " Name" , "String" , ( nIndex = = 1 ) ? "No" : "Yes" ) ; //16
}
#endregion
//item.Add("Unit Name", "String", "Yes");
//List<Configaration> locConfig = ocManager.GetChilds("location", EnumConfigurationType.Logic);
//List<Configaration> locTiers = ocManager.GetChilds(locConfig, "tiernames");
var ltires = locConfig . FindAll ( x = > x . Node = = "text" ) ;
#region Location
nIndex = 0 ;
foreach ( SystemConfigaration oconfig in ltires )
{
string sValue = oconfig . ConAttributes . GetAttributeValue ( "tier" ) ;
if ( sValue = = "" ) continue ;
nIndex = nIndex + 1 ;
//if (string.Equals(oconfig?.Value, "Job Location", StringComparison.OrdinalIgnoreCase))
//{
// nIndex = 2;
//}
if ( islocCodeAutoGen = = false )
item . Add ( oconfig . Value + " Code" , "String" , "No" ) ; //16
item . Add ( oconfig . Value + " Name" , "String" , "No" ) ; //16
}
#endregion
if ( isdesignationCodeAutoGen = = false )
item . Add ( "Designation Code" , "String" , "No" ) ;
item . Add ( "Designation Name" , "String" , "No" ) ; //21 con
//item.Add("PF Membership", "String", "Yes"); //22
//item.Add("Is Foreign Expatriate", "String", "Yes"); //23
if ( isbankCodeAutoGen = = false )
{
item . Add ( "Salary Bank Code" , "String" , "Yes" ) ;
}
item . Add ( "Salary Bank Name" , "String" , "Yes" ) ; //24
if ( isbranchCodeAutoGen = = false )
{
item . Add ( "Salary Branch Code" , "String" , "Yes" ) ;
}
item . Add ( "Salary Branch Name" , "String" , "Yes" ) ; //25
item . Add ( "Salary Account Number" , "String" , "Yes" ) ; //26
//item.Add("OPI Bank Name", "String", "Yes"); //27
//item.Add("OPI Branch Name", "String", "Yes"); //28
//item.Add("OPI Account Number", "String", "Yes"); //29
//item.Add("Access Card ID", "String", "Yes"); //30
//item.Add("Shift", "String", "Yes"); //31
item . Add ( "Line Manager ID" , "String" , "Yes" ) ; //32
return item ;
}
public DataUploadColumnDefinition lifecycleColumns ( int statusid )
{
EmployeeStatus ostatus = new EmployeeStatusService ( ) . Get ( statusid ) ;
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
SystemConfigarationService ocManager = new SystemConfigarationService ( ) ;
List < SystemConfigaration > deptConfig = ocManager . GetAllChildrenByParentNode ( EnumConfigurationType . Logic , "department" ) ;
List < SystemConfigaration > locConfig = ocManager . GetAllChildrenByParentNode ( EnumConfigurationType . Logic , "location" ) ;
List < SystemConfigaration > costcenters = ocManager . GetAllChildrenByParentNode ( EnumConfigurationType . Logic , "costcenter" ) ;
bool isCategoryCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "category" , "codeautogenerate" ) ) ;
bool isGradeCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "grade" , "codeautogenerate" ) ) ;
bool isDeptCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "department" , "codeautogenerate" ) ) ;
bool islocCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "location" , "codeautogenerate" ) ) ;
bool isreligionCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "religion" , "codeautogenerate" ) ) ;
bool isdesignationCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "designation" , "codeautogenerate" ) ) ;
bool isbankCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "bank" , "codeautogenerate" ) ) ;
bool isbranchCodeAutoGen = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "branch" , "codeautogenerate" ) ) ;
bool isGrossApplicable = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "grade" , "grossapplicable" ) ) ;
bool IscostCentersCodeAuto = Convert . ToBoolean ( ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "costcenter" , "codeautogenerate" ) ) ;
int nIndex = 0 ;
item . SheetName = ostatus . Description ;
item . Add ( "Employee No" , "String" , "No" ) ; //3
item . Add ( "EffectDate" , "Date" , "No" ) ; //3
foreach ( EmployeeStatus . EmpStatusComponent com in ostatus . EmployeeStatusComponents )
{
switch ( com . ComponentType )
{
case EnumLifeCycleComponent . Category :
item . Add ( "Category Code" , "String" , "No" ) ; //15
break ;
case EnumLifeCycleComponent . Department :
var dtires = deptConfig . FindAll ( x = > x . Node = = "text" ) ;
#region Department
nIndex = 0 ;
foreach ( SystemConfigaration oconfig in dtires )
{
nIndex = nIndex + 1 ;
if ( isDeptCodeAutoGen = = false )
item . Add ( oconfig . Value + " Code" , "String" , ( nIndex = = 1 ) ? "No" : "Yes" ) ; //16
item . Add ( oconfig . Value + " Name" , "String" , ( nIndex = = 1 ) ? "No" : "Yes" ) ; //16
}
#endregion
break ;
case EnumLifeCycleComponent . Position_With_Properties :
break ;
case EnumLifeCycleComponent . Designation :
if ( isdesignationCodeAutoGen = = false )
item . Add ( "Designation Code" , "String" , "No" ) ;
item . Add ( "Designation Name" , "String" , "No" ) ; //21 con
break ;
case EnumLifeCycleComponent . Grade :
if ( isGradeCodeAutoGen = = false )
item . Add ( "Grade Code" , "String" , "No" ) ; //14
item . Add ( "Grade Name" , "String" , "No" ) ;
break ;
case EnumLifeCycleComponent . Location :
nIndex = 0 ;
var ltires = locConfig . FindAll ( x = > x . Node = = "text" ) ;
foreach ( SystemConfigaration oconfig in ltires )
{
string sValue = oconfig . ConAttributes . GetAttributeValue ( "tier" ) ;
if ( sValue = = "" ) continue ;
nIndex = nIndex + 1 ;
if ( islocCodeAutoGen = = false )
item . Add ( oconfig . Value + " Code" , "String" , ( nIndex = = 1 ) ? "No" : "Yes" ) ; //16
item . Add ( oconfig . Value + " Name" , "String" , ( nIndex = = 1 ) ? "No" : "Yes" ) ; //16
}
break ;
case EnumLifeCycleComponent . Basic_salary :
item . Add ( "Basic Salary" , "Double" , "No" ) ;
break ;
case EnumLifeCycleComponent . PF_Member :
break ;
case EnumLifeCycleComponent . Continue :
break ;
case EnumLifeCycleComponent . Confirm :
break ;
case EnumLifeCycleComponent . Discontinue :
break ;
case EnumLifeCycleComponent . Function :
break ;
case EnumLifeCycleComponent . Company :
break ;
case EnumLifeCycleComponent . Gross_salary :
item . Add ( "Gross Salary" , "Double" , "No" ) ; //15
break ;
case EnumLifeCycleComponent . Cost_Center :
nIndex = 0 ;
var cts = costcenters . FindAll ( x = > x . Node = = "text" ) ;
foreach ( SystemConfigaration oconfig in cts )
{
string sValue = oconfig . ConAttributes . GetAttributeValue ( "tier" ) ;
if ( sValue = = "" ) continue ;
nIndex = nIndex + 1 ;
if ( IscostCentersCodeAuto = = false )
item . Add ( oconfig . Value + " Code" , "String" , ( nIndex = = 1 ) ? "No" : "Yes" ) ; //16
item . Add ( oconfig . Value + " Name" , "String" , ( nIndex = = 1 ) ? "No" : "Yes" ) ; //16
// item.Add(oconfig.Value + " Code", "String", (nIndex == 1) ? "No" : "Yes"); //16
}
break ;
case EnumLifeCycleComponent . Position_Without_Properties :
break ;
case EnumLifeCycleComponent . Force_Remove_From_Position :
break ;
case EnumLifeCycleComponent . Role :
break ;
case EnumLifeCycleComponent . IA :
break ;
default :
break ;
}
}
2026-11-25 14:24:56 +06:00
// PF membership needs the employee's own PF % (Employee.PFPercentage): the event makes the employee a
// Live PF member either through its PF_Member component, or through Confirm when autopfmembership is on
bool autopf = ocManager . GetconfigBooleanValue ( EnumConfigurationType . Logic , "confirmation" , "autopfmembership" ) ;
bool hasPFMember = ostatus . EmployeeStatusComponents . Exists ( x = > x . ComponentType = = EnumLifeCycleComponent . PF_Member ) ;
bool hasConfirm = ostatus . EmployeeStatusComponents . Exists ( x = > x . ComponentType = = EnumLifeCycleComponent . Confirm ) ;
if ( hasPFMember | | ( hasConfirm & & autopf ) )
item . Add ( "PF Percentage" , "Double" , "No" ) ;
2026-11-03 13:06:00 +06:00
return item ;
}
#region Functions
#region Column Definition for Tax Data
public DataUploadColumnDefinition TaxData ( )
{
PayrollType pType = new PayrollTypeService ( ) . Get ( this . _payrollTypeID ) ;
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
List < TaxMergeMaster > taxmasters = new TaxMergeMasterService ( ) . GetbyTaxParameter ( ( int ) pType . TaxParamID , this . _payrollTypeID ) ;
item . Add ( "Employee Code" , "String" , "No" ) ; //1
foreach ( TaxMergeMaster tx in taxmasters )
{
if ( tx . ItemGroup = = EnumIncomeTaxItemGroup . Basic_Salary | |
tx . ItemGroup = = EnumIncomeTaxItemGroup . Bonus | |
tx . ItemGroup = = EnumIncomeTaxItemGroup . House_Rent_Allowance | |
tx . ItemGroup = = EnumIncomeTaxItemGroup . Company_Contri_PF | |
tx . ItemGroup = = EnumIncomeTaxItemGroup . Other_Allowance | |
tx . ItemGroup = = EnumIncomeTaxItemGroup . Conveyance_Allowance | |
tx . ItemGroup = = EnumIncomeTaxItemGroup . Bonus | |
tx . ItemGroup = = EnumIncomeTaxItemGroup . LFA_Allowance | |
tx . ItemGroup = = EnumIncomeTaxItemGroup . Medical_Allowance | |
tx . ItemGroup = = EnumIncomeTaxItemGroup . TimeCard | |
tx . ItemGroup = = EnumIncomeTaxItemGroup . Cmp_Provided_car )
{
item . Add ( tx . Description , "Double" , "Yes" ) ; //2....
}
}
item . Add ( "Tax Deducted" , "Double" , "Yes" ) ; //Last Column
return item ;
}
#endregion
#region Column Definition For LTA Data
public DataUploadColumnDefinition LTAdata ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "LTAData" ;
item . Add ( "ProcessID" , "String" , "No" ) ;
item . Add ( "EmpCode" , "String" , "No" ) ; //3
item . Add ( "ItemType" , "String" , "Yes" ) ; //2
item . Add ( "ItemID" , "String" , "No" ) ; //4
item . Add ( "Description" , "String" , "Yes" ) ; //5
item . Add ( "Month" , "Date" , "No" ) ; //6
item . Add ( "Amount" , "Double" , "No" ) ; //7
return item ;
}
#endregion
#region Column Definition For EmpWorkPlanSetup Data
//public DataUploadColumnDefinition EmpWorkPlanSetup()
//{
// DataUploadColumnDefinition item = new DataUploadColumnDefinition();
// item.SheetName = "EmpWorkPlanSetup";
// Add("Employee No", "String", "No");
// Add("WorkPlanGroup", "String", "No");
// Add("StartDate", "Date", "No");
// Add("Start Shift", "String", "Yes");
// return item;
//}
#endregion
#region Column Definition For Employee Basic Information
//public DataUploadColumnDefinition EmpBasicInfo()
//{
// bool CodeautoGenerate = false;
// ConfigurationManager ocManager = new ConfigurationManager();
// List<Configaration> deptConfig = ocManager.GetChilds("department", EnumConfigurationType.Logic);
// List<Configaration> deptTiers = ocManager.GetChilds(deptConfig, "tiernames");
// this.SheetName = "EmpBasicInformation";
// Add("Employee No", "String", "No"); //3
// Add("PROXID", "String", "Yes"); //2
// Add("Employee Name", "String", "No"); //4
// Add("Father's Name", "String", "Yes"); //5
// Add("Date of Birth", "Date", "No"); //6
// Add("Date of Joining", "Date", "No"); //7
// CodeautoGenerate = ConfigurationManager.GetBoolValue("category", "codeautogenerate", EnumConfigurationType.Logic);
// if (CodeautoGenerate == false)
// Add("Category Code", "String", "No"); //14
// Add("Category Name", "String", "No"); //15
// Add("Gender", "String", "No"); //9
// CodeautoGenerate = ConfigurationManager.GetBoolValue("religion", "codeautogenerate", EnumConfigurationType.Logic);
// if (CodeautoGenerate == false)
// Add("Relegion Code", "String", "No"); //14
// Add("Religion Name", "String", "No"); //15
// Add("Marital Status", "String", "No"); //11
// Add("Tax Circle", "String", "Yes"); //12
// Add("TIN", "String", "Yes"); //13
// CodeautoGenerate = ConfigurationManager.GetBoolValue("grade", "codeautogenerate", EnumConfigurationType.Logic);
// if (CodeautoGenerate == false)
// Add("Grade Code", "String", "No"); //14
// Add("Grade Name", "String", "No"); //15
// CodeautoGenerate = ConfigurationManager.GetBoolValue("grade", "grossapplicable", EnumConfigurationType.Logic);
// if (CodeautoGenerate == true)
// Add("Gross Salary", "Double", "No"); //15
// CodeautoGenerate = ConfigurationManager.GetBoolValue("grade", "payscaleapplicable", EnumConfigurationType.Logic);
// if (CodeautoGenerate == true)
// Add("PayScaleID", "String", "Yes"); //15
// Add("Basic Salary", "Double", "No"); //16
// Add("Confirmation Date", "Date", "Yes"); //17
// #region Department
// int nIndex = 0;
// foreach (Configaration oconfig in deptTiers)
// {
// string sValue = oconfig.ConAttributes.GetAttributeValue("tier");
// if (sValue == "") continue;
// nIndex = nIndex + 1;
// CodeautoGenerate = ConfigurationManager.GetBoolValue("department", "codeautogenerate", EnumConfigurationType.Logic);
// if (CodeautoGenerate == false)
// Add(oconfig.Value + " Code", "String", (nIndex == 1) ? "No" : "Yes"); //16
// Add(oconfig.Value + " Name", "String", (nIndex == 1) ? "No" : "Yes"); //16
// }
// #endregion
// Add("Unit Name", "String", "Yes");
// List<Configaration> locConfig = ocManager.GetChilds("location", EnumConfigurationType.Logic);
// List<Configaration> locTiers = ocManager.GetChilds(locConfig, "tiernames");
// #region Location
// nIndex = 0;
// foreach (Configaration oconfig in locConfig)
// {
// string sValue = oconfig.ConAttributes.GetAttributeValue("tier");
// if (sValue == "") continue;
// nIndex = nIndex + 1;
// CodeautoGenerate = ConfigurationManager.GetBoolValue("location", "codeautogenerate", EnumConfigurationType.Logic);
// if (CodeautoGenerate == false)
// Add(oconfig.Value + " Code", "String", (nIndex == 1) ? "No" : "Yes"); //16
// Add(oconfig.Value + " Name", "String", (nIndex == 1) ? "No" : "Yes"); //16
// }
// #endregion
// CodeautoGenerate = false;
// CodeautoGenerate = ConfigurationManager.GetBoolValue("designation", "codeautogenerate", EnumConfigurationType.Logic);
// if (CodeautoGenerate == false)
// Add("Designation Code", "String", "No");
// Add("Designation Name", "String", "No"); //21 con
// Add("PF Membership", "String", "Yes"); //22
// //Add("Is Foreign Expatriate", "String", "Yes"); //23
// Add("Salary Bank Name", "String", "Yes"); //24
// bool branchCodeAutoGenerate = ConfigurationManager.GetBoolValue("branch", "codeautogenerate", EnumConfigurationType.Logic);
// if (!branchCodeAutoGenerate)
// {
// Add("Salary Branch Code", "String", "Yes");
// }
// Add("Salary Branch Name", "String", "Yes"); //25
// Add("Salary Account Number", "String", "Yes"); //26
// Add("OPI Bank Name", "String", "Yes"); //27
// Add("OPI Branch Name", "String", "Yes"); //28
// Add("OPI Account Number", "String", "Yes"); //29
// Add("Access Card ID", "String", "Yes"); //30
// Add("Shift", "String", "Yes"); //31
// //Add("Line Manager ID", "String", "Yes"); //32
// return this;
//}
//#endregion
//public DataUploadColumnDefinition EmpDeptInfo()
//{
// bool CodeautoGenerate = false;
// ConfigurationManager ocManager = new ConfigurationManager();
// List<Configaration> deptConfig = ocManager.GetChilds("department", EnumConfigurationType.Logic);
// List<Configaration> deptTiers = ocManager.GetChilds(deptConfig, "tiernames");
// this.SheetName = "EmpDeptInformation";
// Add("Employee No", "String", "No"); //3
// Add("Employee Name", "String", "No"); //4
// #region Department
// int nIndex = 0;
// foreach (Configaration oconfig in deptTiers)
// {
// string sValue = oconfig.ConAttributes.GetAttributeValue("tier");
// if (sValue == "") continue;
// nIndex = nIndex + 1;
// CodeautoGenerate = ConfigurationManager.GetBoolValue("department", "codeautogenerate", EnumConfigurationType.Logic);
// if (CodeautoGenerate == false)
// Add(oconfig.Value + " Code", "String", (nIndex == 1) ? "No" : "Yes"); //16
// Add(oconfig.Value + " Name", "String", (nIndex == 1) ? "No" : "Yes"); //16
// }
// #endregion
// return this;
//}
#region Column Definition For Employee Basic Information
#endregion
#region Column Definition For Employee Grade Salary
//public DataUploadColumnDefinition EmpGradeSalary()
//{
// bool CodeautoGenerate = false;
// this.SheetName = "EmpGradeSalary";
// Add("Employee No", "String", "No"); //01
// Add("Basic", "Double", "Yes"); //02
// Add("Effect Date", "Date", "No"); //03
// Add("Grade", "String", "No"); //04
// if (User.CurrentUser.LogInPayrollTypeID != 1)
// {
// Add("IncrementNo", "Double", "No");
// }
// CodeautoGenerate = ConfigurationManager.GetBoolValue("grade", "grossapplicable", EnumConfigurationType.Logic);
// if (CodeautoGenerate == true)
// Add("Gross", "Double", "Yes");
// List<GradeSalaryChangeType> gstypes = new List<GradeSalaryChangeType>();
// gstypes = GradeSalaryChangeType.Get();
// ItemOneComboData = new Dictionary<ID, string>();
// foreach (GradeSalaryChangeType item in gstypes)
// {
// ItemOneComboData.Add(item.ID, item.Name);
// }
// this.ItemOneComboText = "Salary Type :";
// this.ItemThreeDateData = null;
// this.FormText = "Upload Employee Grade Salary Assignment";
// return this;
//}
#endregion
#region Column Definition For Loan
//public DataUploadColumnDefinition LoanInformation()
//{
// this.SheetName = "EmpLoanInformation";
// Add("EmployeeNo", "String", "No");
// Add("Loan Number", "String", "No");
// Add("LoanType", "String", "No");
// Add("Loan Amount", "String", "No");
// Add("Interest", "String", "No");
// Add("Schedule", "String", "No");
// Add("Disburse from Month", "String", "No");
// this.ItemThreeDateData = null;
// this.FormText = "Upload Loan Information";
// return this;
//}
#endregion
#region Column Definition For Loan
//public DataUploadColumnDefinition SetupLoanInformation()
//{
// this.SheetName = "SetupEmpLoanInformation";
// Add("EmployeeNo", "String", "No");
// Add("LoanType", "String", "No");
// Add("Principal", "Double", "No");
// Add("Interest", "Double", "No");
// Add("Month", "Date", "No");
// this.ItemThreeDateData = null;
// this.FormText = "Setup Loan Information";
// return this;
//}
#endregion
#region IncomeTaxSalaryData
public DataUploadColumnDefinition SetupSalaryComponent ( )
{
PayrollType pType = new PayrollTypeService ( ) . Get ( this . _payrollTypeID ) ;
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
List < TaxMergeMaster > taxmasters = new TaxMergeMasterService ( ) . GetbyTaxParameter ( ( int ) pType . TaxParamID , this . _payrollTypeID ) ;
item . Add ( "EmployeeNo" , "String" , "No" ) ;
item . Add ( "Amount" , "Double" , "No" ) ;
item . Add ( "ItemCode" , "Double" , "No" ) ;
item . Add ( "ItemGroup" , "Double" , "No" ) ;
item . Add ( "ItemID" , "Double" , "No" ) ;
return item ;
}
#endregion
#region Column Definition For Individual Allowance
public DataUploadColumnDefinition IndividualAllowance ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "EmpAllowance" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "From Date" , "Date" , "No" ) ;
item . Add ( "Till Date" , "Date" , "Yes" ) ;
item . Add ( "Amount" , "Double" , "No" ) ;
List < AllowanceDeduction > types = new List < AllowanceDeduction > ( ) ;
//types = AllowanceDeduction.Get(EnumStatus.Active, EnumAllowOrDeduct.Allowance, EnumPeriodicity.OneOff);
types = types = new AllowanceDeductionService ( ) . Get ( payrollTypeID , EnumStatus . Active , EnumAllowOrDeduct . Allowance , EnumPeriodicity . OneOff ) ;
Dictionary < int , string > ItemOneComboData = new Dictionary < int , string > ( ) ;
foreach ( AllowanceDeduction ADitem in types )
{
ItemOneComboData . Add ( ADitem . ID , ADitem . Name ) ;
}
item . ItemOneComboText = "Allowance Type :" ;
item . ItemThreeDateData = null ;
item . FormText = "Upload Individual Allowance" ;
return item ;
}
//public DataUploadColumnDefinition ExceptionAllowance()
//{
// this.SheetName = "EmpAllowance";
// Add("Employee No", "String", "No");
// Add("From Date", "Date", "Yes");
// Add("Till Date", "Date", "Yes");
// Add("Amount", "Double", "Yes");
// List<AllowanceDeduction> types = new List<AllowanceDeduction>();
// //types = AllowanceDeduction.Get(EnumStatus.Active, EnumAllowOrDeduct.Allowance, EnumPeriodicity.OneOff);
// types = AllowanceDeduction.GetException(EnumStatus.Active, EnumAllowOrDeduct.Allowance);
// ItemOneComboData = new Dictionary<ID, string>();
// foreach (AllowanceDeduction item in types)
// {
// ItemOneComboData.Add(item.ID, item.Name);
// }
// this.ItemOneComboText = "Allowance Type :";
// this.ItemThreeDateData = null;
// this.FormText = "Upload Exception Allowance";
// return this;
//}
//public DataUploadColumnDefinition NotApplicableAllowance()
//{
// this.SheetName = "EmpAllowance";
// Add("Employee No", "String", "No");
// List<AllowanceDeduction> types = new List<AllowanceDeduction>();
// //types = AllowanceDeduction.Get(EnumStatus.Active, EnumAllowOrDeduct.Allowance, EnumPeriodicity.OneOff);
// types = AllowanceDeduction.GetException(EnumStatus.Active, EnumAllowOrDeduct.Allowance);
// ItemOneComboData = new Dictionary<ID, string>();
// foreach (AllowanceDeduction item in types)
// {
// ItemOneComboData.Add(item.ID, item.Name);
// }
// this.ItemOneComboText = "Allowance Type :";
// this.ItemThreeDateData = null;
// this.FormText = "Upload Not Applicable Allowance";
// return this;
//}
//#endregion
#region Column Definition For Individual Deduction
public DataUploadColumnDefinition IndividualDeduction ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "EmpDeduction" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "From Date" , "Date" , "No" ) ;
item . Add ( "Till Date" , "Date" , "Yes" ) ;
item . Add ( "Amount" , "Double" , "No" ) ;
List < AllowanceDeduction > types = new List < AllowanceDeduction > ( ) ;
types = new AllowanceDeductionService ( ) . Get ( payrollTypeID , EnumStatus . Active , EnumAllowOrDeduct . Deduction , EnumPeriodicity . OneOff ) ;
Dictionary < int , string > ItemOneComboData = new Dictionary < int , string > ( ) ;
foreach ( AllowanceDeduction ADitem in types )
{
ItemOneComboData . Add ( ADitem . ID , ADitem . Name ) ;
}
item . ItemOneComboText = "Deduction Type :" ;
item . ItemThreeDateData = null ;
item . FormText = "Upload Individual Deduction" ;
return item ;
}
#endregion
#region Column Definition For Employee Bank Account
public DataUploadColumnDefinition EmpBankAccount ( int payrolltypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "EmpBankAccount" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Bank Name" , "String" , "No" ) ;
item . Add ( "Branch Name" , "String" , "No" ) ;
item . Add ( "Account No" , "String" , "No" ) ;
item . ItemThreeDateData = null ;
item . FormText = "Upload Employee Bank Account Information" ;
return item ;
}
#endregion
#region Column Definition For Bonus
public DataUploadColumnDefinition BonusData ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "EmpBonus" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Amount" , "String" , "No" ) ;
item . ItemOneComboText = "Bonus:" ;
item . FormText = "Upload Bonus Data" ;
return item ;
}
//public DataUploadColumnDefinition OrganogramData()
//{
// this.SheetName = "Organogram";
// Add("Employee No", "String", "No");
// Add("Line Manager No", "String", "Yes");
// Add("Designation", "String", "Yes");
// this.ItemOneComboText = "Type :";
// this.ItemThreeDateData = null;
// this.FormText = "Upload Organogram Data";
// return this;
//}
//private DataUploadColumnDefinition OrganogramDataInfo()
//{
// this.SheetName = "Organogram";
// Add("Position No", "String", "No");
// Add("Parent Position No", "String", "Yes");
// Add("Designation", "String", "Yes");
// this.ItemOneComboText = "Type :";
// this.ItemThreeDateData = null;
// this.FormText = "Upload Organogram Data";
// return this;
//}
#endregion
#region HR Column Definition
#region Column Definition For EmpGeneral Data
//public DataUploadColumnDefinition HREmpGeneralInfo()
//{
// this.SheetCollection.Add("General");
// Add("GDDB ID", "String", "Yes");
// // Add("Nick Name", "String", "Yes");
// Add("First Name", "String", "No");
// Add("Middle Name", "String", "Yes");
// Add("Last Name", "String", "No");
// Add("Gender", "String", "No");
// Add("Religion", "String", "No");
// Add("Blood Group", "String", "No");
// Add("Marital Status", "String", "No");
// Add("Passport No", "String", "Yes");
// Add("Tax Identification No", "String", "Yes");
// Add("Nationality", "String", "No");
// Add("National ID", "String", "Yes");
// Add("Joining Date", "Date", "No");
// Add("Date of Birth", "Date", "No");
// Add("Category", "String", "No");
// Add("Father's Name", "String", "No");
// Add("Mother's Name", "String", "No");
// Add("Father's Occupation", "String", "No");
// Add("Mother's Occupation", "String", "No");
// Add("Place Of Birth", "String", "Yes");
// this.SheetName = "General";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//public DataUploadColumnDefinition HRAllEmpGeneralInfoIDLC()
//{
// this.SheetCollection.Add("General");
// Add("EmployeeID", "String", "Yes");
// Add("GEID", "String", "Yes");
// Add("First Name", "String", "No");
// Add("Middle Name", "String", "Yes");
// Add("Last Name", "String", "No");
// Add("Gender", "String", "No");
// Add("Religion", "String", "No");
// Add("Blood Group", "String", "No");
// //Add("Marital Status", "String", "No");
// Add("Passport No", "String", "Yes");
// Add("Passport Issue Place", "String", "Yes");
// Add("Passport Issue Date", "Date", "Yes");
// Add("Passport Expire Date", "Date", "Yes");
// Add("Tax Identification No", "String", "Yes");
// Add("Nationality", "String", "No");
// Add("National ID", "String", "Yes");
// Add("Joining Date", "Date", "No");
// Add("Birth Date", "Date", "No");
// Add("Place Of Birth", "String", "Yes");
// Add("Category", "String", "No");
// Add("Driving Licence No", "String", "Yes");
// Add("Father's Name", "String", "No");
// Add("Mother's Name", "String", "No");
// Add("Father's Occupation", "String", "No");
// Add("Mother's Occupation", "String", "No");
// //Contact Information
// Add("Permanent Address", "String", "No");
// Add("Permanent District", "String", "No");
// Add("Permanent Thana", "String", "No");
// Add("Permanent Telephone No", "String", "Yes");
// Add("PerMobile No", "String", "Yes");
// Add("Present Address", "String", "No");
// Add("Present District", "String", "No");
// Add("Present Thana", "String", "No");
// Add("Present Telephone No", "String", "Yes");
// Add("PreMobile No", "String", "Yes");
// Add("Emergency Contact Person", "String", "No");
// Add("Emergency Contact Address", "String", "No");
// Add("Emergency Telephone No", "String", "No");
// Add("EmeMobile No", "String", "Yes");
// Add("Relation", "String", "No");
// Add("Personal Land Phone No", "String", "Yes");
// Add("Personal Mobile No", "String", "Yes");
// Add("Personal E-Mail", "String", "Yes");
// Add("Official E-Mail", "String", "Yes");
// Add("Fax", "String", "Yes");
// //Add("Offical Mobile No", "String", "No");
// this.SheetName = "General";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpContact Data
//public DataUploadColumnDefinition HREmpContactInfo()
//{
// this.SheetCollection.Add("Contacts");
// Add("Parmanent Address", "String", "No");
// Add("Parmanent District", "String", "No");
// Add("Parmanent Thana", "String", "No");
// Add("Parmanent Telephone No", "String", "Yes");
// Add("ParMobile No", "String", "Yes");
// Add("Present Address", "String", "No");
// Add("Present District", "String", "No");
// Add("Present Thana", "String", "No");
// Add("Present Telephone No", "String", "Yes");
// Add("PreMobile No", "String", "Yes");
// Add("Personal Land Phone No", "String", "Yes");
// Add("Personal Mobile No", "String", "Yes");
// Add("Personal E-Mail", "String", "Yes");
// Add("Official E-Mail", "String", "Yes");
// Add("Fax", "String", "Yes");
// Add("Emergency Contact Address", "String", "No");
// Add("Emergency Contact Person", "String", "No");
// Add("Emergency Telephone No", "String", "No");
// Add("EmeMobile No", "String", "Yes");
// Add("Relation", "String", "No");
// this.SheetName = "Contacts";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpSpouse Data
//public DataUploadColumnDefinition HREmpSpouseInfo()
//{
// this.SheetCollection.Add("Spouse");
// Add("Spouse Name", "String", "No");
// Add("Spouse Level of Education", "String", "Yes");
// Add("Spouse Occupation", "String", "No");
// Add("Date of Marriage", "Date", "Yes");
// this.SheetName = "Spouse";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpChildren Data
//public DataUploadColumnDefinition HREmpChildrenInfo()
//{
// this.SheetCollection.Add("Children");
// Add("Child's Name", "String", "No");
// Add("Child's Gender", "String", "No");
// Add("Child's Date of Birth", "Date", "No");
// Add("Child's Occupation", "String", "No");
// Add("Child's Marital Status", "String", "Yes");
// this.SheetName = "Children";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpExperience Data
//public DataUploadColumnDefinition HREmpExperienceInfo()
//{
// this.SheetCollection.Add("Experience");
// Add("Employer", "String", "No");
// Add("Contact Person", "String", "No");
// Add("Address", "String", "No");
// Add("Telephone No", "String", "No");
// Add("Industry/ Business Type", "String", "No");
// Add("Designation", "String", "No");
// Add("Role Description", "String", "No");
// Add("Employed From Date", "Date", "No");
// Add("Employed To Date", "Date", "Yes");
// //Add("Till Date", "Date", "Yes");
// this.SheetName = "Experience";
// //this.ItemOneComboText = "Type :";
// //this.SheetName = "Experience";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpTraining Data
//public DataUploadColumnDefinition HREmpTrainingInfo()
//{
// this.SheetCollection.Add("Training");
// Add("Training Type", "String", "Yes");
// Add("Training Title", "String", "No");
// Add("Nature of Training", "String", "No");
// //Add("Name", "String", "Yes");
// Add("Description", "String", "No");
// Add("Institution", "String", "No");
// Add("Training Place", "String", "No");
// Add("Country", "String", "No");
// Add("Achievements", "String", "No");
// Add("Sponsor Type", "String", "No");
// Add("Training Fees", "Double", "Yes");
// Add("Other Cost", "Double", "Yes");
// Add("From Date", "Date", "No");
// Add("To Date", "Date", "Yes");
// this.SheetName = "Training";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpAcademic Data
//public DataUploadColumnDefinition HREmpAcademicInfo()
//{
// this.SheetCollection.Add("Academic");
// Add("Education Type", "String", "No");
// Add("Degree Title", "String", "No");
// Add("Discipline/ Department", "String", "No");
// Add("Institution (Board/University)", "String", "No");
// Add("Institution Name", "String", "No");
// Add("Exam Held on", "String", "No");
// Add("Passing Year", "String", "No");
// Add("Result", "String", "Yes");
// Add("CGPA/ Marks", "String", "Yes");
// Add("Highest Education", "String", "Yes");
// this.SheetName = "Academic";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpReference Data
//public DataUploadColumnDefinition HREmpReferenceInfo()
//{
// this.SheetCollection.Add("Reference");
// Add("Referee's Name", "String", "No");
// Add("Referee's Occupation", "String", "No");
// Add("Relation", "String", "No");
// Add("Address", "String", "No");
// Add("E-mail Address", "String", "Yes");
// Add("Telephone No(s)", "String", "Yes");
// Add("Mobile No(s)", "String", "Yes");
// this.SheetName = "Reference";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpPublication Data
//public DataUploadColumnDefinition HREmpPublicationInfo()
//{
// this.SheetCollection.Add("Publication");
// Add("Publication Title", "String", "No");
// Add("Publication Type", "String", "No");
// Add("Publication Name", "String", "No");
// Add("Description", "String", "No");
// Add("Remarks", "String", "Yes");
// Add("Date of Publication", "Date", "No");
// this.SheetName = "Publication";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpNominee Data
//public DataUploadColumnDefinition HREmpNomineeInfo()
//{
// this.SheetCollection.Add("Nominee");
// Add("Nomination Purpose", "String", "No");
// Add("Date Of Nomination", "Date", "No");
// Add("Nominee's Name", "String", "No");
// Add("Relation", "String", "No");
// Add("Percentage", "String", "No");
// Add("Nominee's Date of Birth", "Date", "Yes");
// Add("Nominee's Occupation", "String", "Yes");
// Add("Address", "String", "No");
// Add("Telephone No(s)", "String", "Yes");
// Add("E-mail Address", "String", "Yes");
// this.SheetName = "Nominee";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpHospitalization Data
//public DataUploadColumnDefinition HREmpHospitalizationInfo()
//{
// this.SheetCollection.Add("Hospitalization");
// Add("Date Of Registration", "Date", "No");
// Add("Relation", "String", "No");
// Add("Registered Name", "String", "No");
// Add("Registered Person's Date of Birth", "Date", "Yes");
// Add("Registered Person's Occupation", "String", "No");
// Add("Email", "String", "Yes");
// Add("Address", "String", "No");
// Add("Telephone No(s)", "String", "Yes");
// Add("Mobile No (s)", "String", "Yes");
// this.SheetName = "Hospitalization";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpGuarantor Data
//public DataUploadColumnDefinition HREmpGuarantorInfo()
//{
// this.SheetCollection.Add("Guarantor");
// Add("Name", "String", "No");
// Add("Occupation", "String", "No");
// Add("Address", "String", "No");
// Add("Email", "String", "Yes");
// Add("Telephone No(s)", "String", "Yes");
// Add("Mobile No(s)", "String", "Yes");
// Add("Document Category", "String", "No");
// Add("Document Path", "String", "Yes");
// this.SheetName = "Guarantor";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpLanguage Data
//public DataUploadColumnDefinition HREmpLanguageInfo()
//{
// this.SheetCollection.Add("Language");
// Add("LanguageName", "String", "No");
// Add("SpokenStatus", "String", "No");
// Add("WrittenStatus", "String", "No");
// this.SheetName = "Language";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpRelative Data
//public DataUploadColumnDefinition HREmpRelativeInfo()
//{
// this.SheetCollection.Add("Relative in this Company");
// Add("Name", "String", "No");
// Add("Designation", "String", "No");
// Add("Relation", "String", "No");
// Add("JoiningDate", "Date", "No");
// Add("EndDate", "Date", "Yes");
// this.SheetName = "Relative in this Company";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpMembership Data
//public DataUploadColumnDefinition HREmpMemberShipInfo()
//{
// this.SheetCollection.Add("Membership");
// Add("Organization", "String", "No");
// Add("YourRole", "String", "No");
// Add("OrganizationType", "String", "No");
// //Add("Activity", "String", "No");
// Add("FromDate", "Date", "No");
// Add("EndDate", "Date", "Yes");
// this.SheetName = "Membership";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpRelation Data
//public DataUploadColumnDefinition HREmpRelationInfo()
//{
// this.SheetCollection.Add("Immedite Family");
// Add("Name", "String", "No");
// Add("Relation", "String", "No");
// Add("Occupation", "String", "No");
// this.SheetName = "Immedite Family";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#region Column Definition For EmpQuestionnaries Data
//public DataUploadColumnDefinition HREmpQuestionInfo()
//{
// this.SheetCollection.Add("Questionnarie");
// Add("QuestionNo", "String", "No");
// Add("Question", "String", "No");
// Add("QAnswer", "String", "No");
// this.SheetName = "Questionnarie";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
#endregion
#region All HR Column Definition
//#region Column Definition For All EmpGeneral Data
//public DataUploadColumnDefinition HRAllEmpGeneralInfo()
//{
// #region Old Code
// //this.SheetCollection.Add("General");
// //Add("GDDB ID", "String", "Yes");
// //Add("Employee No", "String", "Yes");
// //Add("First Name", "String", "No");
// //Add("Middle Name", "String", "Yes");
// //Add("Last Name", "String", "No");
// //Add("Gender", "String", "No");
// //Add("Religion", "String", "No");
// //Add("Blood Group", "String", "No");
// //Add("Marital Status", "String", "No");
// //Add("Passport No", "String", "Yes");
// //Add("Tax Identification No", "String", "Yes");
// //Add("Nationality", "String", "No");
// //Add("National ID", "String", "Yes");
// //Add("Joining Date", "Date", "No");
// //Add("Date of Birth", "Date", "No");
// //Add("Category", "String", "No");
// //Add("Father's Name", "String", "No");
// //Add("Mother's Name", "String", "No");
// //Add("Father's Occupation", "String", "No");
// //Add("Mother's Occupation", "String", "No");
// //Add("Place Of Birth", "String", "Yes");
// //this.SheetName = "General";
// ////this.ItemOneComboText = "Type :";
// ////this.ItemThreeDateData = null;
// //this.FormText = "Upload Employee HR Data";
// //return this;
// #endregion
// #region New Code
// //bool CodeautoGenerate = false;
// //ConfigurationManager ocManager = new ConfigurationManager();
// //List<Configaration> deptConfig = ocManager.GetChilds("department", EnumConfigurationType.Logic);
// //List<Configaration> deptTiers = ocManager.GetChilds(deptConfig, "tiernames");
// this.SheetCollection.Add("General");
// this.SheetName = "General";
// Add("EmployeeID", "String", "No");
// Add("GEID", "String", "No");
// Add("First Name", "String", "Yes"); //2
// Add("Middle Name", "String", "Yes");
// Add("Last Name", "String", "Yes"); //5
// Add("Gender", "String", "Yes"); //6
// Add("Religion", "String", "Yes");
// Add("Blood Group", "String", "Yes");
// Add("Passport No", "String", "Yes");
// Add("Passport Issue Place", "String", "Yes");
// Add("Passport Issue Date", "Date", "Yes");
// Add("Passport Expire Date", "Date", "Yes");
// Add("Tax Identification No", "String", "Yes");
// Add("Nationality", "String", "Yes");
// Add("National ID", "String", "Yes");
// Add("Joining Date", "Date", "Yes");
// Add("Birth Date", "Date", "Yes");
// Add("Place of Birth", "String", "Yes");
// Add("Category", "String", "Yes");
// Add("Driving Licence No", "String", "Yes");
// Add("Father's Name", "String", "Yes");
// Add("Father's Occupation", "String", "Yes");
// Add("Mother's Name", "String", "Yes");
// Add("Mother's Occupation", "String", "Yes");
// Add("Permanent Address", "String", "No");
// Add("Permanent District", "String", "No");
// Add("Permanent Thana", "String", "No");
// Add("Permanent Telephone No", "String", "Yes");
// Add("PerMobile No", "String", "Yes");
// Add("Present Address", "String", "No");
// Add("Present District", "String", "No");
// Add("Present Thana", "String", "No");
// Add("Present Telephone No", "String", "Yes");
// Add("PreMobile No", "String", "Yes");
// Add("Emergency Contact Person", "String", "No");
// Add("Emergency Contact Address", "String", "No");
// Add("Emergency Telephone No", "String", "No");
// Add("EmeMobile No", "String", "Yes");
// Add("Relation", "String", "No");
// Add("Personal Land Phone No", "String", "Yes");
// Add("Personal Mobile No", "String", "Yes");
// Add("Personal E-Mail", "String", "Yes");
// Add("Official E-Mail", "String", "Yes");
// Add("Fax", "String", "Yes");
// this.ItemThreeDateData = null;
// this.FormText = "Upload Employee General and Contact";
// return this;
// #endregion
//}
//#endregion
//#region Column Definition For All EmpContact Data
//public DataUploadColumnDefinition HRAllEmpContactInfo()
//{
// this.SheetCollection.Add("Contacts");
// Add("Employee No", "String", "No");
// Add("Permanent Address", "String", "No");
// Add("Permanent District", "String", "No");
// Add("Permanent Thana", "String", "No");
// Add("Permanent Telephone No", "String", "Yes");
// Add("PerMobile No", "String", "Yes");
// Add("Present Address", "String", "No");
// Add("Present District", "String", "No");
// Add("Present Thana", "String", "No");
// Add("Present Telephone No", "String", "Yes");
// Add("PreMobile No", "String", "Yes");
// Add("Emergency Contact Address", "String", "No");
// Add("Emergency Contact Person", "String", "No");
// Add("Emergency Telephone No", "String", "No");
// Add("EmeMobile No", "String", "Yes");
// Add("Relation", "String", "No");
// Add("Personal Land Phone No", "String", "Yes");
// Add("Personal Mobile No", "String", "Yes");
// //Add("Offical Mobile No", "String", "No");
// Add("Personal E-Mail", "String", "Yes");
// Add("Official E-Mail", "String", "Yes");
// Add("Fax", "String", "Yes");
// this.SheetName = "Contacts";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee Contacts";
// return this;
//}
//#endregion
//#region Column Definition For All EmpSpouse Data
//public DataUploadColumnDefinition HRAllEmpSpouseInfo()
//{
// this.SheetCollection.Add("Spouse");
// Add("Employee No", "String", "No");
// Add("Spouse Name", "String", "No");
// Add("Spouse Level of Education", "String", "Yes");
// Add("Spouse Occupation", "String", "No");
// Add("Date of Birth", "Date", "Yes");
// this.SheetName = "Spouse";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//#endregion
//#region Column Definition For All EmpChildren Data
//public DataUploadColumnDefinition HRAllEmpChildrenInfo()
//{
// this.SheetCollection.Add("Children");
// Add("Employee No", "String", "No");
// Add("Child's Name", "String", "No");
// Add("Child's Gender", "String", "No");
// Add("Child's Date of Birth", "Date", "No");
// Add("Child's Occupation", "String", "No");
// Add("Child's Marital Status", "String", "Yes");
// this.SheetName = "Children";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//#endregion
//#region Column Definition For All EmpExperience Data
//public DataUploadColumnDefinition HRAllEmpExperienceInfo()
//{
// this.SheetCollection.Add("Experience");
// Add("Employee No", "String", "No");
// Add("Employer", "String", "No");
// Add("Contact Person", "String", "No");
// Add("Address", "String", "No");
// Add("Telephone No", "String", "No");
// Add("Industry/ Business Type", "String", "No");
// Add("Designation", "String", "No");
// Add("Role Description", "String", "No");
// Add("Employed From Date", "Date", "No");
// Add("Employed To Date", "Date", "Yes");
// //Add("Till Date", "Date", "Yes");
// this.SheetName = "Experience";
// //this.ItemOneComboText = "Type :";
// //this.SheetName = "Experience";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//#endregion
//#region Column Definition For All EmpTraining Data
//public DataUploadColumnDefinition HRAllEmpTrainingInfo()
//{
// this.SheetCollection.Add("Training");
// Add("Employee No", "String", "No");
// Add("Training Type", "String", "No");
// Add("Training Title", "String", "No");
// Add("Nature of Training", "String", "No");
// //Add("Name", "String", "Yes");
// Add("Description", "String", "No");
// Add("Institution", "String", "No");
// Add("Training Place", "String", "No");
// Add("Country", "String", "No");
// Add("Achievements", "String", "No");
// Add("Sponsor Type", "String", "No");
// Add("Training Fees", "Double", "Yes");
// Add("Other Cost", "Double", "Yes");
// Add("From Date", "Date", "No");
// Add("To Date", "Date", "Yes");
// this.SheetName = "Training";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//#endregion
//#region Column Definition For All EmpAcademic Data
//public DataUploadColumnDefinition HRAllEmpAcademicInfo()
//{
// this.SheetCollection.Add("Academic");
// Add("Employee No", "String", "No");
// Add("Education Type", "String", "No");
// Add("Degree Title", "String", "No");
// Add("Discipline/ Department", "String", "No");
// Add("Institution (Board/University)", "String", "No");
// Add("Institution Name", "String", "No");
// Add("Exam Held on", "String", "No");
// Add("Passing Year", "String", "No");
// Add("Result", "String", "Yes");
// Add("CGPA/ Marks", "String", "Yes");
// Add("Highest Education", "String", "Yes");
// this.SheetName = "Academic";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//#endregion
//#region Column Definition For All EmpReference Data
//public DataUploadColumnDefinition HRAllEmpReferenceInfo()
//{
// this.SheetCollection.Add("Reference");
// Add("Employee No", "String", "No");
// Add("Referee's Name", "String", "No");
// Add("Referee's Occupation", "String", "No");
// Add("Relation", "String", "No");
// Add("Address", "String", "No");
// Add("E-mail Address", "String", "Yes");
// Add("Telephone No(s)", "String", "Yes");
// Add("Mobile No(s)", "String", "Yes");
// this.SheetName = "Reference";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//#endregion
//#region Column Definition For All EmpPublication Data
//public DataUploadColumnDefinition HRAllEmpPublicationInfo()
//{
// this.SheetCollection.Add("Publication");
// Add("Employee No", "String", "No");
// Add("Publication Title", "String", "No");
// Add("Publication Type", "String", "No");
// Add("Publication Name", "String", "No");
// Add("Description", "String", "No");
// Add("Remarks", "String", "Yes");
// Add("Date of Publication", "Date", "No");
// this.SheetName = "Publication";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//#endregion
//#region Column Definition For All EmpNominee Data
//public DataUploadColumnDefinition HRAllEmpNomineeInfo()
//{
// this.SheetCollection.Add("Nominee");
// Add("Employee No", "String", "No");
// Add("Nomination Purpose", "String", "No");
// Add("Date Of Nomination", "Date", "No");
// Add("Nominee's Name", "String", "No");
// Add("Relation", "String", "No");
// Add("Percentage", "String", "No");
// Add("Nominee's Date of Birth", "Date", "Yes");
// Add("Nominee's Occupation", "String", "Yes");
// Add("Address", "String", "No");
// Add("Telephone No(s)", "String", "Yes");
// Add("E-mail Address", "String", "Yes");
// this.SheetName = "Nominee";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//#endregion
//#region Column Definition For All EmpHospitalization Data
//public DataUploadColumnDefinition HRAllEmpHospitalizationInfo()
//{
// this.SheetCollection.Add("Hospitalization");
// Add("Employee No", "String", "No");
// Add("Date Of Registration", "Date", "No");
// Add("Relation", "String", "No");
// Add("Registered Name", "String", "No");
// Add("Registered Person's Date of Birth", "Date", "Yes");
// Add("Registered Person's Occupation", "String", "No");
// Add("Email", "String", "Yes");
// Add("Address", "String", "No");
// Add("Telephone No(s)", "String", "Yes");
// Add("Mobile No (s)", "String", "Yes");
// this.SheetName = "Hospitalization";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//#endregion
#region Column Definition For EmpGuarantor Data
//public DataUploadColumnDefinition HREmpGuarantorInfo()
//{
// this.SheetCollection.Add("Guarantor");
// Add("Name", "String", "No");
// Add("Occupation", "String", "No");
// Add("Address", "String", "No");
// Add("Email", "String", "Yes");
// Add("Telephone No(s)", "String", "Yes");
// Add("Mobile No(s)", "String", "Yes");
// Add("Document Category", "String", "No");
// Add("Document Path", "String", "Yes");
// this.SheetName = "Guarantor";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
#endregion
//#region Column Definition For All EmpLanguage Data
//public DataUploadColumnDefinition HRAllEmpLanguageInfo()
//{
// this.SheetCollection.Add("Language");
// Add("Employee No", "String", "No");
// Add("LanguageName", "String", "No");
// Add("SpokenStatus", "String", "No");
// Add("WrittenStatus", "String", "No");
// this.SheetName = "Language";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//#endregion
//#region Column Definition For All EmpRelative Data
//public DataUploadColumnDefinition HRAllEmpRelativeInfo()
//{
// this.SheetCollection.Add("Relative in this Company");
// Add("Employee No", "String", "No");
// Add("Name", "String", "No");
// Add("Designation", "String", "No");
// Add("Relation", "String", "No");
// Add("JoiningDate", "Date", "No");
// Add("EndDate", "Date", "Yes");
// Add("EmpID", "String", "Yes");
// this.SheetName = "Relative in this Company";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//#endregion
//#region Column Definition For All EmpMembership Data
//public DataUploadColumnDefinition HRAllEmpMemberShipInfo()
//{
// this.SheetCollection.Add("Membership");
// Add("Employee No", "String", "No");
// Add("YourRole", "String", "No");
// Add("OrganizationType", "String", "No");
// //Add("Organization", "String", "No");
// //Add("Activity", "String", "No");
// Add("FromDate", "Date", "No");
// Add("EndDate", "Date", "Yes");
// this.SheetName = "Membership";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//#endregion
//#region Column Definition For All EmpRelation Data
//public DataUploadColumnDefinition HRAllEmpRelationInfo()
//{
// this.SheetCollection.Add("Immedite Family");
// Add("Employee No", "String", "No");
// Add("Name", "String", "No");
// Add("Relation", "String", "No");
// Add("Occupation", "String", "No");
// this.SheetName = "Immedite Family";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee HR Data";
// return this;
//}
//#endregion
//#region Column Definition For All EmpQuestionnaries Data
////public DataUploadColumnDefinition HRAllEmpQuestionInfo()
////{
//// this.SheetCollection.Add("Questionnarie");
//// Add("QuestionNo", "String", "No");
//// Add("Question", "String", "No");
//// Add("QAnswer", "String", "No");
//// this.SheetName = "Questionnarie";
//// //this.ItemOneComboText = "Type :";
//// //this.ItemThreeDateData = null;
//// this.FormText = "Upload Employee HR Data";
//// return this;
////}
//#endregion
#endregion
//#region HR Employee Only Contact Column Definition
//public DataUploadColumnDefinition HREmpOnlyContactInfo()
//{
// this.SheetCollection.Add("Contacts");
// Add("Employee No", "String", "No");
// Add("Permanent Address", "String", "Yes");
// Add("Permanent District", "String", "Yes");
// Add("Permanent Thana", "String", "Yes");
// Add("Permanent Telephone No", "String", "Yes");
// Add("PerMobile No", "String", "Yes");
// Add("Present Address", "String", "Yes");
// Add("Present District", "String", "Yes");
// Add("Present Thana", "String", "Yes");
// Add("Present Telephone No", "String", "Yes");
// Add("PreMobile No", "String", "Yes");
// Add("Emergency Contact Address", "String", "Yes");
// Add("Emergency Contact Person", "String", "Yes");
// Add("Emergency Telephone No", "String", "Yes");
// Add("EmeMobile No", "String", "Yes");
// Add("Relation", "String", "Yes");
// Add("Personal Land Phone No", "String", "Yes");
// Add("Personal Mobile No", "String", "Yes");
// //Add("Offical Mobile No", "String", "No");
// Add("Personal E-Mail", "String", "Yes");
// Add("Official E-Mail", "String", "Yes");
// Add("Fax", "String", "Yes");
// this.SheetName = "Contacts";
// //this.ItemOneComboText = "Type :";
// //this.ItemThreeDateData = null;
// this.FormText = "Upload Employee Contacts";
// return this;
//}
//#endregion
public DataUploadColumnDefinition PFOpeningColumns ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "PFOpening" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Date" , "Date" , "No" ) ;
item . Add ( "Own Contribution" , "Double" , "No" ) ;
item . Add ( "Company Contribution" , "Double" , "No" ) ;
item . Add ( "Own Interest" , "Double" , "No" ) ;
item . Add ( "Company Interest" , "Double" , "No" ) ;
return item ;
}
public DataUploadColumnDefinition PFYearlyInterestColumns ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "PFYearlyInterest" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Date" , "Date" , "No" ) ;
item . Add ( "Own Yearly Interest" , "Double" , "No" ) ;
item . Add ( "Company Yearly Interest" , "Double" , "No" ) ;
return item ;
}
public DataUploadColumnDefinition LoanInformation ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "EmployeeLoan" ;
item . Add ( "EmployeeNo" , "String" , "No" ) ;
item . Add ( "LoanType" , "String" , "No" ) ;
item . Add ( "Loan Amount" , "Double" , "No" ) ;
item . Add ( "Interest" , "Double" , "No" ) ;
item . Add ( "Schedule" , "Double" , "No" ) ;
item . Add ( "Loan Issue Date" , "Date" , "No" ) ;
item . Add ( "Disburse from Month" , "Date" , "No" ) ;
return item ;
}
public DataUploadColumnDefinition EmployeeAttendance ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "EmployeeAttendance" ;
item . Add ( "Date" , "String" , "No" ) ;
item . Add ( "EmployeeNo" , "String" , "No" ) ;
item . Add ( "Shift" , "String" , "Yes" ) ;
item . Add ( "InTime (24 Hour Exp: 00:00)" , "String" , "Yes" ) ;
item . Add ( "OutTime (24 Hour Exp: 00:00)" , "String" , "Yes" ) ;
item . Add ( "Reason" , "String" , "Yes" ) ;
item . Add ( "OTHour" , "String" , "Yes" ) ;
return item ;
}
public DataUploadColumnDefinition MemberUpload ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "MemberUpload" ;
item . Add ( "EmployeeNo" , "String" , "No" ) ;
item . Add ( "Name" , "String" , "No" ) ;
item . Add ( "Designation" , "String" , "Yes" ) ;
item . Add ( "Birthdate" , "String" , "Yes" ) ;
item . Add ( "JoiningDate" , "String" , "Yes" ) ;
item . Add ( "BasicSalary" , "String" , "Yes" ) ;
item . Add ( "PFMembershipDate" , "String" , "Yes" ) ;
return item ;
}
public DataUploadColumnDefinition MemberLoanScheduleInfoUpload ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "MemberLoanScheduleInfoUpload" ;
item . Add ( "Member No" , "String" , "NO" ) ;
item . Add ( "Payroll Month" , "Date" , "NO" ) ;
item . Add ( "Principle" , "Double" , "NO" ) ;
item . Add ( "Interest" , "Double" , "NO" ) ;
return item ;
}
public DataUploadColumnDefinition MemberOpeningLoanUpload ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "MemberOpeningLoanUpload" ;
item . Add ( "Loan Category" , "String" , "NO" ) ;
item . Add ( "Member No" , "String" , "NO" ) ;
item . Add ( "Issue Date" , "Date" , "NO" ) ;
item . Add ( "Pay Back Month" , "Date" , "NO" ) ;
item . Add ( "Installment No" , "String" , "NO" ) ;
item . Add ( "Loan Amount" , "Double" , "NO" ) ;
return item ;
}
public DataUploadColumnDefinition MemberOpeningBalanceUpload ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "MemberOpeningBalanceUpload" ;
//item.Add("Voucher Date", "Date", "NO");
//item.Add("Description", "String", "YES");
item . Add ( "Employee No" , "String" , "NO" ) ;
item . Add ( "Employee Name" , "String" , "NO" ) ;
item . Add ( "Designation" , "String" , "Yes" ) ;
item . Add ( "Joining Date" , "Date" , "NO" ) ;
item . Add ( "Birthdate" , "Date" , "NO" ) ;
item . Add ( "PF MembershipDate" , "Date" , "NO" ) ;
item . Add ( "Basic Salary" , "Double" , "NO" ) ;
item . Add ( "Bank GL" , "String" , "NO" ) ;
item . Add ( "EPF" , "Double" , "NO" ) ;
item . Add ( "EPF GL" , "String" , "NO" ) ;
item . Add ( "EPF Interest" , "Double" , "NO" ) ;
item . Add ( "EPF Interest GL" , "String" , "NO" ) ;
item . Add ( "CPF" , "Double" , "NO" ) ;
item . Add ( "CPF GL" , "String" , "NO" ) ;
item . Add ( "CPF Interest" , "Double" , "NO" ) ;
item . Add ( "CPF Interest GL" , "String" , "NO" ) ;
return item ;
}
public DataUploadColumnDefinition MemberVoluntaryOpeningBalanceUpload ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "VoluntaryOpeningBalanceUpload" ;
//item.Add("Voucher Date", "Date", "NO");
//item.Add("Description", "String", "YES");
item . Add ( "Employee No" , "String" , "NO" ) ;
item . Add ( "Employee Name" , "String" , "NO" ) ;
item . Add ( "Designation" , "String" , "Yes" ) ;
item . Add ( "Joining Date" , "Date" , "NO" ) ;
item . Add ( "Birthdate" , "Date" , "NO" ) ;
item . Add ( "PF MembershipDate" , "Date" , "NO" ) ;
item . Add ( "Basic Salary" , "Double" , "NO" ) ;
item . Add ( "Bank GL" , "String" , "NO" ) ;
item . Add ( "EPF" , "Double" , "NO" ) ;
item . Add ( "EPF GL" , "String" , "NO" ) ;
item . Add ( "EPF Interest" , "Double" , "NO" ) ;
item . Add ( "EPF Interest GL" , "String" , "NO" ) ;
item . Add ( "Voluntary EPF" , "Double" , "NO" ) ;
item . Add ( "Voluntary EPF GL" , "String" , "NO" ) ;
item . Add ( "Voluntary EPF Interest" , "Double" , "NO" ) ;
item . Add ( "Voluntary EPF Interest GL" , "String" , "NO" ) ;
item . Add ( "CPF" , "Double" , "NO" ) ;
item . Add ( "CPF GL" , "String" , "NO" ) ;
item . Add ( "CPF Interest" , "Double" , "NO" ) ;
item . Add ( "CPF Interest GL" , "String" , "NO" ) ;
return item ;
}
public DataUploadColumnDefinition MemberContributionUpload ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "MemberContributionUpload" ;
item . Add ( "Contribution Month" , "Date" , "NO" ) ;
item . Add ( "Employee No" , "String" , "NO" ) ;
item . Add ( "Employee Name" , "String" , "YES" ) ;
item . Add ( "Designation" , "String" , "Yes" ) ;
item . Add ( "Joining Date" , "Date" , "YES" ) ;
item . Add ( "PF MembershipDate" , "Date" , "YES" ) ;
item . Add ( "Basic Salary" , "Double" , "YES" ) ;
item . Add ( "EPF" , "Double" , "NO" ) ;
item . Add ( "CPF" , "Double" , "NO" ) ;
return item ;
}
public DataUploadColumnDefinition MemberVoluntaryContributionUpload ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "VoluntaryContributionUpload" ;
item . Add ( "Contribution Month" , "Date" , "NO" ) ;
item . Add ( "Employee No" , "String" , "NO" ) ;
item . Add ( "Employee Name" , "String" , "YES" ) ;
item . Add ( "Designation" , "String" , "Yes" ) ;
item . Add ( "Joining Date" , "Date" , "YES" ) ;
item . Add ( "PF MembershipDate" , "Date" , "YES" ) ;
item . Add ( "Basic Salary" , "Double" , "YES" ) ;
item . Add ( "EPF" , "Double" , "NO" ) ;
item . Add ( "Voluntary EPF" , "Double" , "NO" ) ;
item . Add ( "CPF" , "Double" , "NO" ) ;
return item ;
}
public DataUploadColumnDefinition ProfitDistributionUpload ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "ProfitDistributionUpload" ;
item . Add ( "EmployeeNo" , "String" , "NO" ) ;
item . Add ( "TranDate" , "Date" , "NO" ) ;
item . Add ( "EPFInterest" , "String" , "NO" ) ;
item . Add ( "CPFInterest" , "String" , "NO" ) ;
return item ;
}
public DataUploadColumnDefinition ProfitVoluntaryDistributionUpload ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "ProfitDistributionUpload" ;
item . Add ( "EmployeeNo" , "String" , "NO" ) ;
item . Add ( "TranDate" , "Date" , "NO" ) ;
item . Add ( "EPFInterest" , "String" , "NO" ) ;
item . Add ( "voluntaryInterest" , "String" , "NO" ) ;
item . Add ( "CPFInterest" , "String" , "NO" ) ;
return item ;
}
#region Line Manager Upload
public DataUploadColumnDefinition LineManagerInfo ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "EmpLineManagerInformation" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Line Manager" , "String" , "No" ) ;
item . Add ( "Second Line Manager" , "String" , "Yes" ) ;
return item ;
}
#region Coordinator Upload
public DataUploadColumnDefinition CoOrdinatorInfo ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "EmpAttendanceInCharge" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Attendance In Charge" , "String" , "No" ) ;
item . Add ( "Emp Time Approve (Yes/No)" , "String" , "Yes" ) ;
//item.Add("CreatedDate", "String", "Yes");
return item ;
}
#endregion
public DataUploadColumnDefinition LeaveBalanceColumnNames ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "LeaveBalance" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Leave Code" , "String" , "No" ) ;
item . Add ( "CFDays" , "String" , "No" ) ;
return item ;
}
public DataUploadColumnDefinition LeaveEncashDaysColumnNames ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "LeaveEncashDays" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Encash Days" , "String" , "No" ) ;
return item ;
}
public DataUploadColumnDefinition LeaveEntryColumnNames ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "LeaveEntry" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Leave Code" , "String" , "No" ) ;
item . Add ( "From Date" , "String" , "No" ) ;
item . Add ( "To Date" , "String" , "No" ) ;
item . Add ( "Leave Availed" , "String" , "No" ) ;
item . Add ( "Remarks" , "String" , "No" ) ;
return item ;
}
public DataUploadColumnDefinition LeaveEntryColumnNamesForLF ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "LeaveUplaod" ;
item . Add ( "EMPNO" , "String" , "No" ) ; //Employee No
item . Add ( "LEAVE_TYPE" , "String" , "No" ) ; //Leave Code
item . Add ( "LEAVE_START_DATE" , "String" , "No" ) ; //From Date
item . Add ( "LEAVE_END_DATE" , "String" , "No" ) ; //To Date
item . Add ( "LEAVE_DURATION" , "String" , "No" ) ; //Leave Availed
item . Add ( "LEAVE_START_PERIOD" , "String" , "Yes" ) ;
item . Add ( "LEAVE_END_PERIOD" , "String" , "Yes" ) ;
item . Add ( "LEAVE_TIME_DATE" , "String" , "Yes" ) ;
item . Add ( "LEAVE_START_TIME" , "String" , "Yes" ) ;
item . Add ( "LEAVE_END_TIME" , "String" , "Yes" ) ;
item . Add ( "Remarks" , "String" , "Yes" ) ;
item . Add ( "STATUS" , "String" , "Yes" ) ;
return item ;
}
public DataUploadColumnDefinition AitUploadColumnNames ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "ait" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Amount" , "String" , "No" ) ; ;
return item ;
}
public DataUploadColumnDefinition OTImportColumnName ( int payrollTypeId )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
List < Term > terms = new TermService ( ) . Get ( EnumStatus . Active , payrollTypeId ) ;
bool fixedotmonth = new SystemConfigarationService ( ) . GetconfigBooleanValue ( EnumConfigurationType . Logic , "overtime" , "fixedotmonth" ) ;
item . SheetName = "OT" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Name" , "String" , "No" ) ;
if ( ! fixedotmonth )
item . Add ( "OT Month" , "String" , "No" ) ;
terms . ForEach ( x = >
{
item . Add ( x . Name , "String" , "Yes" ) ;
} ) ;
return item ;
}
public DataUploadColumnDefinition EmpWorkplanUploadColumnName ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "EmpWorkPlanGroup" ;
item . Add ( "Employee-ID" , "String" , "No" ) ;
item . FormText = "EmpWorkPlanGroup" ;
return item ;
}
public DataUploadColumnDefinition TemporaryShiftAssignmentUploadColumnName ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "TemporaryShiftAssignment" ;
item . Add ( "Employee-ID" , "String" , "No" ) ;
item . Add ( "Name" , "String" , "Yes" ) ;
DateTime endDate = DateTime . Today . AddDays ( 30 ) ;
for ( DateTime d = DateTime . Today ; d < endDate ; d = d . AddDays ( 1 ) )
{
item . Add ( d . ToString ( "dd-MMM-yyyy" ) , "String" , "Yes" ) ;
}
item . FormText = "TemporaryShiftAssignment" ;
return item ;
}
#endregion Line Manager
#region Column Definition For OPI
public DataUploadColumnDefinition OPI ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "OPI" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "From Date" , "Date" , "Yes" ) ;
item . Add ( "Till Date" , "Date" , "Yes" ) ;
item . Add ( "Amount" , "Double" , "No" ) ;
List < OpiItem > types = new List < OpiItem > ( ) ;
types = new OpiItemService ( ) . Get ( EnumStatus . Active , this . _payrollTypeID ) ;
Dictionary < int , string > ItemOneComboData = new Dictionary < int , string > ( ) ;
foreach ( OpiItem ADitem in types )
{
ItemOneComboData . Add ( ADitem . ID , ADitem . Name ) ;
}
item . ItemOneComboText = "OPI Type :" ;
item . ItemThreeDateData = null ;
item . FormText = "Upload OPI Allowance" ;
return item ;
}
//public DataUploadColumnDefinition BeforeProcessOPI()
//{
// this.SheetName = "OPI";
// Add("Employee No", "String", "No");
// //Add("FromDate", "Date", "No");
// //Add("ToDate", "Date", "No");
// Add("Amount", "Double", "No");
// List<OpiParameter> oparams = new List<OpiParameter>();
// oparams = OpiParameter.Get(EnumStatus.Active, EnumEntitleType.Individual);
// //OpiParameter.Get(EnumStatus.Active, EnumOpiType.Provision, EnumEntitleType.Individual);
// string opiItemId = "";
// foreach (OpiParameter oparam in oparams)
// {
// if (opiItemId == "")
// {
// opiItemId = oparam.OpiItemID.ToString();
// }
// else if (opiItemId != "")
// {
// opiItemId = opiItemId + "," + oparam.OpiItemID.ToString();
// }
// }
// //List<OpiItem> types = new List<OpiItem>();
// //types = OpiItem.Get(opiItemId);
// ItemOneComboData = new Dictionary<ID, string>();
// foreach (OpiParameter item in oparams)
// {
// ItemOneComboData.Add(item.OpiItem.ID, item.OpiItem.Name);
// }
// this.ItemOneComboText = "OPI Type :";
// this.ItemThreeDateData = null;
// this.FormText = "Upload OPI Data Before Process";
// return this;
//}
#endregion
#region EmpCostCenterData
public DataUploadColumnDefinition SetupEmpCC ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "UploadCostcenter" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Costcenter Code" , "String" , "No" ) ;
item . Add ( "Involve Percent" , "Double" , "No" ) ;
return item ;
}
#endregion
//public DataUploadColumnDefinition SetupPFOpening()
//{
// this.SheetName = "Upload PFOpening";
// Add("Employee No", "String", "No");
// Add("PFAmount", "Double", "No");
// Add("PFInterest", "Double", "No");
// Add("CPFAmount", "Double", "No");
// Add("CPFInterest", "Double", "No");
// Add("Opening Date", "Date", "No");
// this.ItemThreeDateData = null;
// this.FormText = "Upload PFOpening";
// return this;
//}
//#endregion
//#region EmpVendorCode
//public DataUploadColumnDefinition SetupEmpVendorCode()
//{
// this.SheetName = "Upload EmpVendorCode";
// Add("Employee No", "String", "No");
// Add("VendorCode", "String", "No");
// this.ItemThreeDateData = null;
// this.FormText = "Upload Employee Vendor Code";
// return this;
//}
//#endregion
#region EmpSingle
//public DataUploadColumnDefinition SetUpEmpSingle()
//{
// bool CodeautoGenerate = false;
// ConfigurationManager ocManager = new ConfigurationManager();
// List<Configaration> deptConfig = ocManager.GetChilds("department", EnumConfigurationType.Logic);
// List<Configaration> deptTiers = ocManager.GetChilds(deptConfig, "tiernames");
// this.SheetCollection.Add("EmployeeInfo");
// this.SheetName = "EmployeeInfo";
// Add("EmployeeID", "String", "No");
// Add("GEID", "String", "No");
// Add("First Name", "String", "Yes"); //2
// Add("Middle Name", "String", "Yes");
// Add("Last Name", "String", "Yes"); //5
// Add("Gender", "String", "Yes"); //6
// Add("Religion", "String", "Yes");
// Add("Blood Group", "String", "Yes");
// Add("Passport No", "String", "Yes");
// Add("Passport Issue Place", "String", "Yes");
// Add("Passport Issue Date", "Date", "Yes");
// Add("Passport Expire Date", "Date", "Yes");
// Add("Tax Identification No", "String", "Yes");
// Add("Nationality", "String", "Yes");
// Add("National ID", "String", "Yes");
// Add("Joining Date", "Date", "Yes");
// Add("Birth Date", "Date", "Yes");
// Add("Place of Birth", "String", "Yes");
// Add("Category", "String", "Yes");
// Add("Driving Licence No", "String", "Yes");
// Add("Father's Name", "String", "Yes");
// Add("Father's Occupation", "String", "Yes");
// Add("Mother's Name", "String", "Yes");
// Add("Mother's Occupation", "String", "Yes");
// Add("Permanent Address", "String", "No");
// Add("Permanent District", "String", "No");
// Add("Permanent Thana", "String", "No");
// Add("Permanent Telephone No", "String", "Yes");
// Add("PerMobile No", "String", "Yes");
// Add("Present Address", "String", "No");
// Add("Present District", "String", "No");
// Add("Present Thana", "String", "No");
// Add("Present Telephone No", "String", "Yes");
// Add("PreMobile No", "String", "Yes");
// Add("Emergency Contact Person", "String", "No");
// Add("Emergency Contact Address", "String", "No");
// Add("Emergency Telephone No", "String", "No");
// Add("EmeMobile No", "String", "Yes");
// Add("Relation", "String", "No");
// Add("Personal Land Phone No", "String", "Yes");
// Add("Personal Mobile No", "String", "Yes");
// Add("Personal E-Mail", "String", "Yes");
// Add("Official E-Mail", "String", "Yes");
// Add("Fax", "String", "Yes");
// Add("Spouse Name", "String", "No");
// Add("Spouse Level of Education", "String", "Yes");
// Add("Spouse Occupation", "String", "No");
// Add("Date of Marriage", "Date", "Yes");
// Add("Child's Name", "String", "No");
// Add("Child's Gender", "String", "No");
// Add("Child's Date of Birth", "Date", "No");
// Add("Child's Occupation", "String", "No");
// Add("Child's Marital Status", "String", "Yes");
// Add("Employer", "String", "No");
// Add("Contact Person", "String", "No");
// Add("ConPer Address", "String", "No");
// Add("ConPer Telephone No", "String", "No");
// Add("Industry/ Business Type", "String", "No");
// Add("ConPer Designation", "String", "No");
// Add("Role Description", "String", "No");
// Add("Employed From Date", "Date", "No");
// Add("Employed To Date", "Date", "Yes");
// Add("Training Type", "String", "Yes");
// Add("Training Title", "String", "No");
// Add("Nature of Training", "String", "No");
// Add("Training Description", "String", "No");
// Add("Institution", "String", "No");
// Add("Training Place", "String", "No");
// Add("Country", "String", "No");
// Add("Achievements", "String", "No");
// Add("Sponsor Type", "String", "No");
// Add("Training Fees", "Double", "Yes");
// Add("Other Cost", "Double", "Yes");
// Add("Training From Date", "Date", "No");
// Add("Training To Date", "Date", "Yes");
// Add("Education Type", "String", "No");
// Add("Degree Title", "String", "No");
// Add("Discipline/ Department", "String", "No");
// Add("Institution (Board/University)", "String", "No");
// Add("Institution Name", "String", "No");
// Add("Exam Held on", "String", "No");
// Add("Passing Year", "String", "No");
// Add("EduResult", "String", "Yes");
// Add("CGPA/ Marks", "String", "Yes");
// Add("Highest Education", "String", "Yes");
// Add("Referee's Name", "String", "No");
// Add("Referee's Occupation", "String", "No");
// Add("Referee's Relation", "String", "No");
// Add("Referee's Address", "String", "No");
// Add("Referee's E-mail Address", "String", "Yes");
// Add("Referee's Telephone No(s)", "String", "Yes");
// Add("Referee's Mobile No(s)", "String", "Yes");
// Add("Publication Title", "String", "No");
// Add("Publication Type", "String", "No");
// Add("Publication Name", "String", "No");
// Add("Publication Description", "String", "No");
// Add("Publication Remarks", "String", "Yes");
// Add("Date of Publication", "Date", "No");
// Add("Nomination Purpose", "String", "No");
// Add("Date Of Nomination", "Date", "No");
// Add("Nominee's Name", "String", "No");
// Add("Nominee's Relation", "String", "No");
// Add("Nominee's Percentage", "String", "No");
// Add("Nominee's Date of Birth", "Date", "Yes");
// Add("Nominee's Occupation", "String", "Yes");
// Add("Nominee's Address", "String", "No");
// Add("Nominee's Telephone No(s)", "String", "Yes");
// Add("Nominee's E-mail Address", "String", "Yes");
// Add("Date Of Registration", "Date", "No");
// Add("Relation", "String", "No");
// Add("Registered Name", "String", "No");
// Add("Registered Person's Date of Birth", "Date", "Yes");
// Add("Registered Person's Occupation", "String", "No");
// Add("Registered Person's Email", "String", "Yes");
// Add("Registered Person's Address", "String", "No");
// Add("Registered Person's Telephone No(s)", "String", "Yes");
// Add("Registered Person's Mobile No (s)", "String", "Yes");
// Add("LanguageName", "String", "No");
// Add("SpokenStatus", "String", "No");
// Add("WrittenStatus", "String", "No");
// Add("Relative's Name", "String", "No");
// Add("Relative's Designation", "String", "No");
// Add("Relative's Relation", "String", "No");
// Add("Relative's JoiningDate", "Date", "No");
// Add("Relative's EndDate", "Date", "Yes");
// Add("Membership Organization", "String", "No");
// Add("YourRole", "String", "No");
// Add("OrganizationType", "String", "No");
// Add("Membership FromDate", "Date", "No");
// Add("Membership EndDate", "Date", "Yes");
// Add("IRName", "String", "No");
// Add("IRRelation", "String", "No");
// Add("IROccupation", "String", "No");
// Add("QuestionNo", "String", "No");
// Add("Question", "String", "No");
// Add("QAnswer", "String", "No");
// this.ItemThreeDateData = null;
// this.FormText = "Upload Single Employee Information";
// return this;
//}
#endregion
//#region EmpMultiple
//public DataUploadColumnDefinition SetUpEmpMultiple()
//{
// this.SheetName = "EmpMultipleInfo";
// Add("Employee No", "String", "No");
// this.ItemThreeDateData = null;
// this.FormText = "Upload Multiple Employee Information";
// return this;
//}
//#endregion
//#region EmpGeneral&Contact
//public DataUploadColumnDefinition SetUpEmpGeneralCont()
//{
// this.SheetName = "EmpGeneralInfo";
// Add("Employee No", "String", "No");
// this.ItemThreeDateData = null;
// this.FormText = "Upload General and Contact";
// return this;
//}
//#endregion
//#region EmpGeneral&Contact
//public DataUploadColumnDefinition LineManager()
//{
// this.SheetName = "LineManager";
// Add("EmployeeNo", "String", "No");
// Add("LineManagerNo", "String", "No");
// return this;
//}
//#endregion
#region Column Definition For TaxAdjustData
public DataUploadColumnDefinition EmployeeCardInfo ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "EmpCardInfo" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Card No" , "String" , "No" ) ;
item . Add ( "Assign Date" , "Date" , "No" ) ;
item . Add ( "Expire Date" , "Date" , "Yes" ) ;
item . FormText = "Upload Card Operation Information" ;
// this.FormText = "Upload Employee Card Info";
return item ;
}
//public DataUploadColumnDefinition WPPFAllowanceData()
//{
// this.SheetName = "WPPFAllowance";
// Add("Employee No", "String", "No");
// Add("Amount", "Double", "No");
// //List<TaxAdjustment> types = new List<TaxAdjustment>();
// //types = TaxAdjustment.Get(EnumStatus.Active);
// //ItemOneComboData = new Dictionary<ID, string>();
// //foreach (TaxAdjustment item in types)
// //{
// // ItemOneComboData.Add(item.ID, item.Name);
// //}
// //this.ItemOneComboText = "Adjustment Type :";
// //this.ItemThreeDateData = null;
// //this.FormText = "Upload WPPF AllowanceData Data";
// return this;
//}
#endregion
#region Column Definition For TaxAdjustData
public DataUploadColumnDefinition TaxInvestmentData ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "TaxInvestment" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Amount" , "Double" , "No" ) ;
List < TaxInvestment > types = new List < TaxInvestment > ( ) ;
types = new TaxInvestmentService ( ) . Get ( EnumStatus . Active ) ;
Dictionary < int , string > ItemOneComboData = new Dictionary < int , string > ( ) ;
foreach ( TaxInvestment i in types )
{
ItemOneComboData . Add ( i . ID , i . Name ) ;
}
item . ItemOneComboText = "Investment Type :" ;
item . ItemThreeDateData = null ;
item . FormText = "Upload TaxInvestment Data" ;
return item ;
}
public DataUploadColumnDefinition TaxAdjustData ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "TaxAdjustment" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Amount" , "Double" , "No" ) ;
List < TaxAdjustment > types = new List < TaxAdjustment > ( ) ;
types = new TaxAdjustmentService ( ) . Get ( EnumStatus . Active ) ;
Dictionary < int , string > ItemOneComboData = new Dictionary < int , string > ( ) ;
foreach ( TaxAdjustment taxAdjustment in types )
{
ItemOneComboData . Add ( taxAdjustment . ID , taxAdjustment . Name ) ;
}
item . ItemOneComboText = "Adjustment Type :" ;
item . ItemThreeDateData = null ;
item . FormText = "Upload TaxAdjustment Data" ;
return item ;
}
#endregion
public DataUploadColumnDefinition TaxAdjustmentDataUpload ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "TaxAdjustment" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Amount" , "Double" , "No" ) ;
List < TaxAdjustment > types = new List < TaxAdjustment > ( ) ;
types = new TaxAdjustmentService ( ) . Get ( EnumStatus . Active ) ;
Dictionary < int , string > ItemOneComboData = new Dictionary < int , string > ( ) ;
foreach ( TaxAdjustment i in types )
{
ItemOneComboData . Add ( i . ID , i . Name ) ;
}
item . ItemOneComboText = "Adjustment Type :" ;
item . ItemThreeDateData = null ;
item . FormText = "Upload TaxAdjustment Data" ;
return item ;
}
#region Column Definition For TaxChallanData
public DataUploadColumnDefinition TaxChallanData ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "TaxChallan" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Month" , "Date" , "No" ) ;
item . Add ( "ChallanNo" , "String" , "No" ) ;
item . Add ( "ChallanAmount" , "Double" , "No" ) ;
item . Add ( "EmployeeAmount" , "Double" , "No" ) ;
item . Add ( "BranchCode" , "String" , "No" ) ;
List < TaxParameter > types = new List < TaxParameter > ( ) ;
types = new TaxParameterService ( ) . GetbyPayrolltype ( payrollTypeID ) ;
Dictionary < int , string > ItemOneComboData = new Dictionary < int , string > ( ) ;
foreach ( TaxParameter i in types )
{
ItemOneComboData . Add ( i . ID , i . FiscalYear ) ;
}
item . ItemOneComboText = "Tax Year :" ;
item . ItemThreeDateData = null ;
item . FormText = "Upload TaxChallan Data" ;
return item ;
}
#endregion
//#region CVDocument Uplaod
//public DataUploadColumnDefinition CVMainData()
//{
// this.SheetCollection.Add("CVMain");
// //this.SheetName = "CVMain";
// Add("TrackNo", "String", "No");
// Add("TotalYearOfExperience", "Double", "Yes");
// Add("SpecialSkill", "String", "Yes");
// Add("NationalId", "String", "No");
// Add("Name", "String", "No");
// Add("MotherName", "String", "No");
// Add("MobileNo", "String", "No");
// Add("FileAddress", "String", "Yes");
// Add("FatherName", "String", "No");
// Add("ExpectedMinimumSalary", "Double", "Yes");
// Add("LandPhoneNo", "String", "Yes");
// Add("EmailAddress", "String", "Yes");
// Add("IsFresher", "String", "No");
// Add("ContactAddress", "String", "No");
// Add("ApplicationDate", "Date", "No");
// Add("Designation", "String", "No");
// this.SheetName = "CVMain";
// this.FormText = "Upload CVDocument Data";
// return this;
//}
//public DataUploadColumnDefinition CVExperienceData()
//{
// this.SheetCollection.Add("CVExperience");
// //this.SheetName = "CVExperience";
// Add("ContactNo", "String", "No");
// Add("ContactPerson", "String", "No");
// Add("Employer", "String", "No");
// Add("FromDate", "Date", "Yes");
// Add("ToDate", "Date", "Yes");
// Add("RoleDefination", "String", "Yes");
// this.SheetName = "CVExperience";
// this.FormText = "Upload CVExperience Data";
// return this;
//}
//public DataUploadColumnDefinition CVReferredByData()
//{
// this.SheetCollection.Add("CVReferredBy");
// //this.SheetName = "CVReferredBy";
// Add("Name", "String", "No");
// Add("OtherDetail", "String", "No");
// Add("ReferredBy", "String", "No");
// Add("EmployeeNo", "String", "No");
// this.SheetName = "CVReferredBy";
// this.FormText = "Upload CVReferredBy Data";
// return this;
//}
//public DataUploadColumnDefinition CVEductionalQualificationData()
//{
// this.SheetCollection.Add("CVEductionalQualification");
// //this.SheetName = "CVEductionalQualification";
// Add("Board", "String", "No");
// Add("CgpaOrMarks", "String", "No");
// Add("CgpaOrMarksOutOf", "String", "No");
// Add("DegreeTitle", "String", "No");
// Add("Discipline", "String", "No");
// Add("IsHighestEducation", "String", "No");
// //Add("Name", "String", "No");
// Add("PassingYear", "String", "No");
// Add("Result", "String", "No");
// Add("InstituteName", "String", "No");
// this.SheetName = "CVEductionalQualification";
// this.FormText = "Upload CVEductionalQualification Data";
// return this;
//}
//#endregion
public DataUploadColumnDefinition ObjectiveUploadColumnDefinition ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "Objective Upload" ;
// item.Add("Objective Date", "Date", "No");
item . Add ( "Employee No" , "String" , "No" ) ;
//item.Add("Employee Name", "String", "No");
item . Add ( "KPI Type" , "String" , "No" ) ;
item . Add ( "Weightage" , "Double" , "No" ) ;
item . Add ( "KPI Title" , "String" , "No" ) ;
item . Add ( "KPI Description" , "String" , "No" ) ;
item . Add ( "Start Date" , "Date" , "No" ) ;
item . Add ( "End Date" , "Date" , "No" ) ;
item . Add ( "Employee Mid Year Comment" , "String" , "Yes" ) ;
//item.Add("Employee Mid Year Status", "String", "No");
item . Add ( "LM Mid Year Comment" , "String" , "Yes" ) ;
//item.Add("LM Mid Year Status", "String", "No");
item . ItemThreeDateData = null ;
item . FormText = "Upload Employee Objective" ;
return item ;
}
public DataUploadColumnDefinition SecondLineManagerRatingUploadColumnDefinition ( int payrollTypeID )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "Second LineManager Rating" ;
item . Add ( "Employee No" , "String" , "No" ) ;
item . Add ( "Rating" , "Double" , "No" ) ;
item . ItemThreeDateData = null ;
item . FormText = "Upload Second Line Manager Rating" ;
return item ;
}
#region CV Upload
public DataUploadColumnDefinition CVUploadInfo ( )
{
DataUploadColumnDefinition item = new DataUploadColumnDefinition ( ) ;
item . SheetName = "CV" ;
item . Add ( "Name" , "String" , "No" ) ;
item . Add ( "Email" , "String" , "No" ) ;
item . Add ( "Mobile" , "String" , "Yes" ) ;
//item.Add("BirthDate", "Date", "Yes");
item . Add ( "Education" , "String" , "Yes" ) ;
item . Add ( "Experience" , "String" , "Yes" ) ;
item . Add ( "Skill" , "String" , "Yes" ) ;
//item.Add("Match", "String", "Yes");
item . ItemThreeDateData = null ;
item . FormText = "Upload CV" ;
return item ;
}
#endregion
#region Prepare Upload
public DataUploadColumnDefinition GetColumnDefinition ( int uploadId , int? itemid , int payrollTypeID )
{
DataUploadColumnDefinition item = null ;
this . _payrollTypeID = payrollTypeID ;
switch ( uploadId )
{
case ( int ) EnumRegularDataUpload . Allowance :
item = this . IndividualAllowance ( payrollTypeID ) ;
break ;
//case (int)EnumRegularDataUpload.ExceptionAllowance:
// this.ExceptionAllowance();
// this.FormText = "Upload Exception Allowance Information";
// break;
//case (int)EnumRegularDataUpload.NotApplicableAllowance:
// this.NotApplicableAllowance();
// this.FormText = "Upload Exception Allowance Information";
// break;
case ( int ) EnumRegularDataUpload . LifeCycle :
item = this . lifecycleColumns ( ( int ) itemid ) ;
item . FormText = "Upload Employee Life-Cycle Information" ;
break ;
case ( int ) EnumRegularDataUpload . EmployeeWithBasic :
item = this . getBasicInfoColumns ( ) ;
item . FormText = "Upload Employee Opening Information" ;
break ;
case ( int ) EnumRegularDataUpload . EmployeeRegularUpload :
item = this . getBasicInfoColumns ( ) ;
item . FormText = "Upload Employee Regular Information" ;
break ;
case ( int ) EnumRegularDataUpload . EmployeeProfileUpload :
item = this . getEmployeeProfileUpload ( ) ;
item . FormText = "Upload Employee Mobile-Email info" ;
break ;
//case (int)EnumRegularDataUpload.EmployeeDepartmentBasic:
// this.EmpDeptInfo();
// this.FormText = "Upload Employee Department Information";
// break;
//case (int)EnumRegularDataUpload.LTAdata:
// this.LTAdata();
// this.FormText = "Upload LTA Data";
// break;
//case (int)EnumRegularDataUpload.EmpWorkPlanSetup:
// this.EmpWorkPlanSetup();
// this.FormText = "Upload Employee WorkPlan Setup Data";
// break;
case ( int ) EnumRegularDataUpload . Bonus :
item = this . BonusData ( ) ;
break ;
//case (int)EnumRegularDataUpload.Organogram:
// this.OrganogramData();
// this.FormText = "Upload Organogram Data";
// break;
//case (int)EnumRegularDataUpload.EmpHRData:
// this.HREmpGeneralInfo();
// this.HREmpContactInfo();
// this.HREmpSpouseInfo();
// this.HREmpChildrenInfo();
// this.HREmpExperienceInfo();
// this.HREmpTrainingInfo();
// this.HREmpAcademicInfo();
// this.HREmpReferenceInfo();
// this.HREmpPublicationInfo();
// this.HREmpNomineeInfo();
// this.HREmpHospitalizationInfo();
// this.HREmpLanguageInfo();
// this.HREmpRelativeInfo();
// this.HREmpMemberShipInfo();
// this.HREmpRelationInfo();
// this.HREmpQuestionInfo();
// this.FormText = "Upload HR Employee Data";
// //this.FormText = "Upload Single Employee Information";
// break;
//case (int)EnumRegularDataUpload.EmpAllHRData:
// this.HRAllEmpGeneralInfo();
// this.HRAllEmpContactInfo();
// this.HRAllEmpSpouseInfo();
// this.HRAllEmpChildrenInfo();
// this.HRAllEmpExperienceInfo();
// this.HRAllEmpTrainingInfo();
// this.HRAllEmpAcademicInfo();
// this.HRAllEmpReferenceInfo();
// this.HRAllEmpPublicationInfo();
// this.HRAllEmpNomineeInfo();
// //this.HRAllEmpHospitalizationInfo();
// //this.HREmpGuarantorInfo();
// this.HRAllEmpLanguageInfo();
// this.HRAllEmpRelativeInfo();
// this.HRAllEmpMemberShipInfo();
// this.HRAllEmpRelationInfo();
// // this.HREmpQuestionInfo();
// this.FormText = "Upload Emploee General and Contact";
// break;
//case (int)EnumRegularDataUpload.CVDocument:
// this.CVMainData();
// this.CVExperienceData();
// this.CVReferredByData();
// this.CVEductionalQualificationData();
// this.FormText = "Upload CV Data";
// break;
//case (int)EnumRegularDataUpload.TaxChallan:
// this.TaxChallanData();
// this.FormText = "Upload Tax Challan Data";
// break;
case ( int ) EnumRegularDataUpload . Deduction :
item = this . IndividualDeduction ( payrollTypeID ) ;
break ;
//case (int)EnumRegularDataUpload.EmpDiscontinue:
// break;
case ( int ) EnumRegularDataUpload . EmployeeBankAccount :
item = this . EmpBankAccount ( payrollTypeID ) ;
break ;
//case (int)EnumRegularDataUpload.EmployeeConfirmation:
// break;
//case (int)EnumRegularDataUpload.ESB:
// break;
case ( int ) EnumRegularDataUpload . TaxInvestment :
item = this . TaxInvestmentData ( ) ;
break ;
case ( int ) EnumRegularDataUpload . EmpCardInfo :
item = this . EmployeeCardInfo ( ) ;
//this.FormText = "Upload Employee Card Info";
break ;
case ( int ) EnumRegularDataUpload . Leave :
break ;
case ( int ) EnumRegularDataUpload . OPI :
item = this . OPI ( ) ;
item . FormText = "Upload Employee OPI Data" ;
break ;
case ( int ) EnumRegularDataUpload . SalaryData :
break ;
case ( int ) EnumRegularDataUpload . SalaryRemarks :
break ;
case ( int ) EnumRegularDataUpload . TaxAdjustCurrYear :
item = this . TaxAdjustData ( ) ;
break ;
//case (int)EnumRegularDataUpload.WPPFAllowance:
// this.WPPFAllowanceData();
// this.FormText = "Upload WPPF Allowance Data";
// break;
//case (int)EnumRegularDataUpload.TC:
// break;
//case (int)EnumRegularDataUpload.EmpGradeSalary:
// this.EmpGradeSalary();
// this.FormText = "Upload Employee Grade Salary Assignment";
// break;
case ( int ) EnumRegularDataUpload . EmployeeAttendance :
case ( int ) EnumRegularDataUpload . EmployeeAttendanceLM :
case ( int ) EnumRegularDataUpload . EmployeeAttendanceCordinator :
item = this . EmployeeAttendance ( ) ;
item . SheetName = "EmployeeAttendance" ;
item . FormText = "Upload Employee Attendance Information" ;
break ;
case ( int ) EnumRegularDataUpload . TaxData :
item = this . TaxData ( ) ;
item . SheetName = "TaxOpeningData" ;
item . FormText = "Upload Employee Tax Opening Data" ;
break ;
case ( int ) EnumRegularDataUpload . EmployeeLoan :
item = this . LoanInformation ( ) ;
item . SheetName = "EmployeeLoan" ;
item . FormText = "Upload Employee Loan Information" ;
break ;
//case (int)EnumRegularDataUpload.EmployeeLoanSetup:
// this.SetupLoanInformation();
// this.FormText = "Employee Loan Setup";
// break;
case ( int ) EnumRegularDataUpload . EmpSalaryComponent :
item = this . SetupSalaryComponent ( ) ;
item . SheetName = "Salary Component" ;
item . FormText = "Upload Salary Component Data" ;
break ;
case ( int ) EnumRegularDataUpload . EmpCC :
item = this . SetupEmpCC ( ) ;
item . SheetName = "Employee Costenter" ;
item . FormText = "Upload Employee Costcenter Involvement" ;
break ;
//case (int)EnumRegularDataUpload.EmpVendorCode:
// this.SetupEmpVendorCode();
// this.FormText = "Upload Employee Vendor Code";
// break;
//case (int)EnumRegularDataUpload.EmpSingle:
// this.SetUpEmpSingle();
// this.FormText = "Upload Single Employee Information";
// break;
//case (int)EnumRegularDataUpload.EmpMultiple:
// this.SetUpEmpMultiple();
// this.FormText = "Upload Multiple Employee Information";
// break;
//case (int)EnumRegularDataUpload.EmpGeneralCont:
// this.SetUpEmpGeneralCont();
// this.FormText = "Upload General and Contact";
// break;
case ( int ) EnumRegularDataUpload . PFOpening :
item = this . PFOpeningColumns ( ) ;
item . FormText = "Upload PF Opening Data" ;
break ;
case ( int ) EnumRegularDataUpload . PFYearlyInterest :
item = this . PFYearlyInterestColumns ( ) ;
item . FormText = "Upload PF Yearly Interest Data" ;
break ;
//case (int)EnumRegularDataUpload.OPI_Parameter_Individual:
// this.BeforeProcessOPI();
// this.FormText = "Upload OPI Before Process";
// break;
//case (int)EnumRegularDataUpload.LineManager:
// this.LineManager();
// this.FormText = "Upload Line Manager";
// break;
case ( int ) EnumRegularDataUpload . EmployeeLineManagerUpload :
item = this . LineManagerInfo ( ) ;
item . FormText = "Upload Employee Line Manager Information" ;
break ;
case ( int ) EnumRegularDataUpload . LeaveBalance :
item = this . LeaveBalanceColumnNames ( ) ;
item . FormText = "Upload Leave Balance" ;
break ;
case ( int ) EnumRegularDataUpload . LeaveEncashDays :
item = this . LeaveEncashDaysColumnNames ( ) ;
item . FormText = "Upload Leave Encash Days" ;
break ;
case ( int ) EnumRegularDataUpload . LeaveEntry :
item = this . LeaveEntryColumnNames ( ) ;
item . FormText = "Upload Leave Entry" ;
break ;
case ( int ) EnumRegularDataUpload . LeaveEntryLf : //Only For Li&Fung, enum(int) = 55
item = this . LeaveEntryColumnNamesForLF ( ) ;
item . FormText = "Upload Leave Entry" ;
break ;
case ( int ) EnumRegularDataUpload . AitUpload :
item = this . AitUploadColumnNames ( ) ;
item . FormText = "Upload AIT" ;
break ;
case ( int ) EnumRegularDataUpload . OTImport :
item = this . OTImportColumnName ( payrollTypeID ) ;
item . FormText = "Upload OT" ;
break ;
//case (int)EnumRegularDataUpload.EmpAddressData:
// this.HREmpOnlyContactInfo();
// this.FormText = "Upload Employee Contacts Info";
// break;
//case (int)EnumRegularDataUpload.OrganogramData:
// this.OrganogramDataInfo();
// this.FormText = "Upload Organogram Data";
// break;
case ( int ) EnumRegularDataUpload . EmpWorkplanUpload :
item = this . EmpWorkplanUploadColumnName ( ) ;
break ;
case ( int ) EnumRegularDataUpload . TemporaryShiftAssignmentUpload :
item = this . TemporaryShiftAssignmentUploadColumnName ( ) ;
break ;
case ( int ) EnumRegularDataUpload . CoordinatorUpload :
item = this . CoOrdinatorInfo ( ) ;
item . FormText = "Upload Employee Attendance In Charge" ;
break ;
case ( int ) EnumRegularDataUpload . TaxAdjustmentDataUpload :
item = this . TaxAdjustmentDataUpload ( ) ;
break ;
case ( int ) EnumRegularDataUpload . TaxChallan :
item = this . TaxChallanData ( payrollTypeID ) ;
break ;
case ( int ) EnumRegularDataUpload . TrainingEnrollment :
item = this . getTrainingEnrollment ( ) ;
break ;
case ( int ) EnumRegularDataUpload . TrainingAttendance :
item = this . getTrainingAttendance ( ) ;
break ;
//case (int)EnumRegularDataUpload.TaxChallan:
// item = this.getTrainingAttendance();
// break;
case ( int ) EnumRegularDataUpload . Objective :
item = this . ObjectiveUploadColumnDefinition ( payrollTypeID ) ;
break ;
case ( int ) EnumRegularDataUpload . SecondLineManagerObjectiveRating :
item = this . SecondLineManagerRatingUploadColumnDefinition ( payrollTypeID ) ;
break ;
case ( int ) EnumRegularDataUpload . MemberUpload :
item = this . MemberUpload ( payrollTypeID ) ;
item . FormText = "Upload Fund Member" ;
break ;
case ( int ) EnumRegularDataUpload . GFMemberUpload :
item = this . MemberUpload ( payrollTypeID ) ;
item . FormText = "Upload Gratuity Fund Member" ;
break ;
case ( int ) EnumRegularDataUpload . WPPFMemberUpload :
item = this . MemberUpload ( payrollTypeID ) ;
item . FormText = "Upload Gratuity Fund Member" ;
break ;
case ( int ) EnumRegularDataUpload . MemberLoanScheduleInfoUpload :
item = this . MemberLoanScheduleInfoUpload ( payrollTypeID ) ;
item . FormText = "Member Loan Schedule Info Upload" ;
break ;
case ( int ) EnumRegularDataUpload . MemberLoanOpeningDataUpload :
item = this . MemberOpeningLoanUpload ( payrollTypeID ) ;
item . FormText = "Member Loan Opening Data Upload" ;
break ;
case ( int ) EnumRegularDataUpload . MemberOpeningBalanceUpload :
item = this . MemberOpeningBalanceUpload ( payrollTypeID ) ;
item . FormText = "Member Opening Balance Upload" ;
break ;
case ( int ) EnumRegularDataUpload . MemberContributionUpload :
item = this . MemberContributionUpload ( payrollTypeID ) ;
item . FormText = "Member Contribution Upload" ;
break ;
case ( int ) EnumRegularDataUpload . MemberVoluntaryContributionUpload :
item = this . MemberVoluntaryContributionUpload ( payrollTypeID ) ;
item . FormText = "Member Voluntary Contribution Upload" ;
break ;
case ( int ) EnumRegularDataUpload . ProfitDistributionUpload :
item = this . ProfitDistributionUpload ( payrollTypeID ) ;
item . FormText = "Profit Distribution Upload" ;
break ;
case ( int ) EnumRegularDataUpload . ProfitDistributionUploadWithoutVoucher :
item = this . ProfitVoluntaryDistributionUpload ( payrollTypeID ) ;
item . FormText = "Profit Distribution Upload with Voluntary EPF" ;
break ;
case ( int ) EnumRegularDataUpload . CVUpload :
item = this . CVUploadInfo ( ) ;
break ;
case ( int ) EnumRegularDataUpload . MemberVoluntaryOpeningBalanceUpload :
item = this . MemberVoluntaryOpeningBalanceUpload ( payrollTypeID ) ;
item . FormText = "Member Voluntary Opening Balance Upload" ;
break ;
default :
// this.UploadException(uploadId, this);
break ;
}
item . uploadID = uploadId ;
item . uploadItemID = itemid ;
return item ;
}
#endregion
#region Add Column Name , Data Type , Allow Null Property
#endregion
#region Get Column Names
//public string getColumnNames(DataTable oTable)
//{
// string scolName = "";
// foreach (string col in oTable.Columns)
// {
// scolName = scolName + col + ", ";
// }
// if (scolName.Length > 2)
// scolName = scolName.Substring(0, scolName.Length - 2);
// return scolName;
//}
#endregion
#region Check Null
#endregion
#region Get Column Data Type
#endregion
#region Get Column Index
#endregion
#region Data Validation
public List < UploadErrorOrSuccess > ValidateUploadedData ( DataUploadColumnDefinition columns , DataTable uploadedData )
{
DataUploadValidation ovalidation = new DataUploadValidation ( ) ;
ovalidation . ColumnNameValidation ( columns , uploadedData ) ;
if ( ovalidation . ErrorOrSuccessList . Count > 0 ) return ovalidation . ErrorOrSuccessList ;
ovalidation . ValidateInput ( columns , uploadedData ) ;
return ovalidation . ErrorOrSuccessList ;
}
#endregion
#endregion
#endregion
#endregion
protected override T CreateObject < T > ( Ease . Core . DataAccess . DataReader dr )
{
throw new NotImplementedException ( ) ;
}
}
}