/// <summary> /// 绑定部门 /// </summary> public void BindDept() { if (ddlSignDept.Items.Count == 0) { OADept.GetDeptByIfloor(ddlSignDept, 1); ddlSignDept_SelectedIndexChanged(null, null); } }
/// <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> /// <param name="ddl"></param> private void BindDeptList(DropDownList ddl) { OADept.GetDeptByIfloor(ddlDept, 1); }