protected void LoadData() { string accType = cb账户类型.EditValue as string; string calRunId = cbb日历组.EditValue as string; CreateWaitDialog("正在查询...", "请稍等"); List <PrivateSalary> rows = new List <PrivateSalary>(); string errMsg = ""; foreach (PayGroup payGroup in myPayGroupList) { SalaryAuditingResult checkInfo = SalaryAuditingResult.GetSalaryAuditingResult(payGroup.英文名, calRunId); if (checkInfo != null) { if (checkInfo.已审核) { rows.AddRange(PrivateSalary.GetPrivateSalarys(payGroup.英文名, calRunId)); continue; } else { errMsg = String.Format("薪资组【{0}】的工资表未审核\n", payGroup.中文名); } } } if (errMsg != "") { CloseWaitDialog(); MessageBox.Show(errMsg, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } //生成报盘记录 currRows = rows; //排序 currRows = currRows.OrderBy(a => a.基础工资表.财务公司).ThenBy(a => a.基础工资表.财务部门序号).ThenBy(a => a.基础工资表.员工序号).ToList(); CreateWaitDialog("正在加载...", "请稍等"); pivotGridControl1.DataSource = currRows; CloseWaitDialog(); CalRunInfo cal = CalRunInfo.Get(calRunId); 当前期间 = String.Format("{0}年{1}", cal.年度, cal.月份) + "月"; 当前账号 = cb账户类型.Text; }
public PayCounter(SalaryAuditingResult sar) { this.审核情况表 = sar; this.薪资组 = sar.薪资组; this.日历组 = sar.日历组; CalRunInfo cal = CalRunInfo.Get(sar.日历组); this.年 = cal.年度; this.月 = cal.月份; this.期间_开始 = cal.开始日期; this.期间_结束 = cal.结束日期; this.放弃年休假记录表 = WaiveAnnualVacation.GetAll(this.年, this.月); }
protected void LoadData(string searchScope) { string calRunId = cbb日历组.EditValue as string; CreateWaitDialog("正在查询...", "请稍等"); List <PrivateSalary> rows = new List <PrivateSalary>(); foreach (PayGroup payGroup in AccessController.我管理的薪资组) { SalaryAuditingResult checkInfo = SalaryAuditingResult.GetSalaryAuditingResult(payGroup.英文名, calRunId); if (checkInfo != null) { rows.AddRange(PrivateSalary.GetPrivateSalarys(payGroup.英文名, calRunId)); } } switch (searchScope) { case "按发放单位": rows = rows.FindAll(a => a.基础工资表.财务公司 == (string)ccb发放单位.EditValue); break; case "按所属公司": rows = rows.FindAll(a => a.基础工资表.财务公司 == (string)ccb发放单位.EditValue && a.基础工资表.公司名称 == (string)ccb所属公司.EditValue); break; default: break; } //排序 rows = rows.OrderBy(a => a.基础工资表.财务公司).ThenBy(a => a.基础工资表.财务部门序号).ThenBy(a => a.基础工资表.员工序号).ToList(); CreateWaitDialog("正在加载...", "请稍等"); report.DataSource = rows; report.CreateDocument(true); CloseWaitDialog(); CalRunInfo cal = CalRunInfo.Get(calRunId); 当前期间 = String.Format("{0}年{1}", cal.年度, cal.月份) + "月"; }
private void btn计算表对比_Click(object sender, EventArgs e) { if (cb薪资组.SelectedItem != null) { CalRunInfo cal = CalRunInfo.Get((string)cbb日历组.EditValue); if (cal != null) { PayChangedList form = new PayChangedList(cal.年度, cal.月份, (string)cb薪资组.EditValue, cb薪资组.Text); form.ShowDialog(); } else { MessageBox.Show("指定的日历组不存在。", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("请选择要对比的薪资组。", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
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); } } } } }