public override void InitGridControlDataSource() { CompanyConstantEntities entity = (CompanyConstantEntities)((BaseModuleERP)Screen.Module).CurrentModuleEntity; BindingSource bds = new BindingSource(); bds.DataSource = entity.TimeSheetParamsList; this.DataSource = bds; }
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; } }
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); }
public void RemoveSelectedItemFromWorkingShiftList() { CompanyConstantEntities entity = (CompanyConstantEntities)CurrentModuleEntity; entity.WorkingShiftsList.RemoveSelectedRowObjectFromList(); }
public void RemoveSelectedItemFromTimesheetConfigsList() { CompanyConstantEntities entity = (CompanyConstantEntities)CurrentModuleEntity; entity.TimesheetConfigsList.RemoveSelectedRowObjectFromList(); }
public void RemoveSelectedItemFromOTFactorsList() { CompanyConstantEntities entity = (CompanyConstantEntities)CurrentModuleEntity; entity.OTFactorsList.RemoveSelectedRowObjectFromList(); }
public void RemoveSelectedItemFromFormAllowancesList() { CompanyConstantEntities entity = (CompanyConstantEntities)CurrentModuleEntity; entity.FormAllowancesList.RemoveSelectedRowObjectFromList(); }
public void RemoveSelectedItemFromDisciplineTypesList() { CompanyConstantEntities entity = (CompanyConstantEntities)CurrentModuleEntity; entity.DisciplineTypesList.RemoveSelectedRowObjectFromList(); }
public void InvalidateData() { CompanyConstantEntities entity = (CompanyConstantEntities)CurrentModuleEntity; entity.InvalidateData(); }