void Init() { myPayGroupList.Clear(); myCalRunList.Clear(); DateTime end = DateTime.Today; DateTime start = end.AddMonths(-MyHelper.LatestMonths); //最近三个月 foreach (CalRunInfo cal in CalRunInfo.GetList(start, end)) { foreach (string groupId in cal.薪资组列表) { bool enabled = AccessController.CheckPayGroup(groupId); if (enabled) { PayGroup pg = PayGroup.Get(groupId); if (pg != null) { if (myPayGroupList.Find(a => a.英文名 == pg.英文名) == null) { myPayGroupList.Add(pg); } if (myCalRunList.Find(a => a.日历组编号 == cal.日历组编号) == null) { myCalRunList.Add(cal); } } } } } ccb发放单位.Properties.Items.Clear(); foreach (DictionaryEntry entry in PsHelper.GetCompanyTable()) { ImageComboBoxItem item = new ImageComboBoxItem((string)entry.Key, (string)entry.Key); ccb发放单位.Properties.Items.Add(item); } ccb所属公司.Properties.Items.Clear(); foreach (DictionaryEntry entry in PsHelper.GetCompanyTable()) { ImageComboBoxItem item = new ImageComboBoxItem((string)entry.Key, (string)entry.Key); ccb所属公司.Properties.Items.Add(item); } }
private void EditEmployeeQueryPowerForm_Load(object sender, EventArgs e) { this.Text = "查询权限录入 - " + (this.是验证录入 ? "验证录入" : "初次录入"); repositoryItemImageComboBox1.Items.Clear(); foreach (DictionaryEntry entry in PsHelper.GetCompanyTable()) { ImageComboBoxItem item = new ImageComboBoxItem(); item.Description = (string)entry.Key; item.Value = (string)entry.Value; repositoryItemImageComboBox1.Items.Add(item); } repositoryItemImageComboBox2.Items.Clear(); foreach (DictionaryEntry entry in PsHelper.GetSupvLvls()) { ImageComboBoxItem item = new ImageComboBoxItem(); item.Description = (string)entry.Key; item.Value = (string)entry.Value; repositoryItemImageComboBox2.Items.Add(item); } LoadData(); }