Пример #1
0
        public override void InitGridControlDataSource()
        {
            CompanyConstantEntities entity = (CompanyConstantEntities)((BaseModuleERP)Screen.Module).CurrentModuleEntity;
            BindingSource           bds    = new BindingSource();

            bds.DataSource  = entity.TimeSheetParamsList;
            this.DataSource = bds;
        }
Пример #2
0
        public void SaveTimeSheetParam1()
        {
            CompanyConstantEntities entity = (CompanyConstantEntities)CurrentModuleEntity;

            foreach (HRTimeSheetParamsInfo objTimeSheetParamsInfo in entity.TimeSheetParamsList)
            {
                objTimeSheetParamsInfo.HRTimeSheetParamValue2 = objTimeSheetParamsInfo.HRTimeSheetParamValue2 / 100;
                if (objTimeSheetParamsInfo.HRTimeSheetParamID == 0)
                {
                    objTimeSheetParamsInfo.IsDefault = false;
                }
                objTimeSheetParamsInfo.IsOTCalculated = false;
            }
            entity.TimeSheetParamsList.SaveItemObjects();
            foreach (HRTimeSheetParamsInfo timeSheetParam in entity.TimeSheetParamsList)
            {
                timeSheetParam.HRTimeSheetParamValue2 = timeSheetParam.HRTimeSheetParamValue2 * 100;
            }
        }
Пример #3
0
        public bool SaveConfigValues(String strGroup)
        {
            CompanyConstantEntities       entity       = (CompanyConstantEntities)CurrentModuleEntity;
            VinaList <ADConfigValuesInfo> configValues = null;

            if (strGroup == ConfigValueGroup.RewardType.ToString())
            {
                configValues = entity.RewardTypesList;
            }
            else if (strGroup == ConfigValueGroup.DisciplineType.ToString())
            {
                configValues = entity.DisciplineTypesList;
            }
            if (configValues != null)
            {
                foreach (ADConfigValuesInfo objConfigValuesInfo in configValues)
                {
                    if (objConfigValuesInfo.ADConfigValueID == 0)
                    {
                        objConfigValuesInfo.ADConfigKeyGroup = strGroup;
                        objConfigValuesInfo.ADConfigKeyValue = VinaApp.ConvertUnicodeStringToUnSign(objConfigValuesInfo.ADConfigText)
                                                               .Replace(" ", string.Empty);
                        objConfigValuesInfo.ADConfigKey = string.Format("{0}{1}", strGroup, objConfigValuesInfo.ADConfigKeyValue);
                    }
                }
                configValues.SaveItemObjects();
            }

            if (VinaUtil.ADConfigValueUtility.ContainsKey(strGroup))
            {
                VinaUtil.ADConfigValueUtility.Remove(strGroup);
            }

            VinaUtil.ADConfigValueUtility.Add(strGroup, configValues);
            XtraMessageBox.Show("Luu thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            return(true);
        }
Пример #4
0
        public void RemoveSelectedItemFromWorkingShiftList()
        {
            CompanyConstantEntities entity = (CompanyConstantEntities)CurrentModuleEntity;

            entity.WorkingShiftsList.RemoveSelectedRowObjectFromList();
        }
Пример #5
0
        public void RemoveSelectedItemFromTimesheetConfigsList()
        {
            CompanyConstantEntities entity = (CompanyConstantEntities)CurrentModuleEntity;

            entity.TimesheetConfigsList.RemoveSelectedRowObjectFromList();
        }
Пример #6
0
        public void RemoveSelectedItemFromOTFactorsList()
        {
            CompanyConstantEntities entity = (CompanyConstantEntities)CurrentModuleEntity;

            entity.OTFactorsList.RemoveSelectedRowObjectFromList();
        }
Пример #7
0
        public void RemoveSelectedItemFromFormAllowancesList()
        {
            CompanyConstantEntities entity = (CompanyConstantEntities)CurrentModuleEntity;

            entity.FormAllowancesList.RemoveSelectedRowObjectFromList();
        }
Пример #8
0
        public void RemoveSelectedItemFromDisciplineTypesList()
        {
            CompanyConstantEntities entity = (CompanyConstantEntities)CurrentModuleEntity;

            entity.DisciplineTypesList.RemoveSelectedRowObjectFromList();
        }
Пример #9
0
        public void InvalidateData()
        {
            CompanyConstantEntities entity = (CompanyConstantEntities)CurrentModuleEntity;

            entity.InvalidateData();
        }