Example #1
0
        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);
        }
Example #2
0
        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";
        }
Example #3
0
        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);
        }