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); } } } } } }
private void SearchEmployeeInfoForm_Load(object sender, EventArgs e) { cb薪资组.Properties.Items.Clear(); foreach (PayGroup rpg in AccessController.我管理的薪资组) { PayGroup pg = PayGroup.Get(rpg.英文名); if (pg != null) { ImageComboBoxItem item = new ImageComboBoxItem(pg.中文名, rpg.英文名); cb薪资组.Properties.Items.Add(item); } } ImageComboBoxItem all = new ImageComboBoxItem("所有薪资组", ""); cb薪资组.Properties.Items.Add(all); cb薪资组.SelectedItem = all; }
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 cbb日历组_SelectedIndexChanged(object sender, EventArgs e) { cb薪资组.Properties.Items.Clear(); CalRunInfo cal = CalRunInfo.Get((string)cbb日历组.EditValue); if (cal != null) { foreach (string groupId in cal.薪资组列表) { bool enabled = AccessController.CheckPayGroup(groupId); if (enabled) { PayGroup pg = PayGroup.Get(groupId); if (pg != null) { ImageComboBoxItem item = new ImageComboBoxItem(pg.中文名, groupId); cb薪资组.Properties.Items.Add(item); } } } } }