private void SetBaseExportData(UC_Print ucPrint, B_RequestReport cEntity) { //ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "内容:";//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Down; if (cEntity.Type == "请示") { ucPrint.ExportData.Add("海南核电有限公司请示"); } else { ucPrint.ExportData.Add("海南核电有限公司报告"); } ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.ToShortDateString())); //<col>拟稿日期:|right</col> ucPrint.ExportData.Add(cEntity.MainSend); //<col>主送:|right</col> ucPrint.ExportData.Add(cEntity.Number); //<col>编号:|right</col> ucPrint.ExportData.Add(cEntity.Department); //<col>编制部门:|right</col> ucPrint.ExportData.Add(cEntity.CopySend); //<col>抄送:|right</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>主题:|right</col> //ucPrint.ExportData.Add(SysString.HtmlToTextCode(cEntity.Content)); //<col>内容:|right</col> ucPrint.ExportData.Add(cEntity.Content); //renjinquan+ ucPrint.ExportData.Add(cEntity.LeaderOpinion); //<col>领导批示:|right</col> ucPrint.ExportData.Add(cEntity.UndertakeCircs); //<col>承办情况:|right</col> //ucPrint.ExportData.Add(cEntity.Message); //<col>提示信息:|right</col> //ucPrint.ExportData.Add(cEntity.MessageAdd); //<col>添加:|right</col> ucPrint.ExportData.Add(cEntity.DeptPrincipal); //<col>部门负责人:|right</col> ucPrint.ExportData.Add(cEntity.CheckDrafter); //<col>核稿人:|right</col> ucPrint.ExportData.Add(cEntity.Drafter); //<col>拟稿人:|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.ConfirmDate.ToShortDateString())); //<col>签发日期:|right</col> }
private void SetBaseExportData(UC_Print ucPrint, B_WorkRelation cEntity, string sParam) { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.ToShortDateString())); //<col>拟稿日期:|right</col> ucPrint.ExportData.Add(cEntity.MainSend); //<col>主送:|right</col> ucPrint.ExportData.Add(cEntity.DocumentNo); //<col>编号:|right</col> ucPrint.ExportData.Add(cEntity.Department); //<col>编制部门:|right</col> ucPrint.ExportData.Add(cEntity.CopySend); //<col>抄送:|right</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>主题:|right</col> //ucPrint.ExportData.Add(SysString.HtmlToTextCode(cEntity.Content)); //<col>内容:|right</col> ucPrint.ExportData.Add(cEntity.Content); //<col>内容:|right</col> ucPrint.ExportData.Add(cEntity.UndertakeCircs); //<col>答复或处理意见:|right</col> ucPrint.ExportData.Add(cEntity.BanLiYiJian); //<col>办理意见:|right</col> ucPrint.ExportData.Add(cEntity.DeptLeader); //<col>承办部门领导:|right</col> ucPrint.ExportData.Add(cEntity.SectionLeader); //<col>科室领导:|right</col> ucPrint.ExportData.Add(cEntity.Contractor); //<col>承办人:|right</col> //ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.ChengBanRiQi.ToShortDateString())); //<col>承办日期:|right</col> string strChengBanRiQi = cEntity.StepName == ProcessConstString.StepName.WorkRelationStepName.STEP_DIRECTOR?cEntity.DirectorDate.ToString():cEntity.StepName == ProcessConstString.StepName.WorkRelationStepName.STEP_CHIEF?cEntity.SectionDate.ToString():cEntity.StepName == ProcessConstString.StepName.WorkRelationStepName.STEP_MEMBER?cEntity.MemberDate.ToString():""; ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.ChengBanRiQi.ToString() == System.DateTime.MinValue.ToString() ? strChengBanRiQi : cEntity.ChengBanRiQi.ToString())); //<col>承办日期:|right</col> renjinquan+ 根据步骤取承办日期。 //ucPrint.ExportData.Add(cEntity.Message); //<col>提示信息:|right</col> //if (sParam != "工作联系单7") // ucPrint.ExportData.Add(cEntity.MessageAdd);//<col>添加:|right</col> ucPrint.ExportData.Add(cEntity.DeptPrincipal); //<col>签发人:|right</col> ucPrint.ExportData.Add(cEntity.CheckDrafter); //<col>核稿人:|right</col> ucPrint.ExportData.Add(cEntity.Drafter); //<col>拟稿人:|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.ConfirmDate.ToShortDateString())); //<col>签发日期:|right</col> }
public void SetPrintBeginExport(UC_Print ucPrint, B_MergeReceiveBase cEntity) { switch (ucPrint.FileName) { case "党纪工团收文表单": ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>文件名称:|right</col> ucPrint.ExportData.Add(cEntity.DocumentNo); //<col>收文编号:|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DocumentReceiveDate.ToShortDateString())); //<col>收文日期:|right</col> ucPrint.ExportData.Add(cEntity.SendNo); //<col>原文号:|right</col> //ucPrint.ExportData.Add(cEntity.VolumeNo); //<col>卷号:|right</col> //ucPrint.ExportData.Add(OAUser.GetUserName(cEntity.Officer)); //<col>党群工作处处长|right</col> ucPrint.ExportData.Add(cEntity.Officer_Comment); //<col>党群工作处处长意见意见:|right</col> ucPrint.ExportData.Add(OAUser.GetUserName(cEntity.LeaderShip)); //<col>公司领导:|right</col> ucPrint.ExportData.Add(cEntity.LS_Comment); //<col>领导批示:|right</col> ucPrint.ExportData.Add(GetValueByColName("DeptName", cEntity.UnderTakeList)); //ucPrint.ExportData.Add(sDept);//<col>承办部门:|right</col> ucPrint.ExportData.Add(GetValueByColName("Content", cEntity.UnderTakeList)); //<col>承办意见:|right</col> ucPrint.ExportData.Add(GetValueByColNameEx("ReceiveUserName", cEntity.CirculateList)); //<col>传阅人员:|right</col> ucPrint.ExportData.Add(GetValueByColNameEx("Comment", cEntity.CirculateList)); //<col>传阅意见:|right</col> ucPrint.ExportData.Add(ucPrint.AttachFilesList(cEntity.FileList)); //<col>附件:|down</col> //ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "提示信息:";//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Down; break; } }
private void SetBaseExportData(UC_Print ucPrint, B_DJGTSend cEntity) { //TODO:处理非终节点模板 //ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "抄送:";//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Right; ucPrint.ExportData.Add(cEntity.UrgentDegree); //<col>紧急程度:|right</col> ucPrint.ExportData.Add(cEntity.DocumentNo); //<col>发文号:|right</col> ucPrint.ExportData.Add(cEntity.Signer); //<col>签发:|right</col> ucPrint.ExportData.Add(cEntity.LeadSigners); //<col>会签人:|right</col> ucPrint.ExportData.Add(cEntity.DeptSigners); //<col>会签人: |right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.SignDate.ToShortDateString())); //<col>日期:|right</col> ucPrint.ExportData.Add(cEntity.Verifier); //<col>秘书:|right</col> if (ucPrint.UCStepName == "审稿") { ucPrint.ExportData.Add(""); } else { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.VerifyDate.ToShortDateString()));//<col>日期: |right</col> } //ucPrint.ExportData.Add(""/*cEntity.ZhuRenSigner*/);//<col>主任:|right</col> //ucPrint.ExportData.Add(""/*ucPrint.CheckDateTime(cEntity.ZhuRenSignDate.ToShortDateString())*/);//<col>日期: |right</col> ucPrint.ExportData.Add(cEntity.CheckDrafter); //<col>审稿人:|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.CheckDraftDate.ToShortDateString())); //<col>审稿日期:|right</col> ucPrint.ExportData.Add(/*OADept.GetDeptName(*/ cEntity.HostDept /*)*/); //<col>主办部门:|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.ToShortDateString())); //<col>拟稿日期:|right</col> ucPrint.ExportData.Add(cEntity.Drafter); //<col>拟稿人:|right</col> ucPrint.ExportData.Add(cEntity.PhoneNum); //<col>电话:|right</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>标题:|right</col> ucPrint.ExportData.Add(cEntity.SubjectWord); //<col>主题词:|right</col> ucPrint.ExportData.Add(cEntity.MainSenders); //<col>主送:|right</col> ucPrint.ExportData.Add(cEntity.CopySenders); //<col>抄送:|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.SendDate.ToShortDateString())); //<col>发文日期:|right</col> ucPrint.ExportData.Add(cEntity.ShareCount); //<col>共印|right</col> ucPrint.ExportData.Add(cEntity.SheetCount); //<col>份,每份|right</col> ucPrint.ExportData.Add(cEntity.Typist); //<col>打字:|right</col> ucPrint.ExportData.Add(cEntity.Checker); //<col>校对:|right</col> ucPrint.ExportData.Add(cEntity.ReChecker); //<col>复核:|right</col> //ucPrint.ExportData.Add(cEntity.Prompt);//<col>提示信息:|right</col> //ucPrint.ExportData.Add(cEntity.Prompt);//<col>添加|right</col> }
public void SetPrintBeginExport(UC_Print ucPrint, B_LetterReceive cEntity) { switch (ucPrint.FileName) { case "函件收文表单": ucPrint.ExportData.Add(cEntity.DocumentNo); //<col>收文号:|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.ReceiptDate.ToShortDateString())); //<col>收文日期:|right</col> ucPrint.ExportData.Add(cEntity.UrgentDegree); //<col>紧急程度:|right</col> ucPrint.ExportData.Add(cEntity.FileEncoding); //<col>文件编号:|right</col> ucPrint.ExportData.Add(cEntity.CommunicationUnit); //<col>来文单位:|right</col> ucPrint.ExportData.Add(cEntity.Pages); //<col>页数:|right</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>文件标题:|right</col> ucPrint.ExportData.Add(cEntity.LeaderShipName); //<col>批示领导:|right</col> ucPrint.ExportData.Add(cEntity.ChuanYueLeader); //<col>传阅领导:|right</col> ucPrint.ExportData.Add(cEntity.UnderTake); //<col>主办部门:|right</col> ucPrint.ExportData.Add(cEntity.AssistDeptName); //<col>协办部门:|right</col> ucPrint.ExportData.Add(cEntity.ChuanYueDept); //<col>传阅部门:|right</col> ucPrint.ExportData.Add(cEntity.NiBanComment); //<col>其它意见:|right</col> string sDraftDate = string.IsNullOrEmpty(cEntity.NiBanDate)?"":"[" + cEntity.NiBanDate.Split(' ')[0] + "]"; ucPrint.ExportData.Add(cEntity.NiBanRenName + "\n" + sDraftDate); //<col>拟办人:|right</col> //ucPrint.ExportData.Add(cEntity.SecondPloterName); //<col>二次拟办人:|right</col> ucPrint.ExportData.Add(cEntity.LS_Comment); //<col>领导意见:|right</col> string sLeaderDate = string.IsNullOrEmpty(cEntity.LS_Date) ? "" : "[" + cEntity.LS_Date.Split(' ')[0] + "]"; ucPrint.ExportData.Add(cEntity.LeaderShipName + "\n" + sLeaderDate); //<col>领导:|right</col> ucPrint.ExportData.Add(cEntity.UnderTake); //<col>承办部门:|right</col> ucPrint.ExportData.Add(cEntity.UnderTake_Comment); //<col>承办意见:|right</col> /*待定*/ ucPrint.ExportData.Add(cEntity.UDDeptLeadName /*+ "\n" + "[" + cEntity.UDDeptLeadNameTime + "]"/*GetDeptLeaderName(cEntity.UnderTakeList)*/); //<col>部门领导:|right</col> /*待定*/ ucPrint.ExportData.Add(cEntity.UDSectionLeadName /*+ "\n" + "[" + cEntity.UDSectionLeadNameTime + "]"/*GetKeShiLeaderName(cEntity.UnderTakeList)*/); //<col>科室领导:|right</col> /*待定*/ ucPrint.ExportData.Add(cEntity.UDSectionPeopleName /*+ "\n" + "[" + cEntity.UDSectionPeopleNameTime + "]"/*GetPuTongName(cEntity.UnderTakeList)*/); //<col>普通人员:|right</col> /*待定*/ string[] stringSeparators = new string[] { "\n" }; //string[] sPrompt = cEntity.Prompt.Split(stringSeparators, StringSplitOptions.RemoveEmptyEntries);//<col>备注|right</col> //if (sPrompt.Length > 0) //{ // ucPrint.ExportData.Add(sPrompt[0]); //} //else //{ // ucPrint.ExportData.Add(cEntity.Prompt); //} ucPrint.ExportData.Add(cEntity.Remarks); //<col>备注|right</col> /*待定*/ //ucPrint.ExportData.Add(ucPrint.AttachFilesList(cEntity.FileList)); //<col>附件列表|shift</col> ucPrint.Position = "备注"; ucPrint.Mode = WriteMode.Down_Append; break; } }
private string GetLastDate(UC_Print ucPrint, string StepName) { string sLastDate = ""; if (base.IsPreview == false && base.StepName == StepName && B_PF.GetComment(base.ProcessID, base.WorkItemID, StepName).Rows.Count > 0) { sLastDate = ucPrint.CheckDateTime(B_PF.GetComment(base.ProcessID, base.WorkItemID, StepName).Rows[0]["FinishTime"].ToString()); } return(sLastDate); }
private void SetBaseExportData(UC_Print ucPrint, FS.ADIM.OA.BLL.Busi.Process.B_Finance cEntity) { //ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "内容:";//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Down; ucPrint.ExportData.Add("海南核电有限公司出差(培训)申请单"); ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.ToShortDateString())); //<col>拟稿日期:|right</col> ucPrint.ExportData.Add(cEntity.MainSend); //<col>主送:|right</col> ucPrint.ExportData.Add(cEntity.Number); //<col>编号:|right</col> ucPrint.ExportData.Add(cEntity.Department); //<col>编制部门:|right</col> ucPrint.ExportData.Add(cEntity.CopySend); //<col>抄送:|right</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>主题:|right</col> //ucPrint.ExportData.Add(SysString.HtmlToTextCode(cEntity.Content)); //<col>内容:|right</col> ucPrint.ExportData.Add(cEntity.Content); //renjinquan+ //ucPrint.ExportData.Add(cEntity.LeaderOpinion); //<col>领导批示:|right</col> //ucPrint.ExportData.Add(cEntity.UndertakeCircs); //<col>承办情况:|right</col> //ucPrint.ExportData.Add(cEntity.Message); //<col>提示信息:|right</col> //ucPrint.ExportData.Add(cEntity.MessageAdd); //<col>添加:|right</col> ucPrint.ExportData.Add(cEntity.DeptPrincipal); //<col>部门负责人:|right</col> ucPrint.ExportData.Add(cEntity.CheckDrafter); //<col>核稿人:|right</col> ucPrint.ExportData.Add(cEntity.Drafter); //<col>拟稿人:|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.ConfirmDate.ToShortDateString())); //<col>签发日期:|right</col> }
public void SetPrintBeginExport(UC_Print ucPrint, B_WorkRelation cEntity) { switch (ucPrint.FileName) { case "工作联系单": ucPrint.ExportData.Add(cEntity.MainSend); //<col>主送:|inner</col> ucPrint.ExportData.Add(cEntity.Number); //<col>编码:|inner</col> ucPrint.ExportData.Add(cEntity.CopySend); //<col>抄送:|inner</col> ucPrint.ExportData.Add(cEntity.Department); //<col>编制处室:|inner</col> ucPrint.ExportData.Add(cEntity.Drafter); //<col>编写:|inner<inner/col> ucPrint.ExportData.Add(cEntity.CheckDrafter); //<col>校核:|inner</col> ucPrint.ExportData.Add(cEntity.DeptPrincipal); //<col>审定:|inner</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.ConfirmDate.ToShortDateString())); //<col>日期:|inner</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>主题:|inner</col> //string tmp = SysString.HtmlToTextCode(cEntity.Content); string tmp = cEntity.Content; //renjinquan+ if (!string.IsNullOrEmpty(tmp)) { ucPrint.ExportData.Add(tmp); } else { ucPrint.ExportData.Add(""); } //ucPrint.ExportData.Add(cEntity.Content); //<col>正文|shift</col> ucPrint.ExportData.Add(cEntity.BanLiYiJian); //<col>承办意见:|right</col> //string sUndertakeCircs = ""; //if (!string.IsNullOrEmpty(cEntity.UndertakeCircs)) //{ // sUndertakeCircs = cEntity.UndertakeCircs.Remove(0, 1); //} ucPrint.ExportData.Add(cEntity.UndertakeCircs); //<col>承办结果:|right</col> ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "内容";//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Down; break; case "工作联系单表单": SetBaseExportData(ucPrint, cEntity, "工作联系单表单"); ucPrint.ExportData.Add(cEntity.ChuanYueRenYuan); //<col>传阅人员:|right</col> //ucPrint.ExportData.Add(ucPrint.AttachFilesList(cEntity.FileList)); //<col>附件:|down</col> break; } }
private void Print_OnExtraExport(object sender, EventArgs e) { if (m_print == null || m_Entity == null) { return; } ComRecv_Print print = new ComRecv_Print(); for (int i = 0; i < m_Entity.CirculateList.Rows.Count; i++) { m_print.Write("传阅签名", m_Entity.CirculateList.Rows[i]["ReceiveUserName"].ToString(), WordMgr.WriteMode.Right, i + 1); m_print.Write("日期", m_Entity.CirculateList.Rows[i]["EditDate"].ToString(), WordMgr.WriteMode.Right, i + 1); if (i + 1 > 13) { m_print.Write("传阅签名 ", m_Entity.CirculateList.Rows[i]["ReceiveUserName"].ToString(), WordMgr.WriteMode.Right, i + 1); DateTime oDt = new DateTime(); try { oDt = Convert.ToDateTime(m_Entity.CirculateList.Rows[i]["EditDate"].ToString()); } catch { return; } m_print.Write("日期 ", m_print.CheckDateTime(oDt.ToShortDateString()), WordMgr.WriteMode.Right, i + 1); } } switch (m_print.FileName) { case "公文处理单": m_print.BatchAddPicture("公司收文", "公文处理单", m_Entity); break; case "公司收文表单": m_print.BatchAddPicture("公司收文", "公司收文表单", m_Entity); break; } }
public void SetPrintBeginExport(UC_Print ucPrint, B_GS_WorkItems cEntity) { switch (ucPrint.FileName) { case "公文处理单": ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>收文标题:|right</col>chen ucPrint.ExportData.Add(cEntity.DocumentNo); //<col>收文编号|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.ReceiveDateTime.ToShortDateString())); //<col>收文日期|right</col> ucPrint.ExportData.Add(cEntity.SendNo); //<col>原文号|right</col> string sName = OAUser.GetUserName(cEntity.OfficerName); string sResult = (string.IsNullOrEmpty(sName) ? cEntity.OfficerName : sName); ucPrint.ExportData.Add((string.IsNullOrEmpty(sResult) ? "" : "[" + sResult + "]") + cEntity.Officer_Date.ToString() + cEntity.Officer_Comment); //<col>公司办拟办意见:|right</col> sName = OAUser.GetUserName(cEntity.LeaderShipName); sResult = (string.IsNullOrEmpty(sName) ? cEntity.LeaderShipName : sName); ucPrint.ExportData.Add(OAUser.GetUserName(cEntity.LeaderShip)); //<col>公司领导:|right</col> ucPrint.ExportData.Add((string.IsNullOrEmpty(sResult) ? "" : "[" + sResult + "]") + cEntity.LS_Date.ToString() + cEntity.LS_Comment); //<col>领导批示|right</col> //string[] sUnderTakeList = GetValueByColName("Content", cEntity.UnderTakeList).Split(new char[] { ';' }); ucPrint.ExportData.Add(GetValueByColName("DeptName", cEntity.UnderTakeList)); //<col>承办部门:|right</col> ucPrint.ExportData.Add(GetValueByColName("Content", cEntity.UnderTakeList)); //<col>承办情况:|right</col> ucPrint.ExportData.Add(GetValueByColNameEx("ReceiveUserName", cEntity.CirculateList)); //<col>传阅人员:|right</col> ucPrint.ExportData.Add(GetValueByColNameEx("Comment", cEntity.CirculateList)); //<col>传阅意见:|right</col> //if (sUnderTakeList.Length > 0) //{ // ucPrint.ExportData.Add(sUnderTakeList[0]); //<col>承办情况|right</col> //} //else //{ // ucPrint.ExportData.Add(GetValueByColName("Content", cEntity.UnderTakeList)); //} //<col>传阅签名|right</col> //<col>日期|right</col> //<col>传阅签名 |right</col> //<col>日期 |right</col> //ucPrint.ExportData.Add(cEntity.); //ucPrint.ExportData.Add(cEntity.Content); //ucPrint.ExportData.Add(cEntity.UndertakeCircs); //ucPrint.ExportData.Add(cEntity.DeptPrincipal); //ucPrint.ExportData.Add(cEntity.DeptPrincipal); //ucPrint.ExportData.Add(cEntity.Department); //ucPrint.ExportData.Add("共" + "()" + "页"); //ucPrint.ExportData.Add("第" + "()" + "页"); //ucPrint.AttachFileList = cEntity.FileList;//chen ucPrint.ExportData.Add(ucPrint.AttachFilesList(cEntity.FileList)); //<col>附件:|down</col> //ucPrint.Position = "日期 ";//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Down; break; case "公司收文表单": ucPrint.ExportData.Add(cEntity.DocumentNo); //<col>收文编号:|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DocumentReceiveDate.ToShortDateString())); //<col>收文日期:|right</col> ucPrint.ExportData.Add(cEntity.SendNo); //<col>原文号:|right</col> ucPrint.ExportData.Add(cEntity.VolumeNo); //<col>卷号:|right</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>文件名称:|right</col> ucPrint.ExportData.Add(OAUser.GetUserName(cEntity.Officer)); //<col>公司办主任|right</col> ucPrint.ExportData.Add(cEntity.Officer_Comment); //<col>意见:|right</col> ucPrint.ExportData.Add(OAUser.GetUserName(cEntity.LeaderShip)); //<col>公司领导:|right</col> ucPrint.ExportData.Add(cEntity.LS_Comment); //<col>意见:|right</col> ucPrint.ExportData.Add(GetValueByColName("DeptName", cEntity.UnderTakeList)); //ucPrint.ExportData.Add(sDept);//<col>承办部门:|right</col> ucPrint.ExportData.Add(GetValueByColName("Content", cEntity.UnderTakeList)); //<col>承办意见:|right</col> ucPrint.ExportData.Add(GetValueByColNameEx("ReceiveUserName", cEntity.CirculateList)); //<col>传阅人员:|right</col> ucPrint.ExportData.Add(GetValueByColNameEx("Comment", cEntity.CirculateList)); //<col>传阅意见:|right</col> ucPrint.ExportData.Add(ucPrint.AttachFilesList(cEntity.FileList)); //ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "提示信息:";//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Down; break; } }
public void SetPrintBeginExport(UC_Print ucPrint, EntityLetterSend cEntity) { switch (ucPrint.FileName) { case "函件发文表单": ucPrint.ExportData.Add(cEntity.company1); //<col>主送单位:|right</col> ucPrint.ExportData.Add(cEntity.ourRef); //<col>我方发文号:|right</col> ucPrint.ExportData.Add(cEntity.to); //<col>主送人:|right</col> ucPrint.ExportData.Add(cEntity.yourRef); //<col>对方发文号:|right</col> ucPrint.ExportData.Add(cEntity.ccCompany); //<col>抄送单位:|right</col> ucPrint.ExportData.Add(cEntity.ccDept + "\r\n" + cEntity.ccLeader); //<col>内部抄送:|right</col> ucPrint.ExportData.Add(cEntity.pages); //<col>页数:|right</col> //string str = string.Empty; //System.Drawing.Font font = new Font("Wingdings 2", 10); //if (cEntity.jinJi) //{ // //str = "紧急"; // //ucPrint.FontStyle.FontName = "Wingdings 2"; // //str += (char)0x0052; // //ucPrint.FontStyle.FontName = "仿宋"; //} //else //{ // str = "紧急□"; //} //ucPrint.ExportData.Add(str); //if (cEntity.huiZhi) //{ // //str = "回复"; // //ucPrint.FontStyle.FontName = "Wingdings 2"; // //str += (char)0x0052; // //ucPrint.FontStyle.FontName = "仿宋"; //} //else //{ // str = "回复□"; //} //ucPrint.ExportData.Add(str); if (ucPrint.IsCN(cEntity.signDate) == true) { ucPrint.ExportData.Add(cEntity.signDate); //<col>签发/日期:|right</col> } else { ucPrint.ExportData.Add(cEntity.qianFaRen + "\n" + ucPrint.CheckDateTime(cEntity.signDate)); } ucPrint.ExportData.Add(cEntity.DocumentTitle); ////<col>主题:|right</col>//.subject //string tmp = cEntity.content.Replace("<br/>", "\r\n"); //<col>内容|shift</col> //tmp = tmp.Replace(" ", " "); //tmp = tmp.Replace("<", "<"); //tmp = tmp.Replace(">", ">"); //tmp = tmp.Replace(""", "\""); //string tmp = SysString.HtmlToTextCode(cEntity.content); string tmp = cEntity.content; //renjinquan+ if (!string.IsNullOrEmpty(tmp)) { ucPrint.ExportData.Add(tmp); } else { ucPrint.ExportData.Add(""); } ucPrint.ExportData.Add(cEntity.Drafter + "\n" + ucPrint.CheckDateTime(cEntity.DraftDate.ToString())); //<col>拟稿/日期:|right</col> if (ucPrint.IsCN(cEntity.heGaoRenDate) == false) { ucPrint.ExportData.Add(cEntity.heGaoRen + "\n" + ucPrint.CheckDateTime(cEntity.heGaoRenDate)); //<col>核稿/日期:|right</col> } else { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.heGaoRenDate)); } string result1 = FormatSplit(EntityToHuiQian(cEntity), new char[] { ';' }); result1 = FormatSplit(result1, new char[] { ' ' }); ucPrint.ExportData.Add(result1); //<col>会签/日期:|right</col> //ucPrint.ExportData.Add(ucPrint.AttachFilesList(cEntity.FileList)); //<col>附件:|down</col> //ucPrint.AttachFileList = cEntity.FileList; ucPrint.Position = "拟稿/日期:"; ucPrint.Mode = WriteMode.Up; break; } }
public void SetPrintBeginExport(UC_Print ucPrint, FS.ADIM.OA.BLL.Busi.Process.B_Finance cEntity) { switch (ucPrint.FileName) { case "公司报告": case "公司请示": ucPrint.ExportData.Add(cEntity.MainSend); //<col>主送:|inner</col> ucPrint.ExportData.Add(cEntity.Number); //<col>编码:|inner</col> ucPrint.ExportData.Add(cEntity.CopySend); //<col>抄送:|inner</col> ucPrint.ExportData.Add(cEntity.Department); //<col>编制处室:|inner</col> ucPrint.ExportData.Add(cEntity.Drafter); //<col>编写:|inner</col> ucPrint.ExportData.Add(cEntity.DeptPrincipal); //<col>审定:|inner</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.ConfirmDate.ToShortDateString())); //<col>日期:|inner</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>主题:|inner</col> //string tmp = SysString.HtmlToTextCode(cEntity.Content); string tmp = cEntity.Content; //renjinquan+ if (!string.IsNullOrEmpty(tmp)) { ucPrint.ExportData.Add(tmp); } else { ucPrint.ExportData.Add(""); } //ucPrint.ExportData.Add(cEntity.Content); //<col>正文|shift</col> //string sLeaderOpinion = cEntity.LeaderOpinion.Replace("(领导批示)", ""); string sLeaderOpinion = ""; sLeaderOpinion = sLeaderOpinion.Replace("\n", ""); string[] result = sLeaderOpinion.Split(new char[] { '[', ']' }); if (result.Length == 0) { ucPrint.ExportData.Add(sLeaderOpinion); //<col>领导批示:|inner</col> } else { if (result.Length >= 3) { ucPrint.ExportData.Add(result[0] + "\n" + result[1] + "\n" + result[2]); } else { ucPrint.ExportData.Add(""); } } ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "领导批示:";//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Up; break; case "请示报告表单": SetBaseExportData(ucPrint, cEntity); //ucPrint.ExportData.Add(cEntity.Message); //<col>伴随信息:|right</col> //ucPrint.ExportData.Add(cEntity.UndertakeCircs);//<col>批示意见:|right</col> ucPrint.ExportData.Add(cEntity.FenFaFanWei); //<col>部门:|inner</col> ucPrint.ExportData.Add(cEntity.GongSiLingDao); //<col>公司领导:|inner</col> //ucPrint.ExportData.Add(cEntity.FenFaFanWei); //<col>分发范围:|right</col> ucPrint.ExportData.Add(ucPrint.AttachFilesList(cEntity.FileList)); //<col>附件:|down</col> break; } }
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 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); }
public void SetPrintBeginExport(UC_Print ucPrint, B_DJGTSend cEntity) { bool IsContent = false; switch (ucPrint.FileName) { #region 党委部门文件模版 党委请示模版 海南党委文件模版 海南工会请示模版 海南共青团文件模版 海南纪委文件模版 case "党委部门文件模版": case "党委请示模版": case "海南党委文件模版": case "海南工会请示模版": case "海南共青团文件模版": case "海南纪委文件模版": case "海南工会文件模版": case "海南共青团请示文件模版": case "海南纪委请示文件模版": ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>[标题]|shift</col> ucPrint.ExportData.Add(cEntity.MainSenders); //<col>[主送单位]|shift</col> ucPrint.ExportData.Add(""); //<col>[正文仿宋三号,不加粗]|shift</col> for (int i = 0; i < cEntity.FileList.Count; i++) { if (cEntity.FileList[i].IsZhengWen == "1") { IsContent = true; break; } } if (IsContent) { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.Year.ToString() + "年" + cEntity.DraftDate.Month.ToString() + "月" + cEntity.DraftDate.Day.ToString() + "日") ); //<col>[二〇〇九某月某日]|shift</col> } else { ucPrint.ExportData.Add(""); } ucPrint.ExportData.Add("主题词:" + cEntity.SubjectWord); //<col>主题词:(三号黑体,中间空2字符)|shift</col> ucPrint.ExportData.Add("抄送:" + cEntity.CopySenders); //<col>抄送:(仿宋三号,不加粗)|shift</col> ucPrint.ExportData.Add(cEntity.VerifyDate.Year.ToString() + "年" + cEntity.VerifyDate.Month.ToString() + "月" + cEntity.VerifyDate.Day.ToString() + "日印发" /*cEntity.VerifyDate.ToShortDateString()*/); //<col>2009年 月 日印发|shift</col> ucPrint.ExportData.Add(cEntity.Typist); //<col>打字:|inner</col> ucPrint.ExportData.Add(cEntity.Checker); //<col>校对:|right</col> ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "正文";//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Shift; break; #endregion #region 会议纪要模板 case "党群工作全例会会议纪要模版": case "党委会议纪要模版": case "党政联席会纪要模版": ucPrint.ExportData.Add("主题词:" + cEntity.SubjectWord); //<col>主题词:(三号黑体,中间空2字符)|shift</col> ucPrint.ExportData.Add("分送:" + cEntity.CopySenders); //<col>抄送:(仿宋三号,不加粗)|shift</col> ucPrint.ExportData.Add(cEntity.VerifyDate.Year.ToString() + "年" + cEntity.VerifyDate.Month.ToString() + "月" + cEntity.VerifyDate.Day.ToString() + "日印发" /*cEntity.VerifyDate.ToShortDateString()*/); //<col>2009年 月 日印发|shift</col> ucPrint.ExportData.Add(cEntity.Typist); //<col>打字:|inner</col> ucPrint.ExportData.Add(cEntity.Checker); //<col>校对:|right</col> ucPrint.AttachFileList = cEntity.FileList; break; case "党群简报模版": ucPrint.ExportData.Add("分送:" + cEntity.CopySenders); //<col>抄送:(仿宋三号,不加粗)|shift</col> ucPrint.ExportData.Add(cEntity.VerifyDate.Year.ToString() + "年" + cEntity.VerifyDate.Month.ToString() + "月" + cEntity.VerifyDate.Day.ToString() + "日印发" /*cEntity.VerifyDate.ToShortDateString()*/); //<col>2009年 月 日印发|shift</col> ucPrint.ExportData.Add(cEntity.Typist); //<col>打字:|inner</col> ucPrint.ExportData.Add(cEntity.Checker); //<col>校对:|right</col> ucPrint.AttachFileList = cEntity.FileList; break; #endregion #region 党纪工团发文 首页纸模板 case "党委公文首页纸模板": case "工会首页纸": case "共青团首页纸": case "纪律检查委员会首页纸": ucPrint.ExportData.Add(""); //<col>密别:|inner</col> string[] result = cEntity.DocumentNo.Split(new char[] { '<', '>', '[', ']', '(', ')', '〔', '〕', '号' }, StringSplitOptions.RemoveEmptyEntries); if (result.Length != 3) { if (result.Length > 3) { ucPrint.ExportData.Add(result[0]); //<col>海核|shift</col> ucPrint.ExportData.Add(result[1]); //<col>编号|shift</col> ucPrint.ExportData.Add(result[2]); //<col>号|shift</col> } else { int ret = 3 - result.Length; for (int i = 0; i < result.Length; i++) { ucPrint.ExportData.Add(result[i]); } for (int j = 0; j < ret; j++) { ucPrint.ExportData.Add(""); } } } else { ucPrint.ExportData.Add(result[0]); //<col>海核|shift</col> ucPrint.ExportData.Add(result[1]); //<col>编号|shift</col> ucPrint.ExportData.Add(result[2]); //<col>号|shift</col> } ucPrint.ExportData.Add(cEntity.UrgentDegree); //<col>紧急程度:|inner</col> ucPrint.ExportData.Add(cEntity.Signer + "\r\n" + ucPrint.CheckDateTime(cEntity.SignDate.ToShortDateString())); //<col>签发|shift</col> string DetpSigners = FormsMethod.GetSingers4Print(m_ProcessID, m_WorkItemID, "部门会签", "党纪工团发文"); DetpSigners = DetpSigners.Replace("[", "\n["); DetpSigners = DetpSigners.Replace("[", ""); DetpSigners = DetpSigners.Replace("]", ""); DetpSigners = DetpSigners.Replace(" \n", "\n"); //DetpSigners = DetpSigners.Replace(" ", "\r\a"); ucPrint.ExportData.Add(DetpSigners /*cEntity.DeptSigners*/); //<col>会签|down</col> //string sVerify = (string.IsNullOrEmpty(cEntity.Verifiers) ? "" : cEntity.Verifiers + "\r\n" + ucPrint.CheckDateTime(cEntity.VerifyDate.ToShortDateString()) + "\r\n"); string sCVerify = (string.IsNullOrEmpty(cEntity.Verifier) ? "" : cEntity.Verifier + "\r\n" + ucPrint.CheckDateTime(cEntity.VerifyDate.ToShortDateString())); ucPrint.ExportData.Add(sCVerify); //<col>核稿:|down</col> ucPrint.ExportData.Add(cEntity.CheckDrafter + "\r\n" + ucPrint.CheckDateTime(cEntity.CheckDraftDate.ToShortDateString())); //<col>审稿|right</col> string sDrafterDate = ((cEntity.FirstDraftDate == DateTime.MinValue) ? cEntity.DraftDate.ToShortDateString() : cEntity.FirstDraftDate.ToShortDateString()); ucPrint.ExportData.Add(cEntity.Drafter + "\r\n" + sDrafterDate + "\r\n" + cEntity.PhoneNum); //<col>拟拟及稿电人话|right</col> ucPrint.ExportData.Add(cEntity.MainSenders); //<col>主送:|right</col> ucPrint.ExportData.Add(cEntity.CopySenders); //<col>抄送:|right</col> ucPrint.ExportData.Add(cEntity.SubjectWord); //<col>主题词:|right</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>标题:|right</col> ucPrint.ExportData.Add(cEntity.Typist); //<col>打字:|right</col> ucPrint.ExportData.Add(cEntity.Checker); //<col>校对:|right</col> ucPrint.ExportData.Add(cEntity.ShareCount.ToString()); //<col>共印|right</col> //ucPrint.ExportData.Add("第份" + cEntity.SheetCount.ToString() + "张"); //<col>第份 张|shift</col> ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "标题:"; //ucPrint.Mode = WriteMode.Down; break; #endregion #region 党纪工团发文 表单模板 case "党纪工团发文表单": SetBaseExportData(ucPrint, cEntity); string Signers = ""; string Contents = ""; //ResolveSignerAndContent(FormsMethod.GetYiHuiQian(m_ProcessID, "部门会签", m_TemplateID), out Signers, out Contents); string[] str1 = ResolveSignerAndContent(FormsMethod.GetYiHuiQian(m_ProcessID, "部门会签", m_TemplateID)); if (str1 != null && str1.Length == 2) { Signers = str1[0]; Contents = str1[1]; } ucPrint.ExportData.Add(Signers /*cEntity.DeptHaveSigners*/); //<col>已会签人:|right</col> ucPrint.ExportData.Add(Contents /*cEntity.DeptSignComment*/); //<col>意见:|right</col> Signers = ""; Contents = ""; //ResolveSignerAndContent(FormsMethod.GetYiHuiQian(m_ProcessID, "领导会签", m_TemplateID), out Signers, out Contents); string[] str2 = ResolveSignerAndContent(FormsMethod.GetYiHuiQian(m_ProcessID, "领导会签", m_TemplateID)); if (str2 != null && str2.Length == 2) { Signers = str2[0]; Contents = str2[1]; } ucPrint.ExportData.Add(Signers /*cEntity.LeadHaveSigners*/); //<col>已会签人: |right</col> ucPrint.ExportData.Add(Contents /*cEntity.LeadSignComment*/); //<col>意见: |right</col> ucPrint.ExportData.Add(cEntity.Assigners); //<col>分发范围:|right</col> ucPrint.ExportData.Add(ucPrint.AttachFilesList(cEntity.FileList)); break; #endregion } }
public void SetPrintBeginExport(UC_Print ucPrint, EntitySend cEntity) { bool IsContent = false; switch (ucPrint.FileName) { #region 工程会议纪要 case "工程会议纪要": //ucPrint.ExportData.Add(""); //<col>第一期|shift</col> //ucPrint.ExportData.Add("海南核电有限公司 " + DateTime.Now.ToString("yyyy年MM月dd日"));//<col>2009年某月某日|shift</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>[标题]|shift</col> ucPrint.ExportData.Add(cEntity.MainSenders); //<col>[主送单位]|shift</col> //正文 ucPrint.ExportData.Add(""); //<col>[正文仿宋三号,不加粗]|shift</col> ucPrint.ExportData.Add("主题词:" + cEntity.SubjectWord); //<col>主题词:(三号黑体,中间空2字符)|shift</col> ucPrint.ExportData.Add(" 分送:" + cEntity.CopySenders); //<col>分送:(仿宋三号,不加粗)|shift</col> ucPrint.ExportData.Add(cEntity.VerifyDate.Year.ToString() + "年" + cEntity.VerifyDate.Month.ToString() + "月" + cEntity.VerifyDate.Day.ToString() + "日印发" /*cEntity.VerifyDate.ToShortDateString()*/); //<col>2009年 月 日印发|shift</col> ucPrint.ExportData.Add(cEntity.Typist); //<col>打字:|right</col> ucPrint.ExportData.Add(cEntity.Checker); //<col>校对:|inner</col> ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "正文";//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Shift; break; #endregion #region 公文报告模版 case "公文报告模版": //ucPrint.ExportData.Add(cEntity.DocumentNo); //<col>海核 发﹝2009﹞ 号|shift</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>[标题]|shift</col> ucPrint.ExportData.Add(cEntity.MainSenders); //<col>[主送单位]|shift</col> //正文 ucPrint.ExportData.Add(""); //<col>[正文仿宋三号,不加粗]|shift</col> for (int i = 0; i < cEntity.FileList.Count; i++) { if (cEntity.FileList[i].IsZhengWen == "1") { IsContent = true; break; } } if (IsContent) { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.Year.ToString() + "年" + cEntity.DraftDate.Month.ToString() + "月" + cEntity.DraftDate.Day.ToString() + "日") ); //<col>[二〇〇九某月某日]|shift</col> } else { ucPrint.ExportData.Add(""); } ucPrint.ExportData.Add("主题词:" + cEntity.SubjectWord); //<col>主题词:(三号黑体,中间空2字符)|shift</col> ucPrint.ExportData.Add(" 抄送:" + cEntity.CopySenders); //<col>抄送:(仿宋三号,不加粗)|shift</col> ucPrint.ExportData.Add(cEntity.VerifyDate.Year.ToString() + "年" + cEntity.VerifyDate.Month.ToString() + "月" + cEntity.VerifyDate.Day.ToString() + "日印发" /*cEntity.VerifyDate.ToShortDateString()*/); //<col>2009年 月 日印发|shift</col> ucPrint.ExportData.Add(cEntity.Typist); //<col>打字:|right</col> ucPrint.ExportData.Add(cEntity.Checker); //<col>校对:|inner</col> ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "主题词:" + cEntity.SubjectWord;//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Up; break; #endregion #region 公文函模版 case "公文函模版": //ucPrint.ExportData.Add(cEntity.DocumentNo); //<col>海核 发﹝2009﹞ 号|shift</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>[标题]|shift</col> ucPrint.ExportData.Add(cEntity.MainSenders); //<col>[主送单位]|shift</col> //正文 ucPrint.ExportData.Add(""); //<col>[正文仿宋三号,不加粗]|shift</col> for (int i = 0; i < cEntity.FileList.Count; i++) { if (cEntity.FileList[i].IsZhengWen == "1") { IsContent = true; break; } } if (IsContent) { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.Year.ToString() + "年" + cEntity.DraftDate.Month.ToString() + "月" + cEntity.DraftDate.Day.ToString() + "日") ); //<col>[二〇〇九年某月某日]|shift</col> } else { ucPrint.ExportData.Add(""); } ucPrint.ExportData.Add("主题词:" + cEntity.SubjectWord); //<col>主题词:(三号黑体,中间空2字符)|shift</col> ucPrint.ExportData.Add(" 抄送:" + cEntity.CopySenders); //<col> 抄送:(仿宋三号,不加粗)|shift</col> ucPrint.ExportData.Add(cEntity.VerifyDate.Year.ToString() + "年" + cEntity.VerifyDate.Month.ToString() + "月" + cEntity.VerifyDate.Day.ToString() + "日印发" ); //<col>2009年 月 日印发|shift</col> ucPrint.ExportData.Add(cEntity.Typist); //<col>打字:|right</col> ucPrint.ExportData.Add(cEntity.Checker); //<col>校对:|inner</col> ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "主题词:" + cEntity.SubjectWord; //ucPrint.Mode = WriteMode.Up; break; #endregion #region 公文请示模版 case "公文请示模版": //ucPrint.ExportData.Add(cEntity.DocumentNo + " " + cEntity.SignerName); //<col>海核办发[2009]1号|shift</col> //ucPrint.ExportData.Add(cEntity.SignerName); //<col>签发人:|inner</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>[标题]|shift</col> ucPrint.ExportData.Add(cEntity.MainSenders); //<col>[主送单位]|shift</col> //正文 ucPrint.ExportData.Add(""); //<col>[正文仿宋三号,不加粗]|shift</col> //bool IsContent = false; for (int i = 0; i < cEntity.FileList.Count; i++) { if (cEntity.FileList[i].IsZhengWen == "1") { IsContent = true; break; } } if (IsContent) { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.Year.ToString() + "年" + cEntity.DraftDate.Month.ToString() + "月" + cEntity.DraftDate.Day.ToString() + "日") ); //<col>[二〇〇九年某月某日]|shift</col> } else { ucPrint.ExportData.Add(""); } ucPrint.ExportData.Add("主题词:" + cEntity.SubjectWord); //<col>主题词:(三号黑体,中间空2字符)|shift</col> ucPrint.ExportData.Add(" 抄送:" + cEntity.CopySenders); // 抄送:(仿宋三号,不加粗)|shift</col> ucPrint.ExportData.Add(cEntity.VerifyDate.Year.ToString() + "年" + cEntity.VerifyDate.Month.ToString() + "月" + cEntity.VerifyDate.Day.ToString() + "日印发" ); //<col>2009年 月 日印发|shift</col> ucPrint.ExportData.Add(cEntity.Typist); //<col>打字:|right</col> ucPrint.ExportData.Add(cEntity.Checker); //<col>校对:|inner</col> ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "主题词:" + cEntity.SubjectWord; //ucPrint.Mode = WriteMode.Up; break; #endregion #region 公文首页纸 case "公文首页纸": ucPrint.ExportData.Add(""); //<col>密别:|inner</col> string[] result = cEntity.DocumentNo.Split(new char[] { '<', '>', '[', ']', '(', ')', '〔', '〕', '号' }, StringSplitOptions.RemoveEmptyEntries); if (result.Length != 3) { if (result.Length > 3) { ucPrint.ExportData.Add(result[0]); //<col>海核|shift</col> ucPrint.ExportData.Add(result[1]); //<col>编号|shift</col> ucPrint.ExportData.Add(result[2]); //<col>号|shift</col> } else { int ret = 3 - result.Length; for (int i = 0; i < result.Length; i++) { ucPrint.ExportData.Add(result[i]); } for (int j = 0; j < ret; j++) { ucPrint.ExportData.Add(""); } } } else { ucPrint.ExportData.Add(result[0]); //<col>海核|shift</col> ucPrint.ExportData.Add(result[1]); //<col>编号|shift</col> ucPrint.ExportData.Add(result[2]); //<col>号|shift</col> } ucPrint.ExportData.Add(cEntity.UrgentDegree); //<col>紧急程度:|inner</col> ucPrint.ExportData.Add(cEntity.SignerName + "\r\n" + ucPrint.CheckDateTime(cEntity.SignDate.ToShortDateString())); //<col>签发|shift</col> string DetpSigners = FormsMethod.GetSingers4Print(m_ProcessID, m_WorkItemID, "部门会签", "公司发文"); string[] results = DetpSigners.Split(new char[] { '[', ']' }, StringSplitOptions.RemoveEmptyEntries); //renjinquan+ 去除空值 if (results.Length == 0) { ucPrint.ExportData.Add(DetpSigners /*cEntity.DeptSigners*/); //<col>会签|down</col> } else { //if (results.Length >= 2) // ucPrint.ExportData.Add(results[0] + "\n" + results[1]); string strNames = ""; for (int i = 0; i < results.Length; i++) { if (i % 2 == 0) { strNames += (results[i].TrimStart(' ') != "\n" ? (results[i] + "\n") : ""); } else { try { strNames += DateTime.Parse(results[i]).ToShortDateString(); } catch { } } } ucPrint.ExportData.Add(strNames); } string sVerify = (string.IsNullOrEmpty(cEntity.ZhuRenSigner) ? "" : cEntity.ZhuRenSigner + "\r\n" + ucPrint.CheckDateTime(cEntity.ZhuRenSignDate.ToShortDateString()) + "\r\n"); string sCVerify = (string.IsNullOrEmpty(cEntity.Verifier) ? "" : cEntity.Verifier + "\r\n" + ucPrint.CheckDateTime(cEntity.VerifyDate.ToShortDateString())); ucPrint.ExportData.Add(sVerify + sCVerify); //<col>核稿:|down</col> ucPrint.ExportData.Add(cEntity.CheckDrafterName + "\r\n" + ucPrint.CheckDateTime(cEntity.CheckDate.ToShortDateString())); //<col>审稿|right</col> string sDrafterDate = ((cEntity.FirstDraftDate == DateTime.MinValue) ? cEntity.DraftDate.ToShortDateString() : cEntity.FirstDraftDate.ToShortDateString()); ucPrint.ExportData.Add(cEntity.Drafter + "\r\n" + sDrafterDate + "\r\n" + cEntity.PhoneNum); //<col>拟拟及稿电人话|right</col> ucPrint.ExportData.Add(cEntity.MainSenders); //<col>主送:|right</col> ucPrint.ExportData.Add(cEntity.CopySenders); //<col>抄送:|right</col> ucPrint.ExportData.Add(cEntity.SubjectWord); //<col>主题词:|right</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>标题:|right</col> ucPrint.ExportData.Add(cEntity.Typist); //<col>打字:|right</col> ucPrint.ExportData.Add(cEntity.Checker); //<col>校对:|right</col> ucPrint.ExportData.Add(cEntity.ShareCount.ToString()); //<col>共印|right</col> //ucPrint.ExportData.Add("第份" + cEntity.SheetCount.ToString() + "张"); //<col>第份 张|shift</col> ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "标题:"; //ucPrint.Mode = WriteMode.Down; break; #endregion #region 公文通知模版 case "公文通知模版": //ucPrint.ExportData.Add(cEntity.DocumentNo); //<col>海核 发﹝2009﹞ 号|shift</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>[标题]|shift</col> ucPrint.ExportData.Add(cEntity.MainSenders); //<col>[主送单位]|shift</col> //正文 ucPrint.ExportData.Add(""); //<col>[正文仿宋三号,不加粗]|shift</col> for (int i = 0; i < cEntity.FileList.Count; i++) { if (cEntity.FileList[i].IsZhengWen == "1") { IsContent = true; break; } } if (IsContent) { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.Year.ToString() + "年" + cEntity.DraftDate.Month.ToString() + "月" + cEntity.DraftDate.Day.ToString() + "日") ); //<col>[二〇〇九年某月某日]|shift</col> } else { ucPrint.ExportData.Add(""); } ucPrint.ExportData.Add("主题词:" + cEntity.SubjectWord); //<col>主题词:(三号黑体,中间空2字符)|shift</col> ucPrint.ExportData.Add(" 抄送:" + cEntity.CopySenders); //<col> 抄送:(仿宋三号,不加粗)|shift</col> ucPrint.ExportData.Add(cEntity.VerifyDate.Year.ToString() + "年" + cEntity.VerifyDate.Month.ToString() + "月" + cEntity.VerifyDate.Day.ToString() + "日印发" ); //<col>2009年 月 日印发|shift</col> ucPrint.ExportData.Add(cEntity.Typist); //<col>打字:|right</col> ucPrint.ExportData.Add(cEntity.Checker); //<col>校对:|inner</col> ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "主题词:" + cEntity.SubjectWord;//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Up; break; #endregion #region 会议纪要模版 case "会议纪要模版": ucPrint.ExportData.Add(cEntity.DocumentNo); //<col>海核纪要[2009]号|shift</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>[标题]|shift</col> ucPrint.ExportData.Add(cEntity.MainSenders); //<col>[主送单位]|shift</col> ucPrint.ExportData.Add(""); //<col>[正文仿宋三号,不加粗]|shift</col> for (int i = 0; i < cEntity.FileList.Count; i++) { if (cEntity.FileList[i].IsZhengWen == "1") { IsContent = true; break; } } if (IsContent) { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.Year.ToString() + "年" + cEntity.DraftDate.Month.ToString() + "月" + cEntity.DraftDate.Day.ToString() + "日") ); //<col>[二〇〇九年某月某日]|shift</col> } else { ucPrint.ExportData.Add(""); } ucPrint.ExportData.Add("主题词:" + cEntity.SubjectWord); //<col>主题词:*** ** 纪要(三号黑体,中间空2字符)|shift</col> ucPrint.ExportData.Add(" 抄送:" + cEntity.CopySenders); //<col>抄送:(仿宋三号,不加粗)|shift</col> ucPrint.ExportData.Add(cEntity.VerifyDate.Year.ToString() + "年" + cEntity.VerifyDate.Month.ToString() + "月" + cEntity.VerifyDate.Day.ToString() + "日印发"); //<col>2009年 月 日印发|shift</col> ucPrint.ExportData.Add(cEntity.Typist); //<col>打字:|inner</col> ucPrint.ExportData.Add(cEntity.Checker); //<col>校对:|inner</col> ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "主题词:" + cEntity.SubjectWord; //ucPrint.Mode = WriteMode.Up; break; #endregion #region 简报模版 case "简报模版": //ucPrint.ExportData.Add(""); //<col>中核集团海南核电有限公司深入学习实践科学发展观活动|shift</col> //ucPrint.ExportData.Add(""); //<col>第期|shift</col> //ucPrint.ExportData.Add(""); //<col>海南核电有限公司深入学习实践|shift</col> //ucPrint.ExportData.Add(""); //<col>科学发展观活动领导小组办公室|shift</col> /*"海南核电有限公司深入学习实践\r\n" +"科学发展观活动领导小组办公室"*/ //ucPrint.ExportData.Add(DateTime.Now.ToString("yyyy年MM月dd日"));//<col>二〇〇九年 月 日|shift</col> //ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>[标题]|shift</col> ucPrint.ExportData.Add(cEntity.MainSenders); //<col>[主送单位]|shift</col> ucPrint.ExportData.Add(""); //<col>[正文仿宋三号,不加粗]|shift</col> for (int i = 0; i < cEntity.FileList.Count; i++) { if (cEntity.FileList[i].IsZhengWen == "1") { IsContent = true; break; } } /* * if (IsContent) * { * ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.SendDate.Year.ToString() + "年" + cEntity.SendDate.Month.ToString() + "月" + cEntity.SendDate.Day.ToString() + "日") + ); //<col>[二〇〇九年某月某日]|shift</col> + } + else + { + ucPrint.ExportData.Add(""); + } + + ucPrint.ExportData.Add(cEntity.ReceiveUserName); //<col>分送:|right</col> + ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.ReceiveDateTime.Year.ToString() + "年" + cEntity.ReceiveDateTime.Month.ToString() + "月" + cEntity.ReceiveDateTime.Day.ToString() + "日印发") + ); //<col>2009年 月 日印发|shift</col> + + ucPrint.ExportData.Add(cEntity.Typist); //<col>打字:|right</col> + ucPrint.ExportData.Add(cEntity.Checker); //<col>校对:|inner</col> */ ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "分送:"; //ucPrint.Mode = WriteMode.Up; break; #endregion #region 简讯模版 case "简讯模版": //ucPrint.ExportData.Add("海南核电有限公司办公室编" + " " + DateTime.Now.ToString("yyyy年MM月dd日")); //<col>海南核电有限公司办公室编 二〇〇九年 月 日|shift</col> //ucPrint.ExportData.Add(DateTime.Now.ToString("yyyy年MM月dd日")); //<col>二〇〇九年某月某日|shift</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>[标题]|shift</col> ucPrint.ExportData.Add(cEntity.MainSenders /*OAList.GetDeptNameByID(cEntity.HostDept)*/); //<col>[主送单位] |shift</col> //正文 ucPrint.ExportData.Add(""); //<col>[正文仿宋三号,不加粗] |shift</col> ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "附件"; //ucPrint.Mode = WriteMode.Up; break; #endregion case "公司发文表单": SetBaseExportData(ucPrint, cEntity); string Signers = ""; string Contents = ""; //ResolveSignerAndContent(FormsMethod.GetYiHuiQian(m_ProcessID, "部门会签", m_TemplateID), out Signers, out Contents); string[] str1 = ResolveSignerAndContent(FormsMethod.GetYiHuiQian(m_ProcessID, "部门会签", m_TemplateID)); if (str1 != null /*&& str1.Length == 2*/) { for (int i = 0; i < str1.Length; i += 2) { if (i >= str1.Length) { break; } Signers += (str1[i] + "\n"); Contents += (str1[i + 1] + "\n"); } } ucPrint.ExportData.Add(Signers /*cEntity.DeptHaveSigners*/); //<col>已会签人:|right</col> ucPrint.ExportData.Add(Contents /*cEntity.DeptSignComment*/); //<col>意见:|right</col> Signers = ""; Contents = ""; //ResolveSignerAndContent(FormsMethod.GetYiHuiQian(m_ProcessID, "领导会签", m_TemplateID), out Signers, out Contents); string[] str2 = ResolveSignerAndContent(FormsMethod.GetYiHuiQian(m_ProcessID, "领导会签", m_TemplateID)); if (str2 != null /*&& str2.Length == 2*/) { for (int i = 0; i < str2.Length; i += 2) { if (i >= str2.Length) { break; } Signers += (str2[i] + "\n"); Contents += (str2[i + 1] + "\n"); } } ucPrint.ExportData.Add(Signers /*cEntity.LeadHaveSigners*/); //<col>已会签人: |right</col> ucPrint.ExportData.Add(Contents /*cEntity.LeadSignComment*/); //<col>意见: |right</col> ucPrint.ExportData.Add(cEntity.CirculateAddNames); //<col>分发范围:|right</col> ucPrint.ExportData.Add(ucPrint.AttachFilesList(cEntity.FileList)); break; } }
public void SetPrintBeginExport(UC_Print ucPrint, B_PF cEntity) { switch (ucPrint.FileName) { case "程序文件表单": SetBaseExportData(ucPrint, cEntity); ucPrint.ExportData.Add(cEntity.CirculateSignDept); //<col>部门:|inner</col> ucPrint.ExportData.Add(cEntity.CirculateSignUserName); //<col>人员:|inner</col> ucPrint.ExportData.Add(cEntity.CirculateDeptName); //<col>部门: |inner</col> ucPrint.ExportData.Add(cEntity.CirculateName); //<col>人员: |inner</col> ucPrint.ExportData.Add(cEntity.CirculateComment); //<col>意见:|right</col> ucPrint.ExportData.Add(ucPrint.AttachFilesList(cEntity.FileList)); //<col>附件:|down</col> break; case "管理程序变更申请表": if (cEntity.ProgramSort == "管理程序") { ucPrint.ExportData.Add("管理程序变更申请表"); //<col>管理程序变更申请表|shift</col> ucPrint.ExportData.Add("HN-LL431"); //<col>HN-LL431|shift</col> } if (cEntity.ProgramSort == "工作程序") { ucPrint.ExportData.Add("工作程序变更申请表"); //<col>管理程序变更申请表|shift</col> ucPrint.ExportData.Add("HN-LL432"); //<col>HN-LL431|shift</col> } if (cEntity.ProgramSort == "部门级管理程序") { ucPrint.ExportData.Add("管理程序变更申请表"); //<col>管理程序变更申请表|shift</col> ucPrint.ExportData.Add("HN-LL433"); //<col>HN-LL431|shift</col> } ucPrint.ExportData.Add(string.IsNullOrEmpty(cEntity.Year) ? DateTime.Now.Year.ToString() : cEntity.Year); //<col>年份|shift</col> /*待定*/ ucPrint.ExportData.Add(cEntity.SerialID); //<col>序号|shift</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>文件名称|right</col> ucPrint.ExportData.Add(cEntity.ProgramCode + " , " + cEntity.Edition); //<col>编码版本|right</col> ucPrint.ExportData.Add(OADept.GetDeptName(cEntity.SendDeptID)); //<col>申请部门|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.ToShortDateString())); //<col>申请日期|right</col> ucPrint.ExportData.Add(cEntity.ApplyStyle); //<col>申请类型|right</col> //ucPrint.ExportData.Add(cEntity.ApplyReason); //<col>原因:|inner</col> //ucPrint.ExportData.Add(cEntity.RelationProgram/*RelationDemand*/); //<col>可能受到影响的程序:|inner</col> ucPrint.ExportData.Add(cEntity.Drafter); //<col>申请人姓名|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.ToShortDateString())); //<col>日期|right</col> ucPrint.ExportData.Add(OAUser.GetDeptManager(cEntity.SendDeptID, ConstString.Grade.ZERO)); //<col>编制部门负责人姓名|right</col> //M_20100414 huangqi des:编写时间改为FirstDraftDate //begin if (cEntity.FirstDraftDate != DateTime.MinValue) { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.FirstDraftDate.ToShortDateString())); //<col>日期 |right</col> } else { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.ToShortDateString())); } //end //ucPrint.ExportData.Add(cEntity.QualityApproveComment //PF.GetNotionComment(cEntity.ProcessID, ConstString.ProcessStepName.PROGRAM_QUALITY)*/); //<col>意见:|inner</col> ucPrint.ExportData.Add(cEntity.AuditName); //<col>审核人姓名|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.AuditDate.ToShortDateString())); //<col>日期 |right</col> ucPrint.ExportData.Add(cEntity.QualityNames); //<col>质保处负责人姓名|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.QualityDate.ToShortDateString())); //<col>日期 |right</col> ucPrint.ExportData.Add("该程序已经更新发布"); //<col>网页更新结果:|inner</col> /*待定*/ ucPrint.ExportData.Add("" /*OAList.GetUserNameByWorkItemID(cEntity.WorkItemID)*/); //<col>信息文档处操作人姓名|right</col> //ucPrint.ExportData.Add(string.IsNullOrEmpty(cEntity.SendDate.ToShortDateString()) ? // DateTime.Now.ToShortDateString() : ucPrint.CheckDateTime(cEntity.SendDate.ToShortDateString()) // ); //<col>日期 |right</col> ucPrint.ExportData.Add(string.IsNullOrEmpty(ucPrint.CheckDateTime(cEntity.SendDate.ToShortDateString())) ? DateTime.Now.ToShortDateString() : ucPrint.CheckDateTime(cEntity.SendDate.ToShortDateString())); //<col>日期 |right</col> ucPrint.AttachFileList = cEntity.FileList; ucPrint.Position = "可能受到影响的程序:";//(string)ucPrint.ExportData[2]; ucPrint.Mode = WriteMode.Up; break; case "管理程序封面模板": if (cEntity.ProgramSort == "管理程序") { ucPrint.ExportData.Add("管理程序"); //<col>管理程序|shift</col> //ucPrint.ExportData.Add("HN-LL431-" + (string.IsNullOrEmpty(cEntity.Year) ? DateTime.Now.Year.ToString() : cEntity.Year) + "-" + cEntity.SerialID); //<col>HN编码:|right</col> } if (cEntity.ProgramSort == "工作程序") { ucPrint.ExportData.Add("工作程序"); //<col>管理程序|shift</col> //ucPrint.ExportData.Add("HN-LL432-" + (string.IsNullOrEmpty(cEntity.Year) ? DateTime.Now.Year.ToString() : cEntity.Year) + "-" + cEntity.SerialID); //<col>HN编码:|right</col> cEntity.QualityNames = ""; } if (cEntity.ProgramSort == "部门级管理程序") { ucPrint.ExportData.Add("管理程序"); //<col>管理程序|shift</col> //ucPrint.ExportData.Add("HN-LL433-" + (string.IsNullOrEmpty(cEntity.Year) ? DateTime.Now.Year.ToString() : cEntity.Year) + "-" + cEntity.SerialID); //<col>HN编码:|right</col> } ucPrint.ExportData.Add(cEntity.ProgramCode); ucPrint.ExportData.Add(cEntity.Edition); //<col>版次:|right</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>程序名称|shift</col> if (cEntity.ApproveDate.ToShortDateString() == DateTime.MinValue.ToShortDateString()) { ucPrint.ExportData.Add(""); ucPrint.ExportData.Add(""); } else { ucPrint.ExportData.Add(cEntity.ApproveName); //<col>批准实施:|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.ApproveDate.ToShortDateString())); //<col>生效日期:|right</col> } ucPrint.ExportData.Add(cEntity.WriteName); //<col>编制姓名|shift</col> //M_20100414 huangqi des:编写时间改为FirstDraftDate //begin if (cEntity.FirstDraftDate != DateTime.MinValue) { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.FirstDraftDate.ToShortDateString())); //<col>日期 |shift</col> } else { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.ToShortDateString())); } //end ucPrint.ExportData.Add(cEntity.CheckName); //<col>校核姓名|shift</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.CheckDate.ToShortDateString())); //<col>校核日期|shift</col> ucPrint.ExportData.Add(cEntity.AuditName); //<col>审核姓名|shift</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.AuditDate.ToShortDateString())); //<col>审核日期|shift</col> ucPrint.ExportData.Add(cEntity.QualityNames); //<col>质保姓名|shift</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.QualityDate.ToShortDateString())); //<col>质保日期|shift</col> ucPrint.ExportData.Add(OADept.GetDeptName(cEntity.SendDeptID)); //<col>程序编制部门:|shift</col> ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "";//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Up; break; case "程序审查意见落实表": //string num = ""; //if (cEntity.ProgramSort == "管理程序") //{ // num = "HN-LL431-"; //} //if (cEntity.ProgramSort == "工作程序") //{ // num = "HN-LL432-"; //} //if (cEntity.ProgramSort == "部门级管理程序") //{ // num = "HN-LL433-"; //} //ucPrint.ExportData.Add(num + (string.IsNullOrEmpty(cEntity.Year) ? DateTime.Now.Year.ToString() : cEntity.Year) + "-" + cEntity.SerialID); //<col>年份|shift</col> ucPrint.ExportData.Add(cEntity.ProgramCode); ///*待定*/ ucPrint.ExportData.Add(""); //<col>第|right</col> ucPrint.ExportData.Add(cEntity.DocumentTitle); //<col>程序名称:|inner</col> ucPrint.ExportData.Add(cEntity.ProgramCode + " " + cEntity.Edition); //<col>程序编码和版本:|inner</col> //renjinquan+ //if (cEntity.ProgramSort == "管理程序") //{ // //ucPrint.ExportData.Add("管理程序"); //<col>管理程序|shift</col> // ucPrint.ExportData.Add("HN-LL431"+" " + cEntity.Edition); //<col>HN编码:|right</col> //} //if (cEntity.ProgramSort == "工作程序") //{ // //ucPrint.ExportData.Add("工作程序"); //<col>管理程序|shift</col> // ucPrint.ExportData.Add("HN-LL432"+" " + cEntity.Edition); //<col>HN编码:|right</col> //} //if (cEntity.ProgramSort == "部门级管理程序") //{ // //ucPrint.ExportData.Add("管理程序"); //<col>管理程序|shift</col> // ucPrint.ExportData.Add("HN-LL433"+" " + cEntity.Edition); //<col>HN编码:|right</col> //} //ucPrint.ExportData.Add(cEntity.RelationDemand); //<col>对相关程序修订要求或建议:|inner</col> //ucPrint.ExportData.Add(cEntity.RelationProgram/*cEntity.DocumentTitle + "" + cEntity.ProgramCode*/); //<col>相关程序名称和编码:|inner</col> //ucPrint.ExportData.Add(cEntity.ApproveName); //<col>批准|right</col> //ucPrint.ExportData.Add(cEntity.ApproveDate.ToShortDateString()); //<col>日期|right</col> ucPrint.ExportData.Add(cEntity.AuditName); //<col>审核|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.AuditDate.ToShortDateString())); //<col>日期 |right</col> ucPrint.ExportData.Add(cEntity.CheckName); //<col>校核|right</col> ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.CheckDate.ToShortDateString())); //<col>日期 |right</col> ucPrint.ExportData.Add(cEntity.WriteName); //<col>编制|right</col> //M_20100414 huangqi des:编写时间改为FirstDraftDate //begin if (cEntity.FirstDraftDate != DateTime.MinValue) { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.FirstDraftDate.ToShortDateString())); //<col>日期 |right</col> } else { ucPrint.ExportData.Add(ucPrint.CheckDateTime(cEntity.DraftDate.ToShortDateString())); } //end ucPrint.AttachFileList = cEntity.FileList; //ucPrint.Position = "";//(string)ucPrint.ExportData[2]; //ucPrint.Mode = WriteMode.Up; break; } }