public List <ARCustomerPaymentDetailsInfo> GetDefaultPaymentDetails() { List <ARCustomerPaymentDetailsInfo> result = new List <ARCustomerPaymentDetailsInfo>(); ADConfigValuesController objADConfigValuesController = new ADConfigValuesController(); DataSet ds = objADConfigValuesController.GetADConfigValuesByGroup("PaymentMethod"); foreach (DataRow configRow in ds.Tables[0].Rows) { ADConfigValuesInfo objConfigValuesInfo = (ADConfigValuesInfo)objADConfigValuesController.GetObjectFromDataRow(configRow); if (objConfigValuesInfo.ADConfigKeyIsActive) { ARCustomerPaymentDetailsInfo objCustomerPaymentDetailsInfo = new ARCustomerPaymentDetailsInfo(); objCustomerPaymentDetailsInfo.ARCustomerPaymentDetailPaymentMethodType = objConfigValuesInfo.ADConfigKeyValue; objCustomerPaymentDetailsInfo.ARCustomerPaymentDetailPaymentMethodDisplayText = objConfigValuesInfo.ADConfigText; result.Add(objCustomerPaymentDetailsInfo); } } return(result); }
public void repositoryItemLookUpEditComponent_QueryPopUp(object sender, System.ComponentModel.CancelEventArgs e) { LookUpEdit lookUpEdit = (LookUpEdit)sender; ADConfigValuesController objConfigValuesController = new ADConfigValuesController(); List <ADConfigValuesInfo> configValuesList = new List <ADConfigValuesInfo>(); ADConfigValuesInfo objConfigValuesInfo = new ADConfigValuesInfo(); objConfigValuesInfo.ADConfigValueID = 0; DataSet ds = objConfigValuesController.GetADConfigValuesByGroup("EmployeePayrollFormulaSalaryType"); EmployeePayRollFormulaEntities entity = (EmployeePayRollFormulaEntities)((BaseModuleERP)Screen.Module).CurrentModuleEntity; bool check = false; if (ds != null) { if (ds.Tables.Count > 0) { foreach (DataRow row in ds.Tables[0].Rows) { check = false; ADConfigValuesInfo obj = (ADConfigValuesInfo)objConfigValuesController.GetObjectFromDataRow(row); entity.EmployeePayrollFormulaItemsList.ForEach(o => { if (o.HREmployeePayrollFormulaSalaryType == obj.ADConfigKeyValue) { check = true; } }); if (!check) { configValuesList.Add(obj); } } } } if (configValuesList != null) { configValuesList.Insert(0, objConfigValuesInfo); lookUpEdit.Properties.DataSource = configValuesList; } lookUpEdit.Properties.DisplayMember = "ADConfigText"; lookUpEdit.Properties.ValueMember = "ADConfigKeyValue"; }
public void UpdateWorkingSlrAmt() { if (Toolbar.IsNullOrNoneAction()) { return; } EmployeeEntities entity = (EmployeeEntities)CurrentModuleEntity; HREmployeesInfo objEmployeesInfo = (HREmployeesInfo)entity.MainObject; ADConfigValuesController objConfigValuesController = new ADConfigValuesController(); ADConfigValuesInfo objConfigValuesInfo = new ADConfigValuesInfo(); objConfigValuesInfo = objConfigValuesController.GetObjectByConfigKey("DaysPerMonth"); decimal dateWorking = 0; if (objConfigValuesInfo != null) { Decimal.TryParse(objConfigValuesInfo.ADConfigKeyValue, out dateWorking); objEmployeesInfo.HREmployeeWorkingSlrAmt = objEmployeesInfo.HREmployeeWorkingSlrAmtDate * dateWorking; } entity.UpdateMainObjectBindingSource(); }
void gridView_CustomColumnDisplayText(object sender, CustomColumnDisplayTextEventArgs e) { if (e.Column.FieldName == "HREmployeePayrollFormulaSalaryType") { if (e.Value != null) { ADConfigValuesController objConfigValuesController = new ADConfigValuesController(); ADConfigValuesInfo objConfigValuesInfo = new ADConfigValuesInfo(); objConfigValuesInfo = objConfigValuesController.GetObjectByGroupAndValue("EmployeePayrollFormulaSalaryType", e.Value.ToString()); if (objConfigValuesInfo != null) { e.DisplayText = objConfigValuesInfo.ADConfigText; } else { e.DisplayText = ""; } } else { e.DisplayText = ""; } } }
public void InvalidateData() { ADConfigValuesController objConfigValuesController = new ADConfigValuesController(); DataSet ds = objConfigValuesController.GetADConfigValuesByGroup(ConfigValueGroup.RewardType.ToString()); RewardTypesList.Invalidate(ds); ds = objConfigValuesController.GetADConfigValuesByGroup(ConfigValueGroup.DisciplineType.ToString()); DisciplineTypesList.Invalidate(ds); ADWorkingShiftGroupsController objWorkingShiftGroupsController = new ADWorkingShiftGroupsController(); List <ADWorkingShiftGroupsInfo> wsgList = objWorkingShiftGroupsController.GetAllWorkingShiftGroup(); WorkingShiftGroupsList.Invalidate(wsgList); HRFormAllowancesController objFormAllowancesController = new HRFormAllowancesController(); List <HRFormAllowancesInfo> faList = objFormAllowancesController.GetAllFormAllowances(); FormAllowancesList.Invalidate(faList); ADOTFactorsController objOTFactorsController = new ADOTFactorsController(); List <ADOTFactorsInfo> otfList = objOTFactorsController.GetAllOTFactors(); OTFactorsList.Invalidate(otfList); HRTimesheetEmployeeLateConfigsController objTimesheetEmployeeLateConfigsController = new HRTimesheetEmployeeLateConfigsController(); List <HRTimesheetEmployeeLateConfigsInfo> telcList = objTimesheetEmployeeLateConfigsController.GetAllTimesheetEmployeeLateConfigs(); TimesheetEmployeeLateConfigsList.Invalidate(telcList); ADTimesheetConfigsController objTimesheetConfigsController = new ADTimesheetConfigsController(); ds = objTimesheetConfigsController.GetAllObjects(); TimesheetConfigsList.Invalidate(ds); ADWorkingShiftsController objWorkingShiftsController = new ADWorkingShiftsController(); ds = objWorkingShiftsController.GetAllObjects(); WorkingShiftsList.Invalidate(ds); HRTimeSheetParamsController objTimeSheetParamsController = new HRTimeSheetParamsController(); ds = objTimeSheetParamsController.GetAllObjects(); List <HRTimeSheetParamsInfo> list = new List <HRTimeSheetParamsInfo>(); foreach (DataRow row in ds.Tables[0].Rows) { HRTimeSheetParamsInfo objTimeSheetParamsInfo = new HRTimeSheetParamsInfo(); objTimeSheetParamsInfo = (HRTimeSheetParamsInfo)objTimeSheetParamsController.GetObjectFromDataRow(row); objTimeSheetParamsInfo.HRTimeSheetParamValue2 = objTimeSheetParamsInfo.HRTimeSheetParamValue2 * 100; if (!objTimeSheetParamsInfo.IsOTCalculated) { list.Add(objTimeSheetParamsInfo); } } TimeSheetParamsList.Invalidate(list); List <HRTimeSheetParamsInfo> list2 = new List <HRTimeSheetParamsInfo>(); List <HRTimeSheetParamsInfo> lst = objTimeSheetParamsController.GetOTTimeSheetParamsList(); foreach (HRTimeSheetParamsInfo info in lst) { info.HRTimeSheetParamValue2 = info.HRTimeSheetParamValue2 * 100; list2.Add(info); } TimeSheetParam2sList.Invalidate(list2); }