예제 #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";
        }
예제 #3
0
        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();
        }
예제 #4
0
 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 = "";
         }
     }
 }