/// <summary> /// 控件填充实体 /// </summary> /// <param name="IsSave">是否保存</param> /// <returns>EntityBase</returns> protected override EntityBase ControlToEntity(Boolean p_blnIsSaveDraft) { B_MergeReceiveBase l_objReceiveBase = base.EntityData != null ? base.EntityData as B_MergeReceiveBase : new B_MergeReceiveBase(); l_objReceiveBase.TemplateName = this.SubTemplateName; l_objReceiveBase.RegisterID = base.RegisterID; l_objReceiveBase.Officer = ddlPoliticalOfficer.SelectedValue; if (!String.IsNullOrEmpty(l_objReceiveBase.Officer)) { l_objReceiveBase.OfficerName = ddlPoliticalOfficer.SelectedItem.Text; } l_objReceiveBase.Officer_Comment = txtPoliticalOfficerComment.Text.TrimEnd(); //附件信息 l_objReceiveBase.FileList = this.ucAttachment.UCDataList; //意见列表 l_objReceiveBase.CommentList = base.Comments; //收文号 l_objReceiveBase.DocumentNo = this.txtReceiveNo.Text; //收文日期 l_objReceiveBase.DocumentReceiveDate = this.txtReceiveDate.ValDate; //文件名称 l_objReceiveBase.DocumentTitle = this.txtDocumentTitle.Text; //原文号 l_objReceiveBase.SendNo = this.txtSendLetterNo.Text; //来文单位 l_objReceiveBase.CommunicationUnit = this.txtCommunicationUnit.Text; //预立卷号 l_objReceiveBase.VolumeNo = this.txtPreVolumeNo.Text; //紧急程度 l_objReceiveBase.UrgentDegree = this.txtUrgentDegree.Text; //提交时间 l_objReceiveBase.SubmitDate = DateTime.Now; if (String.IsNullOrEmpty(l_objReceiveBase.Drafter)) { //发起人ID l_objReceiveBase.DrafterID = CurrentUserInfo.UserName; //发起人姓名 l_objReceiveBase.Drafter = CurrentUserInfo.DisplayName; //发起日期 l_objReceiveBase.DraftDate = DateTime.Now; } else { //发起人ID l_objReceiveBase.DrafterID = l_objReceiveBase.ReceiveUserID; //发起人姓名 l_objReceiveBase.Drafter = l_objReceiveBase.ReceiveUserName; //发起日期 l_objReceiveBase.DraftDate = txtDraftDate.ValDate; } //公司领导批示 l_objReceiveBase.LeaderShip = this.ddlLeadShip.SelectedValue; if (!String.IsNullOrEmpty(this.ddlLeadShip.SelectedValue)) { l_objReceiveBase.LeaderShipName = this.ddlLeadShip.SelectedItem.Text; } if (base.StepName == ProcessConstString.StepName.ReceiveStepName.STEP_INSTRUCTION) { l_objReceiveBase.LS_Comment = this.txtLeadCommentEdit.Text.TrimEnd(); l_objReceiveBase.LS_Date = System.DateTime.Now.ToString(); } else { l_objReceiveBase.LS_Comment = this.txtLeadCommentView.Text.TrimEnd(); } //承办部门 if (!String.IsNullOrEmpty(this.txtUnderTakeDeptID.Text.TrimEnd())) { l_objReceiveBase.UnderTakeDept = this.txtUnderTakeDeptID.Text; l_objReceiveBase.UnderTakeDeptName = this.txtUnderTakeDeptName.Text; l_objReceiveBase.UnderTakeDeptLeaderID = OAUser.GetUserByDeptPostArray(this.txtUnderTakeDeptID.Text, null, true, true)[0]; } //承办科室 if (!String.IsNullOrEmpty(this.ddlUnderTakeSection.SelectedValue)) { l_objReceiveBase.UnderTakeChief = this.ddlUnderTakeSection.SelectedValue; l_objReceiveBase.UnderTakeChiefName = this.ddlUnderTakeSection.SelectedItem.Text; l_objReceiveBase.UnderTakeChiefLeaderID = FormsMethod.GetUserIDByViewBase(OAUser.GetDeptManager(this.ddlUnderTakeSection.SelectedValue, 0)); } //承办人员 if (!String.IsNullOrEmpty(this.ddlUnderTakePeople.SelectedValue)) { l_objReceiveBase.UnderTakePeople = this.ddlUnderTakePeople.SelectedValue; l_objReceiveBase.UnderTakePeopleName = this.ddlUnderTakePeople.SelectedItem.Text; } if (p_blnIsSaveDraft) { l_objReceiveBase.UnderTake_Comment = this.txtUnderTakeCommentEdit.Text; } //传阅 l_objReceiveBase.CPeopleName = this.txtCirculatePeopleName.Text; l_objReceiveBase.CPeopleID = this.txtCirculatePeopleID.Text; l_objReceiveBase.CDeptName = this.txtCirculateDeptName.Text; l_objReceiveBase.CDeptID = this.txtCirculateDeptID.Text; if (base.StepName == ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_DIRECTOR || base.StepName == ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_CHIEF || base.StepName == ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_MEMBER) { if (!p_blnIsSaveDraft) { CYiJian l_objComment = new CYiJian(); l_objComment.Content = this.txtUnderTakeCommentEdit.Text; l_objComment.FinishTime = DateTime.Now.ToString(); l_objComment.UserID = l_objReceiveBase.ReceiveUserID; l_objComment.UserName = l_objReceiveBase.ReceiveUserName; l_objComment.ViewName = base.StepName; l_objComment.Action = m_strSubmitAction; l_objReceiveBase.CommentList.Add(l_objComment); } } else if (base.StepName == ProcessConstString.StepName.ReceiveStepName.STEP_PLOT) { if (!p_blnIsSaveDraft) { CYiJian l_objComment = new CYiJian(); l_objComment.Content = this.txtPoliticalOfficerComment.Text; l_objComment.FinishTime = DateTime.Now.ToString(); l_objComment.UserID = l_objReceiveBase.ReceiveUserID; l_objComment.UserName = l_objReceiveBase.ReceiveUserName; l_objComment.ViewName = base.StepName; l_objComment.Action = m_strSubmitAction; l_objReceiveBase.CommentList.Add(l_objComment); } } else if (base.StepName == ProcessConstString.StepName.ReceiveStepName.STEP_INSTRUCTION) { if (!p_blnIsSaveDraft) { CYiJian l_objComment = new CYiJian(); l_objComment.Content = this.txtLeadCommentEdit.Text; l_objComment.FinishTime = DateTime.Now.ToString(); l_objComment.UserID = l_objReceiveBase.ReceiveUserID; l_objComment.UserName = l_objReceiveBase.ReceiveUserName; l_objComment.ViewName = base.StepName; l_objComment.Action = m_strSubmitAction; l_objReceiveBase.CommentList.Add(l_objComment); } } else if (base.StepName == ProcessConstString.StepName.ReceiveStepName.STEP_PROCESS_CENTER) { if (!p_blnIsSaveDraft && m_strSubmitAction == ProcessConstString.SubmitAction.ReceiveBase.SUBMIT_UNDERTAKE) { CYiJian l_objComment = new CYiJian(); l_objComment.Content = this.txtUnderTakeCommentEdit.Text; l_objComment.FinishTime = DateTime.Now.ToString(); l_objComment.UserID = l_objReceiveBase.ReceiveUserID; l_objComment.UserName = l_objReceiveBase.ReceiveUserName; l_objComment.ViewName = base.StepName; l_objComment.Action = m_strSubmitAction; l_objReceiveBase.CommentList.Add(l_objComment); } } l_objReceiveBase.IsFormSave = p_blnIsSaveDraft; if (p_blnIsSaveDraft) { l_objReceiveBase.Prompt = this.txtPrompt.Text; l_objReceiveBase.PromptEdit = this.txtPromptEdit.Text; } else { if (!String.IsNullOrEmpty(this.txtPromptEdit.Text.TrimEnd())) { l_objReceiveBase.Prompt = this.txtPrompt.Text + "[" + (l_objReceiveBase.ReceiveUserName == string.Empty ? CurrentUserInfo.DisplayName : l_objReceiveBase.ReceiveUserName) + "][" + System.DateTime.Now.ToString(ConstString.DateFormat.Long) + "]:" + this.txtPromptEdit.Text + ConstString.Miscellaneous.NEW_LINE; } } return(l_objReceiveBase); }
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; } }