示例#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);
        }
示例#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";
        }