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); } } } } } }
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); } }