/// <summary> /// 调用方需要调用 得到List /// </summary> /// <returns></returns> public List <M_ProgramFile.LeaderSign> UCGetHQList() { UCHQList = new List <M_ProgramFile.LeaderSign>(); M_ProgramFile.LeaderSign info = new M_ProgramFile.LeaderSign(); for (int i = 0; i < PlaceHolder1.Controls.Count; i++) { info = new M_ProgramFile.LeaderSign(); if ((this.PlaceHolder1.Controls[i].FindControl("drpUser") as DropDownList).SelectedValue != "") { info.TBID = (this.PlaceHolder1.Controls[i].FindControl("lblTBID") as Label).Text; //主键ID info.ID = (this.PlaceHolder1.Controls[i].FindControl("drpUser") as DropDownList).SelectedValue; //会签人帐号 info.Name = (this.PlaceHolder1.Controls[i].FindControl("drpUser") as DropDownList).SelectedItem.Text; //会签人 info.IsAgree = (this.PlaceHolder1.Controls[i].FindControl("lblTongYi") as Label).Text; //是否同意 info.Date = SysConvert.ToDateTime((this.PlaceHolder1.Controls[i].FindControl("lblDate1") as Label).ToolTip); //会签日期 info.Comment = (this.PlaceHolder1.Controls[i].FindControl("lblYiJian") as Label).ToolTip; //意见 //info.DealCondition = (this.PlaceHolder1.Controls[i].FindControl("lblDealCondition") as Label).Text; //落实情况 info.DealDate = SysConvert.ToDateTime((this.PlaceHolder1.Controls[i].FindControl("lblDate2") as Label).Text); //落实日期 Repeater rptDetialInfo = this.PlaceHolder1.Controls[i].FindControl("rptCurrentList") as Repeater; //主键ID List <B_PF.DetailInfo> detailInfoList = new List <M_ProgramFile.DetailInfo>(); foreach (RepeaterItem itm in rptDetialInfo.Items) { B_PF.DetailInfo detailInfo = new B_PF.DetailInfo(); Label lblDealCondition = itm.FindControl("lblDealCondition") as Label; Label lblContent = itm.FindControl("lblContent") as Label; detailInfo.Comment = lblContent.Text; detailInfo.DealCondition = lblDealCondition.Text; detailInfoList.Add(detailInfo); } info.DetailInfoList = detailInfoList;//意见落实情况 UCHQList.Add(info); } } return(UCHQList); }
private void BindData() { if (UCHQList.Count > 0) { M_ProgramFile.LeaderSign info = new M_ProgramFile.LeaderSign(); for (int i = 0; i < UCHQList.Count; i++) { info = (M_ProgramFile.LeaderSign)UCHQList[i]; Count++; LoadUserControl(false, Count); //TBID Label lblTBID = this.PlaceHolder1.Controls[i].FindControl("lblTBID") as Label; lblTBID.Text = info.TBID; //会签人ID DropDownList drpUser = PlaceHolder1.Controls[i].FindControl("drpUser") as DropDownList; Label lbUser = PlaceHolder1.Controls[i].FindControl("lbUser") as Label; lbUser.Text = info.Name; FormsMethod.SelectedDropDownList(drpUser, info.ID, info.Name); //是否同意 Label lblTongYi = this.PlaceHolder1.Controls[i].FindControl("lblTongYi") as Label; lblTongYi.Text = info.IsAgree; if (!string.IsNullOrEmpty(info.IsAgree)) { drpUser.Enabled = false; drpUser.CssClass = "dropdownlist_blue"; }//已通过会签则不可重新选择 //会签日期 Label lblDate1 = this.PlaceHolder1.Controls[i].FindControl("lblDate1") as Label; if (info.Date != DateTime.MinValue) { lblDate1.Text = info.Date.ToString(DateFormat); lblDate1.ToolTip = info.Date.ToString(); lbUser.Text = info.Name; lbUser.Visible = true; drpUser.Visible = false; } else { lblDate1.Text = ""; lbUser.Visible = false; drpUser.Visible = true; } //意见 Label lblYiJian = this.PlaceHolder1.Controls[i].FindControl("lblYiJian") as Label; lblYiJian.ToolTip = info.Comment; lblYiJian.Text = SysString.TruncationString(info.Comment, 20); ////落实情况 //TextBox txtDealCondition = this.PlaceHolder1.Controls[i].FindControl("txtDealCondition") as TextBox; //txtDealCondition.Text = info.DealCondition; HiddenField hfLuoShi = this.PlaceHolder1.Controls[i].FindControl("hfLuoShi") as HiddenField; hfLuoShi.Value = info.DealCondition; //处理落实日期 Label lblDate2 = this.PlaceHolder1.Controls[i].FindControl("lblDate2") as Label; if (info.DealDate != DateTime.MinValue) { lblDate2.Text = info.DealDate.ToShortDateString(); } else { lblDate2.Text = ""; } //绑定会签意见、落实情况// Repeater rptCurrentList = this.PlaceHolder1.Controls[i].FindControl("rptCurrentList") as Repeater;//主键ID Label lblComment = this.PlaceHolder1.Controls[i].FindControl("lblComment") as Label; lblComment.Text = SysString.TruncationString(info.Comment, 20); List<CYiJian> yiJianList = new List<CYiJian>(); foreach (B_PF.DetailInfo detailInfo in info.DetailInfoList) { CYiJian yiJian = new CYiJian(); yiJian.Content = detailInfo.Comment; yiJian.DealCondition = detailInfo.DealCondition; yiJian.FinishTime = info.Date.ToString(); yiJian.ID = info.TBID; yiJian.ViewName = ProcessConstString.StepName.ProgramFile.STEP_LEADERSIGN; yiJian.UserName = info.Name; yiJian.UserID = info.ID; yiJianList.Add(yiJian); } rptCurrentList.DataSource = yiJianList; rptCurrentList.DataBind(); if (!this.IsHistory && this.UCReceiveUserID == info.ID) { lblDate1.Visible = false; lblYiJian.Visible = false; lblTongYi.Visible = false; lblComment.Visible = false; } } } HiddenField hfLeaderSignCount = this.Parent.Parent.FindControl("hfLeaderSignCount") as HiddenField; if (hfLeaderSignCount != null) { hfLeaderSignCount.Value = UCHQList.Count.ToString(); } }
/// <summary> /// 调用方需要调用 得到List /// </summary> /// <returns></returns> public List<M_ProgramFile.LeaderSign> UCGetHQList() { UCHQList = new List<M_ProgramFile.LeaderSign>(); M_ProgramFile.LeaderSign info = new M_ProgramFile.LeaderSign(); for (int i = 0; i < PlaceHolder1.Controls.Count; i++) { info = new M_ProgramFile.LeaderSign(); if ((this.PlaceHolder1.Controls[i].FindControl("drpUser") as DropDownList).SelectedValue != "") { info.TBID = (this.PlaceHolder1.Controls[i].FindControl("lblTBID") as Label).Text;//主键ID info.ID = (this.PlaceHolder1.Controls[i].FindControl("drpUser") as DropDownList).SelectedValue; //会签人帐号 info.Name = (this.PlaceHolder1.Controls[i].FindControl("drpUser") as DropDownList).SelectedItem.Text; //会签人 info.IsAgree = (this.PlaceHolder1.Controls[i].FindControl("lblTongYi") as Label).Text; //是否同意 info.Date = SysConvert.ToDateTime((this.PlaceHolder1.Controls[i].FindControl("lblDate1") as Label).ToolTip); //会签日期 info.Comment = (this.PlaceHolder1.Controls[i].FindControl("lblYiJian") as Label).ToolTip; //意见 //info.DealCondition = (this.PlaceHolder1.Controls[i].FindControl("lblDealCondition") as Label).Text; //落实情况 info.DealDate = SysConvert.ToDateTime((this.PlaceHolder1.Controls[i].FindControl("lblDate2") as Label).Text); //落实日期 Repeater rptDetialInfo = this.PlaceHolder1.Controls[i].FindControl("rptCurrentList") as Repeater;//主键ID List<B_PF.DetailInfo> detailInfoList = new List<M_ProgramFile.DetailInfo>(); foreach (RepeaterItem itm in rptDetialInfo.Items) { B_PF.DetailInfo detailInfo = new B_PF.DetailInfo(); Label lblDealCondition = itm.FindControl("lblDealCondition") as Label; Label lblContent = itm.FindControl("lblContent") as Label; detailInfo.Comment = lblContent.Text; detailInfo.DealCondition = lblDealCondition.Text; detailInfoList.Add(detailInfo); } info.DetailInfoList = detailInfoList;//意见落实情况 UCHQList.Add(info); } } return UCHQList; }
private void Print_OnExtraExport(object sender, EventArgs e) { if (m_print == null || m_Entity == null) { return; } Print print = new Print(); switch (m_print.FileName) { case "程序审查意见落实表": m_print.BatchAddPicture("程序文件", "程序审查意见落实表", m_Entity); break; case "程序文件表单": m_print.BatchAddPicture("程序文件", "程序文件表单", m_Entity); break; case "管理程序封面模板": m_print.BatchAddPicture("程序文件", "管理程序封面模板", m_Entity); break; } switch (m_print.FileName) { case "程序文件表单": //Print print = new Print(); // 批准人 m_print.Write("操作人", m_Entity.ApproveName, WordMgr.WriteMode.Down, 1); m_print.Write("同意/否决", m_Entity.ApproverIsAgree, WordMgr.WriteMode.Down, 1); m_print.Write("意见", GetPFComment(ProcessConstString.StepName.ProgramFile.STEP_APPROVE, m_Entity.ApproveComment), WordMgr.WriteMode.Down, 1); if (string.IsNullOrEmpty(lblApproveDate.Text)) { m_print.Write("日期", GetLastDate(m_print, ProcessConstString.StepName.ProgramFile.STEP_APPROVE) /*m_print.CheckDateTime(m_Entity.ApproveDate.ToShortDateString())*/, WordMgr.WriteMode.Down, 1); } else { m_print.Write("日期", m_print.CheckDateTime(lblApproveDate.Text.ToString()), WordMgr.WriteMode.Down, 1); } // 质保审查 if (m_Entity.ProgramSort != "工作程序") { m_print.Write("操作人", m_Entity.QualityNames, WordMgr.WriteMode.Down, 2); m_print.Write("同意/否决", m_Entity.QualityIsAgree, WordMgr.WriteMode.Down, 2); m_print.Write("意见", GetPFComment(ProcessConstString.StepName.ProgramFile.STEP_QG, m_Entity.QualityComment), WordMgr.WriteMode.Down, 2); if (string.IsNullOrEmpty(lblQGDate.Text)) { m_print.Write("日期", GetLastDate(m_print, ProcessConstString.StepName.ProgramFile.STEP_QG), WordMgr.WriteMode.Down, 2); } else { m_print.Write("日期", m_print.CheckDateTime(lblQGDate.Text.ToString()), WordMgr.WriteMode.Down, 2); } } // 审核 m_print.Write("操作人", m_Entity.AuditName, WordMgr.WriteMode.Down, 3); m_print.Write("同意/否决", m_Entity.AuditorIsAgree, WordMgr.WriteMode.Down, 3); m_print.Write("意见", GetPFComment(ProcessConstString.StepName.ProgramFile.STEP_AUDIT, m_Entity.AuditComment), WordMgr.WriteMode.Down, 3); if (string.IsNullOrEmpty(lblAuditDate.Text)) { m_print.Write("日期", GetLastDate(m_print, ProcessConstString.StepName.ProgramFile.STEP_AUDIT), WordMgr.WriteMode.Down, 3); } else { m_print.Write("日期", m_print.CheckDateTime(lblAuditDate.Text.ToString()), WordMgr.WriteMode.Down, 3); } // 校对 m_print.Write("操作人", m_Entity.CheckName, WordMgr.WriteMode.Down, 4); m_print.Write("同意/否决", m_Entity.CheckerIsAgree, WordMgr.WriteMode.Down, 4); m_print.Write("意见", GetPFComment(ProcessConstString.StepName.ProgramFile.STEP_CHECK, m_Entity.CheckComment), WordMgr.WriteMode.Down, 4); if (string.IsNullOrEmpty(lblCheckDate.Text)) { m_print.Write("日期", GetLastDate(m_print, ProcessConstString.StepName.ProgramFile.STEP_CHECK), WordMgr.WriteMode.Down, 4); } else { m_print.Write("日期", m_print.CheckDateTime(lblCheckDate.Text.ToString()), WordMgr.WriteMode.Down, 4); } // 编写 m_print.Write("操作人", m_Entity.WriteName, WordMgr.WriteMode.Down, 5); m_print.Write("同意/否决", m_Entity.WriterIsAgree, WordMgr.WriteMode.Down, 5); m_print.Write("意见", GetPFComment(ProcessConstString.StepName.ProgramFile.STEP_WRITE, m_Entity.WriteComment), WordMgr.WriteMode.Down, 5); //M_20100414 huangqi des:编写时间改为FirstDraftDate //begin if (m_Entity.FirstDraftDate == DateTime.MinValue) //string.IsNullOrEmpty(lblWriteDate.Text)) { if (m_Entity.DraftDate == DateTime.MinValue) { ucPrint.Write("日期", "", WordMgr.WriteMode.Down, 5); } else { ucPrint.Write("日期", m_Entity.DraftDate.ToShortDateString(), WordMgr.WriteMode.Down, 5); } } else { m_print.Write("日期", m_Entity.FirstDraftDate.ToShortDateString(), WordMgr.WriteMode.Down, 5); } //end //////////////////////////////////////////////////////////////////////////////////////// ArrayList al1 = new ArrayList(); if (m_Entity.DeptSignList == null) { goto LEADERSIGN; } for (int i = 0; i < m_Entity.DeptSignList.Count; i++) { ArrayList tmp = new ArrayList(); M_ProgramFile.DeptSign item = m_Entity.DeptSignList[i]; tmp.Add(item.DeptName); tmp.Add(item.Name); tmp.Add(item.IsAgree); tmp.Add(m_print.CheckDateTime(item.SubmitDate.ToShortDateString())); tmp.Add(item.Comment); tmp.Add(item.DealCondition); tmp.Add(m_print.CheckDateTime(item.DealDate.ToShortDateString())); al1.Add(tmp); } //al1.AddRange(m_Entity.DeptSignList); m_print.WriteTable(2, al1); ////////////////////////////////////////////////////////////////////////////////////////// LEADERSIGN: ArrayList al2 = new ArrayList(); if (m_Entity.LeaderSignList == null) { break; } for (int i = 0; i < m_Entity.LeaderSignList.Count; i++) { ArrayList tmp = new ArrayList(); M_ProgramFile.LeaderSign item = m_Entity.LeaderSignList[i]; tmp.Add(item.Name); tmp.Add(item.IsAgree); tmp.Add(m_print.CheckDateTime(item.Date.ToShortDateString())); tmp.Add(item.Comment); tmp.Add(item.DealCondition); tmp.Add(m_print.CheckDateTime(item.DealDate.ToShortDateString())); al2.Add(tmp); } //al2.AddRange(m_Entity.LeaderSignList); m_print.WriteTable(3, al2); break; case "程序审查意见落实表": ArrayList al22 = new ArrayList(); al22 = GeneratorTableData(2, m_Entity); m_print.WriteTable(2, al22); ArrayList al3 = new ArrayList(); al3 = GeneratorTableData(3, m_Entity); m_print.WriteTable(3, al3); //ArrayList al5 = new ArrayList(); //al5 = GeneratorTableData(5, m_Entity); //m_print.WriteTable(5, al5); break; case "管理程序封面模板": ArrayList alPage1 = new ArrayList(); ArrayList newarr = new ArrayList(); ArrayList childarr = new ArrayList(); alPage1 = GeneratorTableDataEx(m_print, 2, m_Entity); int curr = -1; for (int i = 0; i < alPage1.Count; i++) { for (int j = 0; j < 6; j++) { newarr.Add((alPage1[i] as ArrayList)[j].ToString()); if ((alPage1[i] as ArrayList)[j].ToString() == "质量保证处") { curr = i * 6 + j; } } } if (curr != -1) { childarr.Add(newarr[curr].ToString()); childarr.Add(newarr[curr + 1].ToString()); childarr.Add(newarr[curr + 2].ToString()); newarr.RemoveRange(curr, 3); newarr.Insert(0, childarr[0].ToString()); newarr.Insert(1, childarr[1].ToString()); newarr.Insert(2, childarr[2].ToString()); alPage1 = new ArrayList(); for (int k = 0; k < newarr.Count; k += 6) { childarr = new ArrayList(); childarr.Add(newarr[k].ToString()); childarr.Add(newarr[k + 1].ToString()); childarr.Add(newarr[k + 2].ToString()); childarr.Add(newarr[k + 3].ToString()); childarr.Add(newarr[k + 4].ToString()); childarr.Add(newarr[k + 5].ToString()); alPage1.Add(childarr); } } m_print.WriteTable(2, alPage1); ArrayList alPage2 = new ArrayList(); alPage2 = GeneratorTableDataEx(m_print, 3, m_Entity); m_print.WriteTable(3, alPage2); ArrayList alPage3 = new ArrayList(); alPage3 = GeneratorTableDataEx(m_print, 5, m_Entity); m_print.WriteTable(5, alPage3); string[] value = { m_Entity.DocumentTitle, m_Entity.ProgramCode, m_Entity.Edition }; m_print.WriteHeaderFooter("程序名称", value, WordMgr.WriteMode.Shift); if (alPage1.Count == 0) { m_print.DeleteString("部门会签表(排列不分先后)"); m_print.DeleteTable(2); if (alPage2.Count == 0) { m_print.DeleteString("公司领导审定"); m_print.DeleteTable(2); if (!m_Entity.IsProgramCompanCheck) { m_print.DeleteString("中国核电工程有限公司会签"); m_print.DeleteTable(2); } } } else if (alPage2.Count == 0) { m_print.DeleteString("公司领导审定"); m_print.DeleteTable(3); if (!m_Entity.IsProgramCompanCheck) { m_print.DeleteString("中国核电工程有限公司会签"); m_print.DeleteTable(3); } } else { if (!m_Entity.IsProgramCompanCheck) { m_print.DeleteString("中国核电工程有限公司会签"); m_print.DeleteTable(4); } } break; } }
private ArrayList GeneratorTableData(int TblIndex, B_PF cEntity)//任金权 修改 { ArrayList al = new ArrayList(); B_PF pf = new B_PF(); switch (TblIndex) { case 2: List <M_ProgramFile.DeptSign> Dhqlist = new List <M_ProgramFile.DeptSign>(); Dhqlist = this.ucBuMenHuiQian.UCGetHQList(); for (int i = 0; i < Dhqlist.Count; i++) { M_ProgramFile.DeptSign item = Dhqlist[i]; foreach (B_PF.YiJian yijian in pf.GetSignComment(base.ProcessID, base.WorkItemID, ProcessConstString.StepName.ProgramFile.STEP_DEPTSIGN, item.ID, string.Empty)) { ArrayList tmp = new ArrayList(); tmp.Add(item.DeptName); tmp.Add(yijian.Content); tmp.Add(yijian.DealCondition); al.Add(tmp); } } ArrayList tmpEx = new ArrayList(); string lsqkdeptyijian = string.Empty; string lsqkdeptyijianluoshi = string.Empty; foreach (B_PF.YiJian yijian in pf.GetSignComment(base.ProcessID, base.WorkItemID, ProcessConstString.StepName.ProgramFile.STEP_QG, this.wfQualityIDs.Text, string.Empty)) { //lsqkdeptyijian += yijian.Content + "\r\a"; //lsqkdeptyijianluoshi += yijian.DealCondition + "\r\a"; tmpEx = new ArrayList(); tmpEx.Add("质量保证处"); tmpEx.Add(yijian.Content); tmpEx.Add(yijian.DealCondition); al.Add(tmpEx); } break; case 3: List <M_ProgramFile.LeaderSign> lhqlist = new List <M_ProgramFile.LeaderSign>(); lhqlist = this.ucLDHuiQian.UCGetHQList(); for (int i = 0; i < lhqlist.Count; i++) { M_ProgramFile.LeaderSign item = lhqlist[i]; foreach (B_PF.YiJian yijian in pf.GetSignComment(base.ProcessID, base.WorkItemID, ProcessConstString.StepName.ProgramFile.STEP_LEADERSIGN, item.ID, string.Empty)) { ArrayList tmp = new ArrayList(); tmp.Add(yijian.UserName); tmp.Add(yijian.Content); tmp.Add(yijian.DealCondition); al.Add(tmp); } } tmpEx = new ArrayList(); string lsqkpeopleyijian = string.Empty; string lsqkpeopleyijianluoshi = string.Empty; if (!string.IsNullOrEmpty(this.ddlApprove.SelectedValue)) { foreach (B_PF.YiJian yijian in pf.GetSignComment(base.ProcessID, base.WorkItemID, ProcessConstString.StepName.ProgramFile.STEP_APPROVE, this.ddlApprove.SelectedValue, string.Empty)) { //lsqkpeopleyijian += yijian.Content + "\r\a"; //lsqkpeopleyijianluoshi += yijian.DealCondition + "\r\a"; tmpEx = new ArrayList(); tmpEx.Add(yijian.UserName); tmpEx.Add(yijian.Content); tmpEx.Add(yijian.DealCondition); al.Add(tmpEx); } } break; case 5: if (cEntity.DeptSignList == null) { break; } for (int i = 0; i < cEntity.DeptSignList.Count; i++) { ArrayList tmp = new ArrayList(); M_ProgramFile.DeptSign item = cEntity.DeptSignList[i]; if (string.IsNullOrEmpty(item.Comment)) { continue; } tmp.Add(item.DeptName); tmp.Add(item.Comment); tmp.Add(item.DealCondition); al.Add(tmp); } break; } return(al); }
private ArrayList GeneratorTableDataEx(UC_Print ucPrint, int TblIndex, B_PF cEntity) { ArrayList al = new ArrayList(); ArrayList tmp = new ArrayList(); switch (TblIndex) { case 2: if (cEntity.DeptSignList == null) { break; } //lsqkdeptyijian += yijian.Content + "\r\a"; //lsqkdeptyijianluoshi += yijian.DealCondition + "\r\a"; for (int i = 0; i < cEntity.DeptSignList.Count; i += 2) { tmp = new ArrayList(); M_ProgramFile.DeptSign item = cEntity.DeptSignList[i]; tmp.Add(item.DeptName); tmp.Add(item.Name); tmp.Add(ucPrint.CheckDateTime(item.SubmitDate.ToShortDateString())); if (cEntity.DeptSignList.Count <= i + 1) { tmp.Add(""); tmp.Add(""); tmp.Add(""); al.Add(tmp); return(al); } item = cEntity.DeptSignList[i + 1]; tmp.Add(item.DeptName); tmp.Add(item.Name); tmp.Add(ucPrint.CheckDateTime(item.SubmitDate.ToShortDateString())); al.Add(tmp); } break; case 3: if (cEntity.LeaderSignList == null) { break; } for (int i = 0; i < cEntity.LeaderSignList.Count; i++) { tmp = new ArrayList(); M_ProgramFile.LeaderSign item = cEntity.LeaderSignList[i]; tmp.Add(item.Name); tmp.Add(ucPrint.CheckDateTime(item.Date.ToShortDateString())); al.Add(tmp); } break; case 5: List <B_PF.ProgramFile> lst = B_PF.GetProgramFileEditionHistory(cEntity.ProgramCode, cEntity.ProgramFileID); if (lst == null) { break; } for (int i = 0; i < lst.Count; i++) { tmp = new ArrayList(); tmp.Add(lst[i].Edition); tmp.Add(lst[i].Writer); tmp.Add(lst[i].Approver); tmp.Add(ucPrint.CheckDateTime(lst[i].FinishTime.ToShortDateString())); tmp.Add(lst[i].Reason); al.Add(tmp); } break; } return(al); }
private void BindData() { if (UCHQList.Count > 0) { M_ProgramFile.LeaderSign info = new M_ProgramFile.LeaderSign(); for (int i = 0; i < UCHQList.Count; i++) { info = (M_ProgramFile.LeaderSign)UCHQList[i]; Count++; LoadUserControl(false, Count); //TBID Label lblTBID = this.PlaceHolder1.Controls[i].FindControl("lblTBID") as Label; lblTBID.Text = info.TBID; //会签人ID DropDownList drpUser = PlaceHolder1.Controls[i].FindControl("drpUser") as DropDownList; Label lbUser = PlaceHolder1.Controls[i].FindControl("lbUser") as Label; lbUser.Text = info.Name; FormsMethod.SelectedDropDownList(drpUser, info.ID, info.Name); //是否同意 Label lblTongYi = this.PlaceHolder1.Controls[i].FindControl("lblTongYi") as Label; lblTongYi.Text = info.IsAgree; if (!string.IsNullOrEmpty(info.IsAgree)) { drpUser.Enabled = false; drpUser.CssClass = "dropdownlist_blue"; }//已通过会签则不可重新选择 //会签日期 Label lblDate1 = this.PlaceHolder1.Controls[i].FindControl("lblDate1") as Label; if (info.Date != DateTime.MinValue) { lblDate1.Text = info.Date.ToString(DateFormat); lblDate1.ToolTip = info.Date.ToString(); lbUser.Text = info.Name; lbUser.Visible = true; drpUser.Visible = false; } else { lblDate1.Text = ""; lbUser.Visible = false; drpUser.Visible = true; } //意见 Label lblYiJian = this.PlaceHolder1.Controls[i].FindControl("lblYiJian") as Label; lblYiJian.ToolTip = info.Comment; lblYiJian.Text = SysString.TruncationString(info.Comment, 20); ////落实情况 //TextBox txtDealCondition = this.PlaceHolder1.Controls[i].FindControl("txtDealCondition") as TextBox; //txtDealCondition.Text = info.DealCondition; HiddenField hfLuoShi = this.PlaceHolder1.Controls[i].FindControl("hfLuoShi") as HiddenField; hfLuoShi.Value = info.DealCondition; //处理落实日期 Label lblDate2 = this.PlaceHolder1.Controls[i].FindControl("lblDate2") as Label; if (info.DealDate != DateTime.MinValue) { lblDate2.Text = info.DealDate.ToShortDateString(); } else { lblDate2.Text = ""; } //绑定会签意见、落实情况// Repeater rptCurrentList = this.PlaceHolder1.Controls[i].FindControl("rptCurrentList") as Repeater;//主键ID Label lblComment = this.PlaceHolder1.Controls[i].FindControl("lblComment") as Label; lblComment.Text = SysString.TruncationString(info.Comment, 20); List <CYiJian> yiJianList = new List <CYiJian>(); foreach (B_PF.DetailInfo detailInfo in info.DetailInfoList) { CYiJian yiJian = new CYiJian(); yiJian.Content = detailInfo.Comment; yiJian.DealCondition = detailInfo.DealCondition; yiJian.FinishTime = info.Date.ToString(); yiJian.ID = info.TBID; yiJian.ViewName = ProcessConstString.StepName.ProgramFile.STEP_LEADERSIGN; yiJian.UserName = info.Name; yiJian.UserID = info.ID; yiJianList.Add(yiJian); } rptCurrentList.DataSource = yiJianList; rptCurrentList.DataBind(); if (!this.IsHistory && this.UCReceiveUserID == info.ID) { lblDate1.Visible = false; lblYiJian.Visible = false; lblTongYi.Visible = false; lblComment.Visible = false; } } } HiddenField hfLeaderSignCount = this.Parent.Parent.FindControl("hfLeaderSignCount") as HiddenField; if (hfLeaderSignCount != null) { hfLeaderSignCount.Value = UCHQList.Count.ToString(); } }
/// <summary> /// 实体赋值 /// </summary> /// <param name="IsSave"></param> /// <returns></returns> protected override EntityBase ControlToEntity(bool IsSave) { B_PF entity = base.EntityData != null ? base.EntityData as B_PF : new B_PF(); entity.IsProgramCompanCheck = this.cbIsPrint.Checked; entity.SendDeptID = wfChiefDept.Text;//主办部门ID entity.DocumentTitle = txtName.Text;//程序文件名称-DocumentTitle entity.DocumentNo = txtCode.Text;//程序编码 entity.ProgramCode = txtCode.Text;//程序编码 entity.Edition = txtEdition.Text;//程序版次 entity.TextPageSum = txtPages.Text.Trim();//总页数 entity.ApplyStyle = lblApplyStyle.Text;//申请类型 entity.WriteExplain = SysString.InputText(txtWriteExplain.Text);//编制修订说明 entity.Drafter = wfDrafter.Text;//程序发起人 entity.DrafterID = wfDrafterID.Text;//程序发起人ID //编制 entity.WriteID = wfWriteID.Text.ToString();//ddlWrite.SelectedValue.ToString(); entity.WriteName = lblWrite.Text.ToString(); if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_WRITE) { if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT) { entity.DraftDate = entity.DraftDate == DateTime.MinValue ? DateTime.Now : entity.DraftDate;//程序发起时间 entity.FirstDraftDate = entity.FirstDraftDate == DateTime.MinValue ? entity.DraftDate : entity.FirstDraftDate; //将会签退回标识初始化(置为“False”) entity.IsSignReject = ConstString.Miscellaneous.STATUS_FALSE; entity.WriteDate = lblWriteDate.Text == string.Empty ? DateTime.Now : Convert.ToDateTime(lblWriteDate.ToolTip); } //编写节点处理落实情况 if (wfSort.Text == ConstString.ProgramFile.PROGRAM_SORT_WORK) { if (rdolstSignStyle.SelectedIndex == 0) { entity.DeptSignList = rptDept.Items.Count > 0 ? B_PF.GetDeptSignList(rptDept, ucBuMenHuiQian.UCGetHQList()) : ucBuMenHuiQian.UCGetHQList();//选择部门会签 entity.LeaderSignList.Clear(); }//选择部门会签 else { entity.DeptSignList.Clear(); entity.LeaderSignList = rptLeader.Items.Count > 0 ? B_PF.GetLeaderSignList(rptLeader, ucLDHuiQian.UCGetHQList()) : ucLDHuiQian.UCGetHQList(); ;//选择领导会签 }//选择领导会签 }//工作程序 else { entity.DeptSignList = rptDept.Items.Count > 0 ? B_PF.GetDeptSignList(rptDept, ucBuMenHuiQian.UCGetHQList()) : ucBuMenHuiQian.UCGetHQList();//部门会签 entity.LeaderSignList = rptLeader.Items.Count > 0 ? B_PF.GetLeaderSignList(rptLeader, ucLDHuiQian.UCGetHQList()) : ucLDHuiQian.UCGetHQList();//领导会签 entity.QualityCheckList = B_PF.GetQualityCheckList(rptQG);//质保审查 } //(部门级)管理程序 entity.PiZhunList = B_PF.GetPiZhunList(rptPiZhun); } //校核 entity.CheckID = this.wfCheckID.Text; entity.CheckName = this.txtCheckName.Text; //校核时间 任金权 改 使用第一次时间 if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_CHECK) { if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT) { entity.CheckDate = DateTime.Now; //string.IsNullOrEmpty(this.lblCheckDate.Text) ? DateTime.Now : Convert.ToDateTime(lblCheckDate.Text.ToString()); entity.CheckerIsAgree = base.SubAction == ProcessConstString.SubmitAction.ACTION_DENY ? ConstString.ProgramFile.PROGRAM_REJECT : ConstString.ProgramFile.PROGRAM_AGREE; }//提交 else { //entity.CheckDate = DateTime.MinValue; entity.CheckerIsAgree = string.Empty; }//保存 entity.CheckComment = SysString.InputText(txtInfo.Text.Trim()); } //审核 entity.AuditID = ddlAudit.SelectedValue.ToString(); entity.AuditName = ddlAudit.SelectedItem.Text.ToString(); if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_AUDIT) { if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT) { entity.AuditDate = DateTime.Now; //string.IsNullOrEmpty(this.lblAuditDate.Text) ? DateTime.Now : Convert.ToDateTime(lblAuditDate.Text); entity.AuditorIsAgree = base.SubAction == ProcessConstString.SubmitAction.ACTION_DENY ? ConstString.ProgramFile.PROGRAM_REJECT : ConstString.ProgramFile.PROGRAM_AGREE; }//提交 else { //entity.AuditDate = DateTime.MinValue; entity.AuditorIsAgree = string.Empty; }//保存 entity.AuditComment = SysString.InputText(txtInfo.Text.Trim()); } //部门会签 if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_DEPTSIGN && base.SubAction != ProcessConstString.SubmitAction.ProgramFile.ACTION_ASSIGN) { M_ProgramFile.DeptSign deptSign = new M_ProgramFile.DeptSign(); string strAgreeOld = ""; if (OAConfig.GetConfig(ConstString.Config.Section.Start_WORKFLOW_AGENT, ConstString.Config.Key.IS_START) == "1" && wfReceiveUserID.Text != CurrentUserInfo.UserName) { foreach (M_ProgramFile.DeptSign signer in ucBuMenHuiQian.UCGetHQList()) { if (signer.ID == wfReceiveUserID.Text && signer.IsExclude == false) { deptSign = signer; strAgreeOld = deptSign.IsAgree;//记录上次的意见 任金权 break; } } } else { foreach (M_ProgramFile.DeptSign signer in ucBuMenHuiQian.UCGetHQList()) { if (signer.ID == CurrentUserInfo.UserName && signer.IsExclude == false) { deptSign = signer; strAgreeOld = deptSign.IsAgree;//记录上次的意见 任金权 break; } } } //非保存操作 if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)//任金权修改会签时间 { deptSign.IsAgree = YiJianInfoList.Count == 0 ? ConstString.ProgramFile.PROGRAM_AGREE : ConstString.ProgramFile.PROGRAM_REJECT; if (deptSign.IsAgree == ConstString.ProgramFile.PROGRAM_REJECT || deptSign.SubmitDate == DateTime.MinValue || strAgreeOld == ConstString.ProgramFile.PROGRAM_REJECT) { deptSign.SubmitDate = DateTime.Now; } //判断是否会签退回(如果为同意,则需判断当前会签结果状态,否则为拒绝) entity.IsSignReject = entity.IsSignReject == ConstString.Miscellaneous.STATUS_FALSE ? deptSign.IsAgree == ConstString.ProgramFile.PROGRAM_AGREE ? ConstString.Miscellaneous.STATUS_FALSE : ConstString.Miscellaneous.STATUS_TRUE : ConstString.Miscellaneous.STATUS_TRUE; // //修改标识:M_201004013 // //修 改 者:黄琦 // //修改描述:兼容老版本,IsSignReject为空的问题 // if (entity.IsSignReject == ConstString.Miscellaneous.STATUS_FALSE) // { // if (deptSign.IsAgree == ConstString.ProgramFile.PROGRAM_AGREE) // { // entity.IsSignReject = ConstString.Miscellaneous.STATUS_FALSE; // } // else // { // entity.IsSignReject = ConstString.Miscellaneous.STATUS_TRUE; // } // } // else if (entity.IsSignReject == ConstString.Miscellaneous.STATUS_TRUE) // { // entity.IsSignReject = ConstString.Miscellaneous.STATUS_TRUE; // } // else // { // entity.IsSignReject = ConstString.Miscellaneous.STATUS_FALSE; // foreach (M_ProgramFile.DeptSign item in entity.DeptSignList) // { // if (item.IsAgree == ConstString.ProgramFile.PROGRAM_REJECT) // { // entity.IsSignReject = ConstString.Miscellaneous.STATUS_TRUE; // break; // } // } // } } List<M_ProgramFile.DetailInfo> detailInfoList = new List<M_ProgramFile.DetailInfo>(); string strComment = string.Empty;//单条会签意见,用于表单列表显示 foreach (RepeaterItem item in this.rptComment.Items) { M_ProgramFile.DetailInfo detailInfo = new M_ProgramFile.DetailInfo(); Label lblContent = item.FindControl("lblContent") as Label; detailInfo.Comment = lblContent.Text; strComment = lblContent.Text; detailInfoList.Add(detailInfo); } deptSign.DealCondition = string.Empty;//清空处理情况 deptSign.DealDate = DateTime.MinValue;//清空处理日期 deptSign.TBID = base.IdentityID.ToString(); deptSign.Comment = SysString.InputText(strComment); deptSign.DetailInfoList = detailInfoList;//会签信息集合 entity.DeptSignList = B_PF.SetDeptSignList(deptSign, ucBuMenHuiQian.UCGetHQList()); } //领导会签 if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_LEADERSIGN) { M_ProgramFile.LeaderSign leaderSign = new M_ProgramFile.LeaderSign(); string strAgreeOld = "";//记录上次的意见 任金权 if (OAConfig.GetConfig(ConstString.Config.Section.Start_WORKFLOW_AGENT, ConstString.Config.Key.IS_START) == "1" && wfReceiveUserID.Text != CurrentUserInfo.UserName) { foreach (M_ProgramFile.LeaderSign signer in ucLDHuiQian.UCGetHQList()) { if (signer.ID == wfReceiveUserID.Text) { leaderSign = signer; strAgreeOld = leaderSign.IsAgree; break; } } } else { foreach (M_ProgramFile.LeaderSign signer in ucLDHuiQian.UCGetHQList()) { if (signer.ID == CurrentUserInfo.UserName) { leaderSign = signer; strAgreeOld = leaderSign.IsAgree; break; } } } //非保存操作 if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)//任金权修改会签时间 { leaderSign.IsAgree = YiJianInfoList.Count == 0 ? ConstString.ProgramFile.PROGRAM_AGREE : ConstString.ProgramFile.PROGRAM_REJECT; if (leaderSign.IsAgree == ConstString.ProgramFile.PROGRAM_REJECT || leaderSign.Date == DateTime.MinValue || strAgreeOld == ConstString.ProgramFile.PROGRAM_REJECT) { leaderSign.Date = DateTime.Now; }//过滤多次连续同意(取第一次同意时提交的时间) //判断是否会签退回(如果为同意,则需判断当前会签结果状态,否则为拒绝) entity.IsSignReject = entity.IsSignReject == ConstString.Miscellaneous.STATUS_FALSE ? leaderSign.IsAgree == ConstString.ProgramFile.PROGRAM_AGREE ? ConstString.Miscellaneous.STATUS_FALSE : ConstString.Miscellaneous.STATUS_TRUE : ConstString.Miscellaneous.STATUS_TRUE; } List<M_ProgramFile.DetailInfo> detailInfoList = new List<M_ProgramFile.DetailInfo>(); string strComment = string.Empty;//单条会签意见,用于表单列表显示 foreach (RepeaterItem item in this.rptComment.Items) { B_PF.DetailInfo detailInfo = new B_PF.DetailInfo(); Label lblContent = item.FindControl("lblContent") as Label; detailInfo.Comment = lblContent.Text; strComment = lblContent.Text; detailInfoList.Add(detailInfo); } leaderSign.DealCondition = string.Empty;//清空处理情况 leaderSign.DealDate = DateTime.MinValue;//清空处理日期 leaderSign.TBID = base.IdentityID.ToString(); leaderSign.Comment = SysString.InputText(strComment); leaderSign.DetailInfoList = detailInfoList;//会签信息 entity.LeaderSignList = B_PF.SetLeaderSignList(leaderSign, ucLDHuiQian.UCGetHQList()); } //批准 entity.ApproverID = ddlApprove.SelectedValue.ToString(); entity.ApproveName = ddlApprove.SelectedItem.Text.ToString(); if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_APPROVE) { if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT) { entity.ApproverIsAgree = YiJianInfoList.Count == 0 ? ConstString.ProgramFile.PROGRAM_AGREE : ConstString.ProgramFile.PROGRAM_REJECT; entity.ApproveDate = DateTime.Now; //string.IsNullOrEmpty(lblApproveDate.Text) ? DateTime.Now : Convert.ToDateTime(lblApproveDate.Text.ToString()); string[] sendMember = OAUser.GetUserByRoleName(ConstString.RoleName.PROGRAM_ADMIN); entity.SenderIDs = sendMember[0].ToString();//分发人(公办) entity.Senders = sendMember[1].ToString(); } else { entity.ApproverIsAgree = string.Empty; } //批准 entity.PiZhunList.Clear(); foreach (CYiJian objYiJian in YiJianInfoList) { M_ProgramFile.PiZhun approveInfo = new M_ProgramFile.PiZhun(); approveInfo.TBID = objYiJian.ID; approveInfo.Name = objYiJian.UserName; approveInfo.Comment = objYiJian.Content; approveInfo.DealCondition = objYiJian.DealCondition; approveInfo.SubmitDate = DateTime.Now; entity.PiZhunList.Add(approveInfo); } //表单显示的批准意见信息 if (YiJianInfoList.Count == 0) { entity.ApproveComment = string.Empty; } else { entity.ApproveComment = YiJianInfoList[YiJianInfoList.Count - 1].Content; } } //分发节点 if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_SEND) { entity.SendDate = DateTime.Now; //wfSendDate.Text == string.Empty ? DateTime.MinValue : Convert.ToDateTime(wfSendDate.Text); } entity.ProgramSort = wfSort.Text;//程序分类 entity.ProgramFileID = wfProgramID.Text;//程序文件ID entity.SerialID = wfSerialID.Text;//流水号 entity.Year = wfYear.Text;//年份 //质保审查 entity.QualityIDs = wfQualityIDs.Text;//质保审查人ID entity.QualityNames = lblQG.ToolTip;//质保审查人 //entity.QualityDate = lblQGDate.Text == string.Empty ? DateTime.MinValue : Convert.ToDateTime(lblQGDate.ToolTip.ToString()); //entity.QualityComment = lblQGComment.ToolTip; //发起传阅时间 entity.CirculateDate = wfCirculateDate.Text == string.Empty ? DateTime.MinValue : Convert.ToDateTime(wfCirculateDate.Text); if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_QG) { if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT) { entity.QualityIsAgree = YiJianInfoList.Count == 0 ? ConstString.ProgramFile.PROGRAM_AGREE : ConstString.ProgramFile.PROGRAM_REJECT; entity.QualityDate = lblQGDate.ToolTip == string.Empty ? DateTime.Now : Convert.ToDateTime(lblQGDate.ToolTip.ToString()); string[] sendMember = OAUser.GetUserByRoleName(ConstString.RoleName.PROGRAM_ADMIN); entity.SenderIDs = sendMember[0].ToString();//分发人(公办) entity.Senders = sendMember[1].ToString(); } else { entity.QualityIsAgree = string.Empty; } //表单显示的质保意见信息 if (YiJianInfoList.Count == 0) { entity.QualityComment = string.Empty; } else { entity.QualityComment = YiJianInfoList[YiJianInfoList.Count - 1].Content; } entity.QualityCheckList.Clear(); if (OAConfig.GetConfig(ConstString.Config.Section.Start_WORKFLOW_AGENT, ConstString.Config.Key.IS_START) == "1" && wfReceiveUserID.Text != CurrentUserInfo.UserName) { foreach (CYiJian yiJian in YiJianInfoList) { B_PF.QualityCheck qg = new B_PF.QualityCheck(); //Label lblContent = itm.FindControl("lblContent") as Label; qg.Name = wfReceiveUserName.Text; qg.TBID = base.IdentityID.ToString(); qg.Comment = yiJian.Content; entity.QualityCheckList.Add(qg); } } else { foreach (CYiJian yiJian in YiJianInfoList) { B_PF.QualityCheck qg = new B_PF.QualityCheck(); //Label lblContent = itm.FindControl("lblContent") as Label; qg.Name = CurrentUserInfo.DisplayName; qg.TBID = base.IdentityID.ToString(); qg.Comment = yiJian.Content; entity.QualityCheckList.Add(qg); } } entity.PiZhunList = B_PF.GetPiZhunList(rptPiZhun); entity.DeptSignList = ucBuMenHuiQian.UCGetHQList();//部门会签 entity.LeaderSignList = ucLDHuiQian.UCGetHQList();//领导会签 } //传阅 entity.CirculateSignUserID = hfCirculateUserID.Value;//被传阅人ID entity.CirculateSignUserName = txtCirculateUserName.Text;//被传阅人姓名 entity.CirculateSignDept = txtCirculateDeptName.Text;//被传阅部门 entity.CirculateSignDeptID = hfCirculateDeptID.Value;//被传阅部门ID //分发 entity.CirculateDeptID = hfSendDeptID.Value; entity.CirculateID = hfSendUserID.Value; entity.CirculateDeptName = txtSendDeptName.Text; entity.CirculateName = txtSendUserName.Text; entity.CirculateComment = txtSendComemnt.Text; if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT) { if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_QG || base.StepName == ProcessConstString.StepName.ProgramFile.STEP_DEPTSIGN || base.StepName == ProcessConstString.StepName.ProgramFile.STEP_LEADERSIGN || base.StepName == ProcessConstString.StepName.ProgramFile.STEP_APPROVE) { entity.CommentList.Clear(); foreach (CYiJian objYj in YiJianInfoList) { objYj.FinishTime = DateTime.Now.ToString(); } entity.CommentList = YiJianInfoList; } else if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_CHECK || base.StepName == ProcessConstString.StepName.ProgramFile.STEP_AUDIT) { //意见保存 CYiJian objYj = new CYiJian(); objYj.ID = base.IdentityID.ToString(); if (OAConfig.GetConfig(ConstString.Config.Section.Start_WORKFLOW_AGENT, ConstString.Config.Key.IS_START) == "1" && wfReceiveUserID.Text != CurrentUserInfo.UserName) { objYj.UserID = wfReceiveUserID.Text; objYj.UserName = wfReceiveUserName.Text; } else { objYj.UserID = CurrentUserInfo.UserName; objYj.UserName = CurrentUserInfo.DisplayName; } objYj.ViewName = base.StepName;//视图名称(当前流程步骤) objYj.FinishTime = DateTime.Now.ToString(); objYj.Content = SysString.InputText(txtInfo.Text.Trim()); entity.CommentList.Clear(); entity.CommentList.Add(objYj); }//校核、审核 }//非保存操作 //交办相关 entity.ParentTBID = wfParentTBID.Text; if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_ASSIST_SIGN) { entity.AssistContent = txtAssistInfo.Text; }//协助部门会签步骤 if (base.SubAction == ProcessConstString.SubmitAction.ProgramFile.ACTION_ASSIGN) { entity.AssistContent = string.Empty; } if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_WRITE || base.StepName == ProcessConstString.StepName.ProgramFile.STEP_QG || base.StepName == ProcessConstString.StepName.ProgramFile.STEP_APPROVE) { entity.AssistContent = string.Empty; entity.AssignedUserID = string.Empty; entity.AssignedUserName = string.Empty; } else { entity.AssignedUserName = string.IsNullOrEmpty(txtAssignMember.Text) ? wfAssignUserName.Text : txtAssignMember.Text; entity.AssignedUserID = wfAssignUserID.Text; } entity.ChildProcessID = wfChildProcessID.Text; if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT && (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_WRITE || base.StepName == ProcessConstString.StepName.ProgramFile.STEP_AUDIT || base.StepName == ProcessConstString.StepName.ProgramFile.STEP_QG || base.StepName == ProcessConstString.StepName.ProgramFile.STEP_APPROVE)) { entity.TimesFlag = (int.Parse(string.IsNullOrEmpty(this.wfTimesFlag.Text) ? "1" : this.wfTimesFlag.Text) + 1).ToString();//次数标示 } else { entity.TimesFlag = wfTimesFlag.Text;//次数标示 } entity.FileList = ucFileControl.UCDataList;//附件信息 return entity; }