/// <summary> /// 流程类型选择事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ddlProcessTemplate_SelectedIndexChanged(object sender, EventArgs e) { LoadProcessSteps(); #region 根据流程类型绑定特有字段 switch (this.ddlProcessTemplate.SelectedValue) { //公司发文 case ProcessConstString.TemplateName.COMPANY_SEND: case ProcessConstString.TemplateName.DJGT_Send: //renjinquan+ OADept.GetDeptByIfloor(drpGFDept, 1); break; //公司收文 case ProcessConstString.TemplateName.COMPANY_RECEIVE: case ProcessConstString.TemplateName.MERGED_RECEIVE: //renjinquan+ break; //函件收文 case ProcessConstString.TemplateName.LETTER_RECEIVE: OAList.BindHJLX2(ddlHSLetterType, true); break; //函件发文 case ProcessConstString.TemplateName.LETTER_SEND: OAList.BindHJLX(ddlHFLetterType, true); OADept.GetDeptByIfloor(this.ddlHFDept, 1); break; //程序文件 case ProcessConstString.TemplateName.PROGRAM_FILE: OADept.GetDeptByIfloor(this.ddlPFDept, 1); break; //工作联系单 case ProcessConstString.TemplateName.AFFILIATION: OADept.GetDeptByIfloor(this.ddlWRHostDept, 1); OADept.GetDeptByIfloor(this.ddlWRMainSendDept, 1); break; //请示报告 case ProcessConstString.TemplateName.INSTUCTION_REPORT: OAUser.GetUserByRole(this.ddlMainSendleader, OUConstString.RoleName.COMPANY_LEADER); OADept.GetDeptByIfloor(this.ddlUnderTakeDept, 1); OADept.GetDeptByIfloor(this.ddlHostDept, 1); break; } #endregion //chenye //LoadProcessList(); }
/// <summary> /// 流程类型选择事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ddlProcessTemplate_SelectedIndexChanged(object sender, EventArgs e) { LoadProcessSteps(); if (this.ddlProcessTemplate.SelectedIndex == 0) { this.ddlStepName.Enabled = false; this.ddlStepName.Items.Clear(); } else { this.ddlStepName.Enabled = true; //得到流程类型对应的流程步骤 TemplateAdmin TAdmin = new TemplateAdmin(); String l_strTemplateName = this.ddlProcessTemplate.SelectedValue; DataTable l_dtbDataTable = TAdmin.Templates.GetTemplate(l_strTemplateName).GetVersion(1).GetViewList(); //加入空选择行 DataRow l_dtrDataRow = l_dtbDataTable.NewRow(); l_dtrDataRow[0] = DBNull.Value; l_dtrDataRow[1] = ""; l_dtrDataRow[2] = DBNull.Value; l_dtbDataTable.Rows.InsertAt(l_dtrDataRow, 0); //绑定数据 this.ddlStepName.DataSource = l_dtbDataTable; this.ddlStepName.DataBind(); } #region 根据流程类型绑定特有字段 switch (this.ddlProcessTemplate.SelectedValue) { //公司发文 case ProcessConstString.TemplateName.COMPANY_SEND: case ProcessConstString.TemplateName.DJGT_Send: //renjinquan+ OADept.GetDeptByIfloor(drpGFDept, 1); break; //公司收文 case ProcessConstString.TemplateName.COMPANY_RECEIVE: case ProcessConstString.TemplateName.MERGED_RECEIVE: //renjinquan+ break; //函件收文 case ProcessConstString.TemplateName.LETTER_RECEIVE: OAList.BindHJLX2(ddlHSLetterType, true); break; //函件发文 case ProcessConstString.TemplateName.LETTER_SEND: OAList.BindHJLX(ddlHFLetterType, true); OADept.GetDeptByIfloor(this.ddlHFDept, 1); break; //程序文件 case ProcessConstString.TemplateName.PROGRAM_FILE: OADept.GetDeptByIfloor(this.ddlPFDept, 1); break; //工作联系单 case ProcessConstString.TemplateName.AFFILIATION: OADept.GetDeptByIfloor(this.ddlWRHostDept, 1); OADept.GetDeptByIfloor(this.ddlWRMainSendDept, 1); break; //请示报告 case ProcessConstString.TemplateName.INSTUCTION_REPORT: OAUser.GetUserByRole(this.ddlMainSendleader, OUConstString.RoleName.COMPANY_LEADER); OADept.GetDeptByIfloor(this.ddlUnderTakeDept, 1); OADept.GetDeptByIfloor(this.ddlHostDept, 1); break; } #endregion //chenye //LoadProcessList(); }
/// <summary> /// 实体填充控件 /// </summary> protected override void EntityToControl() { EntityLetterSend entity = base.EntityData != null ? base.EntityData as EntityLetterSend : new EntityLetterSend(); this.wfWorkItemID.Text = entity.WorkItemID; this.wfProcessID.Text = entity.ProcessID; this.txtccCompany.Text = entity.ccCompany; this.txtCompany.Text = entity.company; this.txtCompany.ToolTip = entity.companyID; //this.txtContent.Text = SysString.HtmlToTextCode(entity.content); this.txtContent.Text = entity.content; this.txtHeGaoRenDate.Text = entity.heGaoRenDate; this.txtNiGaoRenDate.Text = entity.niGaoRenDate; EntityToHuiQian(entity); this.txtOurRef.Text = entity.ourRef; this.txtPages.Text = entity.pages; this.txtSignDate.Text = entity.signDate; this.txtSubject.Text = entity.subject; this.txtTitle.Text = entity.title; this.txtTo.Text = entity.to; this.txtYourRef.Text = entity.yourRef; this.chkJinJi.Checked = entity.jinJi; this.chkHuiZhi.Checked = entity.huiZhi; this.txtccDept.Text = entity.ccDept; this.txtccDeptIDs.Text = entity.ccDeptIDs; this.txtccLeader.Text = entity.ccLeader; if (entity.isSave) { this.txtComment.Text = entity.remarks1; } //单位 抄送单位 this.txtCompanyID.Text = entity.companyID; //意见 Repeater this.Repeater1.DataSource = entity.yiJian; this.Repeater1.DataBind(); this.txtComment.Text = entity.syiJian; //附件数据绑定 this.ucAttachment.UCDataList = entity.FileList; //流程数据 this.wfFaQiRen.Text = entity.Drafter; this.wfFaQiRenID.Text = entity.wfFaQiRenID; this.wfHeGaoRenID.Text = entity.wfHeGaoRenID; this.wfHuiQianRenIDs.Text = entity.wfHuiQianRenIDs; this.wfQianFaRenID.Text = entity.wfQianFaRenID; this.txt_UserDate.Text = entity.UserDate; this.txtDeptLeaderIDs.Text = entity.deptLeaderIDs; this.txtccLeaderIDs.Text = entity.ccLeaderIDs; this.wfChuanYueRenIDs.Text = entity.wfChuanYueRenIDs; this.txtEquipmentCode.Text = entity.equipmentCode1; this.txtContractNo.Text = entity.contractNo1; //下拉控件 if (!Page.IsPostBack) { OAList.BindHJLX(drpHanJian); } FormsMethod.SelectedDropDownList(drpHanJian, entity.hanJianID1, entity.hanJian1); FormsMethod.SelectedDropDownList(drpSendDept, entity.sendDeptID1, entity.sendDept1); txtHeGaoRen.Text = entity.heGaoRen; txtHuiQianRen.Text = entity.huiQianRen; txtQianFaRen.Text = entity.qianFaRen; if (IsPreview == false) { switch (base.StepName) { case ProcessConstString.StepName.LetterSend.发起函件: break; case ProcessConstString.StepName.LetterSend.核稿: break; case ProcessConstString.StepName.LetterSend.会签: break; case ProcessConstString.StepName.LetterSend.签发: break; case ProcessConstString.StepName.LetterSend.函件分发: break; case ProcessConstString.StepName.LetterSend.二次分发: break; default: break; } } else { } //领导签发示后显示label形式的领导与时间 if (entity.signDate != "" && entity.signDate != null) { this.txtQianFaRen.Visible = false; this.lbQianFaRen.Visible = true; this.lbQianFaRen.Text = entity.qianFaRen;// +strNewLine + entity.signDate; this.txtSignDate.Visible = false; this.lbSignDate.Visible = true; this.lbSignDate.Text = entity.signDate; } //核稿后显示label形式的核稿人与时间 if (entity.heGaoRenDate != "" && entity.heGaoRenDate != null) { //this.txtHeGaoRen.Visible = false; //this.lbHeGaoRen.Visible = true; this.lbHeGaoRen.Text = entity.heGaoRen;// +strNewLine + entity.heGaoRenDate; this.txtHeGaoRenDate.Visible = false; this.lbHeGaoRenDate.Visible = true; this.lbHeGaoRenDate.Text = entity.heGaoRenDate; } //拟稿后显示label形式的拟稿人与时间 if (entity.niGaoRenDate != "" && entity.niGaoRenDate != null) { this.txtNiGaoRenDate.Visible = false; this.lbNiGaoRen.Visible = true; this.lbNiGaoRen.Text = entity.niGaoRenDate; } }