/// <summary> /// 加载角色成员 /// </summary> private void LoadRoleUser() { ViewBase vbRole = null; if (this.tvRoleList.SelectedNode != null) { this.lbxLeft.Items.Clear(); string strShow = string.Empty; vbRole = OAUser.GetUserByRole(this.tvRoleList.SelectedNode.Text); if (vbRole != null) { foreach (FounderSoftware.ADIM.OU.BLL.Busi.User user in vbRole.Ens) { strShow = user.Name + "(" + user.UserID + ")"; ListItem listItem = new ListItem(strShow, user.DomainUserID); if (this.lbxLeft.Items.Contains(listItem) == false) { this.lbxLeft.Items.Add(listItem); } } } for (int i = 0; i < this.lbxRight.Items.Count; i++) { this.lbxLeft.Items.Remove(this.lbxLeft.Items.FindByValue(this.lbxRight.Items[i].Value)); } } }
/// <summary> /// 绑定组织机构 /// </summary> protected override void BindOUControl() { //附件列表 this.ucAttachment.UCTemplateName = base.TemplateName; this.ucAttachment.UCProcessID = base.ProcessID; this.ucAttachment.UCWorkItemID = base.WorkItemID; this.ucAttachment.UCTBID = base.IdentityID.ToString(); this.ucAttachment.UCIsEditable = false; //传阅控件 this.ucCirculatePeople.UCDeptIDControl = this.txtCirculateDeptID.ClientID; this.ucCirculatePeople.UCDeptNameControl = this.txtCirculateDeptName.ClientID; this.ucCirculatePeople.UCDeptUserIDControl = this.txtCirculatePeopleID.ClientID; this.ucCirculatePeople.UCDeptUserNameControl = this.txtCirculatePeopleName.ClientID; this.ucCirculatePeople.UCSelectType = "2"; this.ucCirculatePeople.UCTemplateName = base.TemplateName; this.ucCirculatePeople.UCFormName = "分发范围"; //承办部门 this.ucUnderTakeDept.UCDeptIDControl = this.txtUnderTakeDeptID.ClientID; this.ucUnderTakeDept.UCDeptNameControl = this.txtUnderTakeDeptName.ClientID; this.ucUnderTakeDept.UCLevel = "1"; this.ucUnderTakeDept.UCSelectType = "0"; this.ucUnderTakeDept.UCDeptShowType = "1010"; this.ucUnderTakeDept.UCIsSingle = "1"; //公司领导 OAUser.GetUserByRole(this.ddlLeadShip, OUConstString.RoleName.PartysLead); }
/// <summary> /// 下拉菜单 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void drpRole_SelectedIndexChanged(object sender, EventArgs e) { ViewBase vb = OAUser.GetUserByRole(this.UCRole); this.chkRole.Items.Clear(); if (vb.Count > 0) { foreach (FounderSoftware.ADIM.OU.BLL.Busi.User user in vb.Ens) { this.chkRole.Items.Add(new ListItem(user.Name, user.DomainUserID)); } } if (hUCRoleUserID.Value != String.Empty) { String[] sArrUserID = hUCRoleUserID.Value.Split(';'); for (int i = 0; i < this.chkRole.Items.Count; i++) { for (int k = 0; k < sArrUserID.Length; k++) { if (chkRole.Items[i].Value == sArrUserID[0]) { this.chkRole.Items[i].Selected = true; } } } } }
/// <summary> /// gridview绑定 /// </summary> protected void Bind() { ViewBase vb = OAUser.GetUserByRole(this.UCRoleName); if (vb != null && vb.Count > 0) { this.gvRole.DataSource = vb.DtTable; this.gvRole.DataBind(); } }
/// <summary> /// 绑定下拉选择领导 /// </summary> public void BindUser() { if (drpUser.Items.Count == 0) { OAUser.GetUserByRole(drpUser, ConstString.RoleName.COMPANY_LEADER); } ListItem temp = drpUser.Items.FindByText("孙云根"); drpUser.Items.Remove(temp); }
/// <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(); }
protected void btnSubmit_Click(object sender, EventArgs e) { //提交动作 this.m_strSubmitAction = ProcessConstString.SubmitAction.ACTION_SUBMIT; switch (base.StepName) { case ProcessConstString.StepName.ReceiveStepName.STEP_PLOT: l_htAttribute.Add(ConstString.CustomAttr.Receive.IsDeny, false); l_htAttribute.Add(ConstString.CustomAttr.Receive.IsPlot, false); ViewBase l_objClerks = OAUser.GetUserByRole(OUConstString.RoleName.PartysDocument); String l_strClerkField = String.Empty; foreach (User user in l_objClerks.Ens) { l_strClerkField += user.DomainUserID + ";"; } l_strClerkField = SysString.TrimLastWord(l_strClerkField); l_htAttribute.Add(ConstString.CustomAttr.Receive.Clerks, l_strClerkField); break; case ProcessConstString.StepName.ReceiveStepName.STEP_INSTRUCTION: break; case ProcessConstString.StepName.ReceiveStepName.STEP_PROCESS_CENTER: //l_htAttribute.Add(ConstString.CustomAttr.Receive.IsPlot, false); l_htAttribute.Add(ConstString.CustomAttr.Receive.IsAssignSection, false); l_htAttribute.Add(ConstString.CustomAttr.Receive.IsAssignPeople, false); l_htAttribute.Add(ConstString.CustomAttr.Receive.IsDirectArchive, true); break; case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_MEMBER: break; case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_CHIEF: l_htAttribute.Add(ConstString.CustomAttr.Receive.IsAssignSection, false); break; case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_DIRECTOR: l_htAttribute.Add(ConstString.CustomAttr.Receive.IsAssignSection, false); l_htAttribute.Add(ConstString.CustomAttr.Receive.IsAssignPeople, false); break; case ProcessConstString.StepName.ReceiveStepName.STEP_DISTRIBUTION: break; default: break; } base.FormSubmit(false, m_strSubmitAction, l_htAttribute, this.ControlToEntity(false)); }
protected void btnSumitInspect_Click(object sender, EventArgs e) { B_ReceiveEdit l_BusReceiveEdit = null; String l_strInspector = String.Empty; if (String.IsNullOrEmpty(ddlPoliticalOfficer.SelectedValue)) { JScript.ShowMsgBox(this.Page, MsgType.VbCritical, "没有选择党群工作处处长"); return; } l_strInspector = ddlPoliticalOfficer.SelectedValue; //表单的合法性验证 if (!VerifyField()) { JScript.ShowMsgBox(Page, MsgType.VbCritical, m_strAryMessages); return; } //提交动作 this.m_strSubmitAction = ProcessConstString.SubmitAction.ReceiveBase.SUBMIT_INSPECT; if (String.IsNullOrEmpty(WorkItemID)) { //流程创建时候设置自定义属性 l_htAttribute.Add(ConstString.CustomAttr.Receive.Initiator, CurrentUserInfo.UserName); l_BusReceiveEdit = new B_ReceiveEdit(); l_BusReceiveEdit.ID = Convert.ToInt32(this.RegisterID); if (l_BusReceiveEdit != null) { l_BusReceiveEdit.ProcessID = base.ProcessID; l_BusReceiveEdit.Save(); } } ViewBase l_objClerks = OAUser.GetUserByRole(OUConstString.RoleName.PartysDocument); String l_strClerkField = String.Empty; foreach (User user in l_objClerks.Ens) { l_strClerkField += user.DomainUserID + ";"; } l_strClerkField = SysString.TrimLastWord(l_strClerkField); l_htAttribute.Add(ConstString.CustomAttr.Receive.Officer, l_strInspector); l_htAttribute.Add(ConstString.CustomAttr.Receive.Clerks, l_strClerkField); base.FormSubmit(false, m_strSubmitAction, l_htAttribute, this.ControlToEntity(false)); }
protected void ddlBianZhiBuMen_SelectedIndexChanged(object sender, EventArgs e) { //部门负责人 if (this.ddlBianZhiBuMen.Items.Count > 0) { OAUser.GetUserByDeptPost(this.ddlBuMenZhuGuan, this.ddlBianZhiBuMen.SelectedValue, OUConstString.PostName.FUCHUZHANG, true, true); if (this.ddlBuMenZhuGuan.Items.Count == 2) { if (this.ddlBuMenZhuGuan.Items[1].Value == CurrentUserInfo.UserName) { ddlBuMenZhuGuan.Items.Clear(); OAUser.GetUserByRole(this.ddlBuMenZhuGuan, OUConstString.RoleName.COMPANY_LEADER); } } } }
/// <summary> /// 获取审稿人 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ddlType_SelectedIndexChanged(object sender, EventArgs e) { //党纪工团审稿 switch (this.ddlType.SelectedValue) { case ProcessConstString.TemplateName.PARTY_SEND: OAUser.GetUserByRole(this.ddlCheckDrafter, OUConstString.RoleName.PartyDisciplineCheckDraft); break; case ProcessConstString.TemplateName.DISCIPLINE_SEND: OAUser.GetUserByRole(this.ddlCheckDrafter, OUConstString.RoleName.PartyDisciplineCheckDraft); break; case ProcessConstString.TemplateName.TRADE_UNION_SEND: OAUser.GetUserByRole(this.ddlCheckDrafter, OUConstString.RoleName.TradeUnionCheckDraft); break; case ProcessConstString.TemplateName.YOUTH_LEAGUE_SEND: OAUser.GetUserByRole(this.ddlCheckDrafter, OUConstString.RoleName.YouthLeagueCheckDraft); break; } }
/// <summary> /// 实体加载 /// </summary> protected override void EntityToControl() { B_DJGTSend entity = base.EntityData != null ? base.EntityData as B_DJGTSend : new B_DJGTSend(); ucAttachment.UCDataList = entity.FileList; //提示信息 this.txtMyPrompt.Text = entity.MyPrompt; this.txtAllPrompt.Text = entity.Prompt; //是否核稿退回 this.wfIsDeny.Text = entity.IsCheckDraftBack.ToString(); FormsMethod.SetDropDownList(this.ddlCheckDrafter, entity.CheckDrafterID, entity.CheckDrafter); FormsMethod.SetDropDownList(this.ddlHostDept, entity.HostDeptID, entity.HostDept); FormsMethod.SetDropDownList(this.ddlSigner, entity.SignerID, entity.Signer); this.txtDocumentYear.Text = entity.DocumentYear; this.txtDocumentNum.Text = entity.DocumentNum; this.txtDocumentNo.Text = entity.DocumentNo; this.ddlUrgentDegree.SelectedValue = entity.UrgentDegree; this.txtDocumentTitle.Text = entity.DocumentTitle; this.txtSubjectWord.Text = entity.SubjectWord; this.txtMainSender.Text = entity.MainSenders; this.txtCopySender.Text = entity.CopySenders; //this.txtPhoneNum.Text = entity.PhoneNum; this.txtPhoneNum.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.OfficePhone : entity.PhoneNum; this.txtShareCount.FSText = entity.ShareCount; this.txtSheetCount.FSText = entity.SheetCount; this.txtTypist.Text = entity.Typist; this.txtChecker.Text = entity.Checker; this.txtReChecker.Text = entity.ReChecker; //发文日期 this.txtSendDate.Text = entity.SendDate == DateTime.MinValue ? string.Empty : entity.SendDate.ToString(ConstString.DateFormat.Long); //签发日期 this.txtSignDate.Text = entity.SignDate == DateTime.MinValue ? string.Empty : entity.SignDate.ToString(ConstString.DateFormat.Long); this.txtSignCommentView.Text = entity.SignComment; //核稿日期 this.txtSecretaryCheckDate.Text = entity.VerifyDate == DateTime.MinValue ? string.Empty : entity.VerifyDate.ToString(ConstString.DateFormat.Long); //审稿日期 this.txtVerifyDate.Text = entity.CheckDraftDate == DateTime.MinValue ? string.Empty : entity.CheckDraftDate.ToString(ConstString.DateFormat.Long); //拟稿日期 this.txtDraftDate.Text = entity.DraftDate == DateTime.MinValue ? string.Empty : entity.DraftDate.ToString(ConstString.DateFormat.Long); //拟稿人 this.txtDrafter.Text = entity.Drafter; this.wfDrafterID.Text = entity.DrafterID; //会签部门 this.txtDeptSigners.Text = entity.IsFormSave ? entity.NewDeptSigners : entity.DeptSigners; this.wfDeptSignIDs.Text = entity.IsFormSave ? entity.NewDeptSignerIDs : entity.DeptSignerIDs; //公司领导会签 this.txtLeadSigners.Text = entity.IsFormSave ? entity.NewLeadSigners : entity.LeadSigners; this.wfLeaderSignIDs.Text = entity.IsFormSave ? entity.NewLeadSignerIDs : entity.LeadSignerIDs; //秘书核稿 this.txtSecretaryChecker.Text = entity.Verifier; //传阅 this.hDeptID.Value = entity.CirculateDeptIDs; this.txtDeptName.Text = entity.CirculateDepts; this.hUserID.Value = entity.CirculateLeaderIDs; this.txtUserName.Text = entity.CirculateLeaders; //发文类型 this.ddlType.SelectedValue = entity.SendType; if (entity != null) { switch (base.StepName) { case ProcessConstString.StepName.STEP_DRAFT: if (!base.IsPreview) { //主办部门 OADept.GetDeptByUser(this.ddlHostDept, string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID, 1, true, false); FormsMethod.SelectedDropDownList(this.ddlHostDept, entity.HostDeptID); FormsMethod.SelectedDropDownList(this.ddlCheckDrafter, entity.CheckDrafterID); } break; case ProcessConstString.StepName.SendStepName.STEP_VERIFY: //签发人 if (!base.IsPreview) { OAUser.GetUserByRole(this.ddlSigner, OUConstString.RoleName.PartysLead); FormsMethod.SelectedDropDownList(this.ddlSigner, entity.SignerID); } break; case ProcessConstString.StepName.SendStepName.STEP_DEPT: this.txtCounterSigners.Text = FormsMethod.GetHaveSignInfo(base.ProcessID, base.WorkItemID, ProcessConstString.StepName.SendStepName.STEP_DEPT, base.TemplateName); this.txtComment.Text = entity.DeptSignComment; break; case ProcessConstString.StepName.SendStepName.STEP_LEADER: this.txtCounterSigners.Text = FormsMethod.GetHaveSignInfo(base.ProcessID, base.WorkItemID, ProcessConstString.StepName.SendStepName.STEP_DEPT, base.TemplateName) + FormsMethod.GetHaveSignInfo(base.ProcessID, base.WorkItemID, ProcessConstString.StepName.SendStepName.STEP_LEADER, base.TemplateName); this.txtComment.Text = entity.LeadSignComment; break; case ProcessConstString.StepName.SendStepName.STEP_SIGN: this.txtDeptSigners.Text = FormsMethod.GetSingers(base.ProcessID, base.WorkItemID, ProcessConstString.StepName.SendStepName.STEP_DEPT, base.TemplateName); this.txtLeadSigners.Text = FormsMethod.GetSingers(base.ProcessID, base.WorkItemID, ProcessConstString.StepName.SendStepName.STEP_LEADER, base.TemplateName); string sign1 = FormsMethod.GetHaveSignInfo(base.ProcessID, base.WorkItemID, ProcessConstString.StepName.SendStepName.STEP_DEPT, base.TemplateName); string sign2 = FormsMethod.GetHaveSignInfo(base.ProcessID, base.WorkItemID, ProcessConstString.StepName.SendStepName.STEP_LEADER, base.TemplateName); string sign3 = FormsMethod.GetHaveSignInfo(base.ProcessID, base.WorkItemID, ProcessConstString.StepName.SendStepName.STEP_SIGN, base.TemplateName); this.txtCounterSigners.Text = sign1 + "\n" + sign2 + "\n" + sign3; this.txtComment.Text = entity.SignComment; break; case ProcessConstString.StepName.SendStepName.STEP_DISTRIBUTE: //预设发文号 if (!base.IsPreview) { if (entity.IsHaveChecked == false) { B_DocumentNo_SN sn = new B_DocumentNo_SN(); this.txtDocumentYear.Text = DateTime.Now.Year.ToString(); this.txtDocumentNum.Text = sn.GetNo(base.TemplateName); this.txtDocumentNo.Text = "海核发〔" + DateTime.Now.Year.ToString() + "〕" + this.txtDocumentNum.Text + "号"; } else { this.txtDocumentYear.Text = entity.DocumentYear; this.txtDocumentNum.Text = entity.DocumentNum; this.txtDocumentNo.Text = entity.DocumentNo; } } this.txtDeptSigners.Text = entity.DeptHaveSigners; this.txtLeadSigners.Text = entity.LeadHaveSigners; break; case ProcessConstString.StepName.SendStepName.STEP_PROOF: this.txtDeptSigners.Text = entity.DeptHaveSigners; this.txtLeadSigners.Text = entity.LeadHaveSigners; break; } } //党群工作处处长处理后显示label形式的处长姓名与时间 if (entity.SignDate != DateTime.MinValue) { this.ddlSigner.Visible = false; this.txtSignDate.Visible = false; this.lbSigner.Visible = true; this.lbSignDate.Visible = true; this.lbSigner.Text = entity.Signer; this.lbSignDate.Text = entity.SignDate.ToString(ConstString.DateFormat.Long); } //核稿处理后显示label形式的核稿人姓名与时间 if (entity.VerifyDate != DateTime.MinValue) { this.txtSecretaryChecker.Visible = false; this.txtSecretaryCheckDate.Visible = false; this.lbChecker.Visible = true; this.lbSecretaryCheckDate.Visible = true; this.lbChecker.Text = entity.Verifier; this.lbSecretaryCheckDate.Text = entity.VerifyDate.ToString(ConstString.DateFormat.Long); } //审稿处理后显示label形式的审稿人姓名与时间 if (entity.CheckDraftDate != DateTime.MinValue) { this.ddlCheckDrafter.Visible = false; this.txtVerifyDate.Visible = false; this.lbCheckDrafter.Visible = true; this.lbVerifyDate.Visible = true; this.lbCheckDrafter.Text = entity.CheckDrafter; this.lbVerifyDate.Text = entity.CheckDraftDate.ToString(ConstString.DateFormat.Long); } //拟稿处理后显示label形式的拟稿人姓名与时间 if (entity.DraftDate != DateTime.MinValue) { this.txtDrafter.Visible = false; this.txtDraftDate.Visible = false; this.lbDrafter.Visible = true; this.lbDraftDate.Visible = true; this.lbDrafter.Text = entity.Drafter; this.lbDraftDate.Text = entity.DraftDate.ToString(ConstString.DateFormat.Long); } ////校对处理后显示label形式的校对人姓名与时间 //if (entity.CreateDate != DateTime.MinValue) //{ // this.txtChecker.Visible = false; // this.lbCChecker.Visible = true; // this.lbCChecker.Text = entity.Checker + strNewLine + entity.CreateDate; //} }
/// <summary> /// 实体填充控件 /// </summary> protected override void EntityToControl() { B_MergeReceiveBase l_objReceiveBase = null; //收文登记号 this.RegisterID = Request.QueryString[ConstString.QueryString.REGISTER_ID]; if (!String.IsNullOrEmpty(this.RegisterID)) { B_ReceiveEdit l_BusReceiveEdit = new B_ReceiveEdit(); l_BusReceiveEdit.ID = Convert.ToInt32(this.RegisterID); if (l_BusReceiveEdit == null) { JScript.ShowMsgBox(this.Page, MsgType.VbCritical, "当前选择的收文登记信息不存在或者已经被删除,无法继续操作", "Container.aspx?ClassName=FS.ADIM.OA.WebUI.WorkflowMenu.ToDoTask.PG_WaitHandle"); return; } //附件列表 this.ucAttachment.UCDataList = XmlUtility.DeSerializeXml <List <CFuJian> >(l_BusReceiveEdit.FileData); //收文号 this.txtReceiveNo.Text = l_BusReceiveEdit.ReceiveNo; //收文日期 this.txtReceiveDate.Text = l_BusReceiveEdit.ReceiveDate.ToString(ConstString.DateFormat.Normal); //原文号 this.txtSendLetterNo.Text = l_BusReceiveEdit.SendLetterNo; //来文单位 this.txtCommunicationUnit.Text = l_BusReceiveEdit.ReceiveUnit; //卷号 this.txtPreVolumeNo.Text = l_BusReceiveEdit.PreVolumeNo; //文件名称 this.txtDocumentTitle.Text = l_BusReceiveEdit.DocumentTitle; //紧急程度 this.txtUrgentDegree.Text = l_BusReceiveEdit.UrgentDegree; //步骤名称 base.StepName = ProcessConstString.StepName.ReceiveStepName.STEP_INITIAL; this.SubTemplateName = l_BusReceiveEdit.ProcessName; //党群工作处处长 OAUser.GetUserByRole(this.ddlPoliticalOfficer, OUConstString.RoleName.PARTYS_DIRECTOR); } else { l_objReceiveBase = base.EntityData as B_MergeReceiveBase; this.SubTemplateName = l_objReceiveBase.TemplateName; this.RegisterID = l_objReceiveBase.RegisterID; //党群工作处处长 OAUser.GetUserByRole(this.ddlPoliticalOfficer, OUConstString.RoleName.PARTYS_DIRECTOR); ddlPoliticalOfficer.SelectedValue = l_objReceiveBase.Officer; txtPoliticalOfficerComment.Text = l_objReceiveBase.Officer_Comment; //附件列表 this.ucAttachment.UCDataList = l_objReceiveBase.FileList; //收文号 this.txtReceiveNo.Text = l_objReceiveBase.DocumentNo; //收文日期 this.txtReceiveDate.Text = l_objReceiveBase.DocumentReceiveDate.ToString(ConstString.DateFormat.Normal); //原文号 this.txtSendLetterNo.Text = l_objReceiveBase.SendNo; //来文单位 this.txtCommunicationUnit.Text = l_objReceiveBase.CommunicationUnit; //卷号 this.txtPreVolumeNo.Text = l_objReceiveBase.VolumeNo; //文件名称 this.txtDocumentTitle.Text = l_objReceiveBase.DocumentTitle; //紧急程度 this.txtUrgentDegree.Text = l_objReceiveBase.UrgentDegree; //发起人ID this.txtDrafter.Text = l_objReceiveBase.DrafterID; //发起日期 this.txtDraftDate.Text = l_objReceiveBase.DraftDate.ToString(); //公司领导 this.ddlLeadShip.SelectedValue = l_objReceiveBase.LeaderShip; //公司批示意见 this.txtLeadCommentView.Text = l_objReceiveBase.LS_Comment; if (base.StepName == ProcessConstString.StepName.ReceiveStepName.STEP_INSTRUCTION) { this.txtLeadCommentEdit.Text = l_objReceiveBase.LS_Comment; } switch (base.StepName) { case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_DIRECTOR: //获取处室下属科室 OADept.GetChildDept(this.ddlUnderTakeSection, l_objReceiveBase.UnderTakeDept, 2); //获取处室下属人员 OAUser.GetUserByDeptID(this.ddlUnderTakePeople, l_objReceiveBase.UnderTakeDept, -1); break; case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_CHIEF: //获取科室下属人员 OAUser.GetUserByDeptID(this.ddlUnderTakePeople, l_objReceiveBase.UnderTakeChief, -1); break; case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_MEMBER: break; } //承办部门 this.txtUnderTakeDeptID.Text = l_objReceiveBase.UnderTakeDept; this.txtUnderTakeDeptName.Text = l_objReceiveBase.UnderTakeDeptName; //承办科室 this.ddlUnderTakeSection.SelectedValue = l_objReceiveBase.UnderTakeChief; //承办人员 this.ddlUnderTakePeople.SelectedValue = l_objReceiveBase.UnderTakePeople; //承办意见 this.txtUnderTakeCommentEdit.Text = l_objReceiveBase.UnderTake_Comment; this.txtCirculatePeopleName.Text = l_objReceiveBase.CPeopleName; this.txtCirculatePeopleID.Text = l_objReceiveBase.CPeopleID; this.txtCirculateDeptName.Text = l_objReceiveBase.CDeptName; this.txtCirculateDeptID.Text = l_objReceiveBase.CDeptID; //党群工作处处长处理后显示label形式的处长姓名与时间 if (l_objReceiveBase.DraftDate == DateTime.MinValue) { this.ddlPoliticalOfficer.Visible = false; this.lbParty.Visible = true; this.lbParty.Text = l_objReceiveBase.Officer + strNewLine + l_objReceiveBase.Officer_Date; } //领导;批示处理后显示label形式的领导人姓名与时间 if (l_objReceiveBase.LS_Date != "" && l_objReceiveBase.LS_Date != null) { this.ddlLeadShip.Visible = false; this.lbLeadShip.Visible = true; this.lbLeadShip.Text = l_objReceiveBase.LeaderShipName + strNewLine + l_objReceiveBase.LS_Date; } //提示信息 this.txtPrompt.Text = l_objReceiveBase.Prompt; if (l_objReceiveBase.IsFormSave) { this.txtPromptEdit.Text = l_objReceiveBase.PromptEdit; } } }
/// <summary> /// 实体加载 /// </summary> protected override void EntityToControl() { B_FinanceZDBX entity = base.EntityData != null ? base.EntityData as B_FinanceZDBX : new B_FinanceZDBX(); //附件 ucAttachment.UCDataList = entity.FileList; this.txtYuSuanJinE.Text = entity.YuSuanJinE; this.txtLeiJiBaoXiaoJinE.Text = entity.LeiJiBaoXiaoJinE; this.txtIsChaoYuSuan.Text = entity.IsChaoYuSuan == true ? "1" : ""; this.txtIsManager.Text = entity.IsLeader == true ? "1" : ""; string userID = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID; if (base.StepName == ProcessConstString.StepName.STEP_DRAFT && !base.IsPreview) { //拟稿日期 txtNiGaoRiQi.Text = DateTime.Now.ToString("yyyy-MM-dd"); //拟稿人 this.txtNiGaoRen.Text = CurrentUserInfo.DisplayName; this.txtNiGaoRenID.Text = CurrentUserInfo.UserName; OADept.GetDeptByUser(this.ddlDepartment, userID, 1, true, false); FormsMethod.SelectedDropDownList(this.ddlDepartment, entity.DepartmentID); string[] ManagerIds = OAUser.GetDeptManagerArray(this.ddlDepartment.SelectedValue, -1); if (ManagerIds[0].Contains(CurrentUserInfo.UserName)) { txtIsManager.Text = "1"; } if (txtIsManager.Text == "1") { OAUser.GetUserByDeptPost(ddlChuLingDao, this.ddlDepartment.SelectedValue, OUConstString.PostName.FUCHUZHANG, false, true, 0); } else { FounderSoftware.Framework.Business.ViewBase vDept = OADept.GetDeptByDeptUser(this.ddlDepartment.SelectedValue, userID, 2); //根据处室部门的ID和用户账号找出用户所属该处室下的科室-修改bug if (!string.IsNullOrEmpty(vDept.IDs)) { OAUser.GetUserByDeptPost(ddlYanShouRen, vDept.IDs, OUConstString.PostName.FUKEZHANG, false, true, 2); } } B_FinanceDeptInfo bllInfo = new B_FinanceDeptInfo(); M_FinanceDeptInfo info = bllInfo.GetFinanceDeptInfoByDeptID(DateTime.Now.Year.ToString(), this.ddlDepartment.SelectedValue); this.txtYuSuanJinE.Text = info.ZDBudgetCost; this.txtLeiJiBaoXiaoJinE.Text = info.ZDUseCost; if (!string.IsNullOrEmpty(entity.ChuLingDaoID)) { FormsMethod.SelectedDropDownList(this.ddlChuLingDao, entity.ChuLingDaoID); } if (!string.IsNullOrEmpty(entity.YanShouRenID)) { FormsMethod.SelectedDropDownList(this.ddlYanShouRen, entity.YanShouRenID); } } else { FormsMethod.SetDropDownList(this.ddlDepartment, entity.DepartmentID, entity.Department); FormsMethod.SetDropDownList(this.ddlZongJingLi, entity.ZongJingLiID, entity.ZongJingLi); FormsMethod.SetDropDownList(this.ddlZhuGuanLingDao, entity.ZhuGuanLingDaoID, entity.ZhuGuanLingDao); FormsMethod.SetDropDownList(this.ddlChuLingDao, entity.ChuLingDaoID, entity.ChuLingDao); FormsMethod.SetDropDownList(this.ddlYanShouRen, entity.YanShouRenID, entity.YanShouRen); FormsMethod.SetDropDownList(this.ddlJingShouRen, entity.JingShouRenID, entity.JingShouRen); } //验收 if (base.StepName == ProcessConstString.StepName.FinanceZDBXStepName.STEP_KeZhang && !base.IsPreview) { OAUser.GetUserByDeptPost(ddlChuLingDao, this.ddlDepartment.SelectedValue, OUConstString.PostName.CHUZHANG, false, true, 0); } //处长审核 if (base.StepName == ProcessConstString.StepName.FinanceZDBXStepName.STEP_ChuZhang && !base.IsPreview) { OAUser.GetUserByRole(this.ddlZongJingLi, OUConstString.RoleName.COMPANY_LEADER); OAUser.GetUserByRole(this.ddlZhuGuanLingDao, OUConstString.RoleName.COMPANY_LEADER); OAUser.GetUserByRole(this.ddlJingShouRen, OUConstString.RoleName.CaiWu); if (txtIsManager.Text != "1") { B_FinanceDeptInfo bllInfo = new B_FinanceDeptInfo(); M_FinanceDeptInfo info = bllInfo.GetFinanceDeptInfoByDeptID(DateTime.Now.Year.ToString(), this.ddlDepartment.SelectedValue); this.txtYuSuanJinE.Text = info.ZDBudgetCost; this.txtLeiJiBaoXiaoJinE.Text = info.ZDUseCost; Double FeeFa = Convert.ToDouble(string.IsNullOrEmpty(txtLeiJiBaoXiaoJinE.Text) ? "0" : txtLeiJiBaoXiaoJinE.Text); Double FeeYu = Convert.ToDouble(string.IsNullOrEmpty(txtYuSuanJinE.Text) ? "0" : txtYuSuanJinE.Text); Double Rate = (string.IsNullOrEmpty(FeeRate) == true ? 0.1 : Convert.ToDouble(FeeRate)); if (FeeFa > FeeYu) { txtIsChaoYuSuan.Text = "1"; } } } //领导审核 if (base.StepName == ProcessConstString.StepName.FinanceZDBXStepName.STEP_LingDao && !base.IsPreview) { OAUser.GetUserByRole(this.ddlJingShouRen, OUConstString.RoleName.CaiWu); } //是否退回 if (base.StepName == ProcessConstString.StepName.STEP_DRAFT) { //this.txtIsBack.Text = entity.IsBack.ToString(); } //拟稿人及日期 if (entity.DraftDate != DateTime.MinValue) { this.txtNiGaoRiQi.Text = entity.DraftDate.ToString(DateFormat); //拟稿人显示非下拉列表框形式 this.txtNiGaoRen.Visible = false; this.lblNiGaoRen.Visible = true; //this.lbNiGaoRen.Text = entity.Drafter + strNewLine + entity.DraftDate.ToString(ConstString.DateFormat.Long); this.lblNiGaoRen.Text = entity.Drafter; } else { this.txtNiGaoRiQi.Text = DateTime.Now.ToString(DateFormat); } //申请单编号 this.txtDocumentNo.Text = entity.DocumentNo; this.txtDanJuZhangShu.Text = entity.DanJuZhangShu == Int32.MinValue ? "" : entity.DanJuZhangShu.ToString(); this.txtYongTu.Text = entity.YongTu; txtBaoXiaoJinE.Text = entity.BaoXiaoJinE; txtBaoXiaoJinEDaXie.Text = entity.BaoXiaoJinEDaXie; this.txtShouKuanDanWei.Text = entity.ShouKuanDanWei; this.txtShouKuanZhangHao.Text = entity.ShouKuanZhangHao; this.txtShouKuanYinHang.Text = entity.ShouKuanYinHang; this.txtShouKuanZhangHao.Text = entity.ShouKuanZhangHao; this.txtYanQingRenShu.Text = entity.YanQingRenShu; this.txtRenJunXiaoFeiE.Text = entity.RenJunXiaoFeiE; ////拟稿人 //this.txtNiGaoRen.Text = entity.Drafter; //this.txtNiGaoRenID.Text = entity.NiGaoRenID; //提示信息 this.txtTiShiXinXi.Text = entity.Message; //提示信息添加 this.txtTianJia.Text = entity.MessageAdd; //this.txtGeneralManagerID.Text = entity.GeneralManagerID; //this.txtChargeLeaderID.Text = entity.ChargeLeaderID; //this.txtDepartmentLeaderID.Text = entity.DepartmentLeaderID; }
/// <summary> /// 实体加载 /// </summary> protected override void EntityToControl() { B_FinanceCCBX entity = base.EntityData != null ? base.EntityData as B_FinanceCCBX : new B_FinanceCCBX(); //拟稿 if (base.StepName == ProcessConstString.StepName.STEP_DRAFT && !base.IsPreview) { //编制部门 OADept.GetDeptByUser(this.ddlBianZhiBuMen, CurrentUserInfo.UserName, 1, true, false); //部门负责人 if (this.ddlBianZhiBuMen.Items.Count > 0) { ddlBianZhiBuMen_SelectedIndexChanged(null, null); } //拟稿日期 txtNiGaoRiQi.Text = DateTime.Now.ToString("yyyy-MM-dd"); //拟稿人 this.txtNiGaoRen.Text = CurrentUserInfo.DisplayName; this.txtNiGaoRenID.Text = CurrentUserInfo.UserName; this.txtPhone.Text = CurrentUserInfo.OfficePhone; if (entity.ChuXingDetails.Count == 0) //默认加载一行 不然日期控件会失效 { ucChuXingMingXi.UCIsFirst = true; } OAUser.GetUserByRole(this.ddlGSLingDao, OUConstString.RoleName.COMPANY_LEADER); if (base.StepName == ProcessConstString.StepName.STEP_DRAFT && !base.IsPreview) { if (string.IsNullOrEmpty(base.WorkItemID)) { this.lbJs.Text = "<script>ShowMyDiv();</script>"; } } } else { FormsMethod.SetDropDownList(this.ddlBianZhiBuMen, entity.DepartmentID, entity.Department); FormsMethod.SetDropDownList(this.ddlBuMenZhuGuan, entity.BuMenZhuGuanID, entity.BuMenZhuGuan); FormsMethod.SetDropDownList(this.ddlGSLingDao, entity.GongSiLingDaoID, entity.GongSiLingDao); this.txtNiGaoRen.Text = entity.Drafter; this.txtNiGaoRenID.Text = entity.DrafterID; } //主管领导 if (base.StepName == ProcessConstString.StepName.FinanceCCBXStepName.STEP_DEPTVERIFY) { OAUser.GetUserByRole(this.ddlGSLingDao, OUConstString.RoleName.COMPANY_LEADER); OAUser.GetUserByRole(this.ddlCaiWu, OUConstString.RoleName.CaiWu); OAUser.GetUserByRole(this.ddlPeiXunChu, OUConstString.RoleName.PeiXunChuLD); } //培训处 if (base.StepName == ProcessConstString.StepName.FinanceCCBXStepName.STEP_PXCVERIFY) { OAUser.GetUserByRole(this.ddlGSLingDao, OUConstString.RoleName.COMPANY_LEADER); OAUser.GetUserByRole(this.ddlCaiWu, OUConstString.RoleName.CaiWu); } //公司领导 if (base.StepName == ProcessConstString.StepName.FinanceCCBXStepName.STEP_GSLDVERIFY) { OAUser.GetUserByRole(this.ddlCaiWu, OUConstString.RoleName.CaiWu); } //财务 if (base.StepName == ProcessConstString.StepName.FinanceCCBXStepName.STEP_CWVERIFY) { } //反馈报销人 if (base.StepName == ProcessConstString.StepName.FinanceCCBXStepName.STEP_FANKUI) { } if (txtNiGaoRen.Text == "") { txtNiGaoRen.Text = entity.Drafter; } if (txtPhone.Text == "") { txtPhone.Text = entity.Phone; } if (txtNiGaoRiQi.Text == "") { txtNiGaoRiQi.Text = entity.DraftDate.ToString("yyyy-MM-dd"); } FormsMethod.SelectedDropDownList(this.ddlType, entity.Type); txtType.Text = entity.Type; if (txtType.Text != "") { ddlType_SelectedIndexChanged(null, null); } txtChuChaDanHao.Text = entity.ChuChaDanHao; txtBianHao.Text = entity.DocumentNo; FormsMethod.SelectedDropDownList(this.ddlZhiCheng, entity.ZhiWuZhiChengID, entity.ZhiWuZhiCheng); FormsMethod.SelectedDropDownList(this.ddlBianZhiBuMen, entity.DepartmentID, entity.Department); FormsMethod.SelectedDropDownList(this.ddlJieKuan, entity.GeRenJieKuan); if (entity.DanJuZhangShu == Int32.MinValue) { txtDanJuZhangShu.Text = ""; } else { txtDanJuZhangShu.Text = entity.DanJuZhangShu.ToString(); } txtShiYou.Text = entity.ShiYou; ucChuXingMingXi.UCCXList = entity.ChuXingDetails; foreach (var item in entity.QiTaFeiYongDetails) { if (item.Name == "住宿费") { txtZhuSuRT.Text = item.RenTian.ToString(); txtZhuSuJE.Text = item.JinE.ToString(); } else if (item.Name == "托运费") { txtTuoYunRT.Text = item.RenTian.ToString(); txtTuoYunJE.Text = item.JinE.ToString(); } else if (item.Name == "其他") { txtQiTaRT.Text = item.RenTian.ToString(); txtQiTaJE.Text = item.JinE.ToString(); } } //其他费用小计 if (entity.QiTaFeiYongXiaoJi == Decimal.MinValue) { txtQiTaXiaoJi.Text = ""; } else { txtQiTaXiaoJi.Text = entity.QiTaFeiYongXiaoJi.ToString(); } foreach (var item in entity.BuTieDetails) { if (item.Name == "住勤补贴") { txtZhuQinRT.Text = item.RenTian.ToString(); txtZhuQinJE.Text = item.JinE.ToString(); } else if (item.Name == "住宿节约补贴") { txtZhuSuJYRT.Text = item.RenTian.ToString(); txtZhuSuJYJE.Text = item.JinE.ToString(); } else if (item.Name == "未乘坐卧铺补贴") { txtWeiWoPuRT.Text = item.RenTian.ToString(); txtWeiWoPuBuJE.Text = item.JinE.ToString(); } else if (item.Name == "在途补贴") { txtZaiTuRT.Text = item.RenTian.ToString(); txtZaiTuJE.Text = item.JinE.ToString(); } } if (entity.BuTieXiaoJi == Decimal.MinValue) { txtBuTieXiaoJi.Text = ""; } else { txtBuTieXiaoJi.Text = entity.BuTieXiaoJi.ToString(); } //培训特有 txtLiXiangHao.Text = entity.LiXiangHao; FormsMethod.SelectedDropDownList(this.ddlYuSuanNei, entity.YuSuanNei); txtLiXiangJE.Text = entity.LiXiangJE.ToString(); if (entity.HeJi == Decimal.MinValue) { txtHeJi.Text = ""; } else { txtHeJi.Text = entity.HeJi.ToString(); } txtCaiWuJE.Text = entity.CaiWuShenHeJinE.ToString(); txtZhuQinJE.ToolTip = entity.ZhuQinToolTip; txtZhuSuJE.ToolTip = entity.ZhuSuToolTip; txtZiXingJinE.ToolTip = entity.ZiXingToolTip; FormsMethod.SelectedDropDownList(this.ddlBuMenZhuGuan, entity.BuMenZhuGuanID, entity.BuMenZhuGuan); FormsMethod.SelectedDropDownList(this.ddlGSLingDao, entity.GongSiLingDaoID, entity.GongSiLingDao); FormsMethod.SelectedDropDownList(this.ddlCaiWu, entity.CaiWuID, entity.CaiWu); FormsMethod.SelectedDropDownList(this.ddlPeiXunChu, entity.PeiXunChuLingDaoID, entity.PeiXunChuLingDao); txtChangQiBuTie.Text = entity.ChangQiBuTie; if (entity.ZiXingTianShu == Int32.MinValue) { txtZiXingTianShu1.Text = ""; txtZiXingTianShu2.Text = ""; } else { txtZiXingTianShu1.Text = entity.ZiXingTianShu.ToString(); txtZiXingTianShu2.Text = entity.ZiXingTianShu.ToString(); } if (entity.ZiXingJinE == Decimal.MinValue) { txtZiXingJinE.Text = ""; } else { txtZiXingJinE.Text = entity.ZiXingJinE.ToString(); } //提示信息 this.txtTiShiXinXi.Text = entity.Message; this.txtTianJia.Text = entity.MessageAdd; }
/// <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(); }
protected void Page_Load(object sender, EventArgs e) { DataSet l_dstDataSet = null; if (!Page.IsPostBack) { this.ucSendUnit.UCNameControl = this.txtReceiveUnit.ClientID; this.CompanyUC2.UCNameControl = this.txtQueryRecUnit.ClientID; this.TemplateName = Request.QueryString[ConstString.QueryString.TEMPLATE_NAME]; if (String.IsNullOrEmpty(this.TemplateName)) { JScript.ShowMsgBox(this.Page, MsgType.VbCritical, "没有指定收文流程模版!", "Container.aspx?ClassName=FS.ADIM.OA.WebUI.WorkflowMenu.ToDoTask.PG_WaitHandle"); return; } l_dstDataSet = OAConfig.GetRankConfig(); DataTable l_dtbDataTable = l_dstDataSet.Tables[this.TemplateName == ProcessConstString.TemplateName.COMPANY_RECEIVE ? this.TemplateName : ProcessConstString.TemplateName.MERGED_RECEIVE];//renjinquan+ String[] l_strAryRoleName = l_dtbDataTable.Rows[0]["角色"].ToString().Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); if (l_strAryRoleName.Length == 0) { JScript.RedirectPage(this.Page, "未配置收文登记权限", this.TemplateName, "1"); return; } String[] l_strAryUserRoleNames = CurrentUserInfo.RoleName.ToArray(); IEnumerable <String> l_enumRole = l_strAryUserRoleNames.Intersect(l_strAryRoleName); if (l_enumRole.Count() == 0) { JScript.RedirectPage(this.Page, string.Format("只有[{0}] {1} 可以访问该表单!", l_strAryRoleName[0], OAUser.GetUserByRole(l_strAryRoleName[0]).GetFieldVals("Name", ",")), TemplateName, "1"); return; } if (TemplateName != ProcessConstString.TemplateName.COMPANY_RECEIVE) { trProcessTemplate.Visible = true; this.ddlProcessTemplate.SelectedValue = this.TemplateName; } else { SubTemplateName = TemplateName; } //设置客户端只读 txtReceiveUnit.Attributes.Add("readOnly", "true"); ////////////////////////////////////////////////////20110124 扬子江 //if (!(TemplateName.Equals("党纪工团收文"))) //{ txtDocumentNo.Attributes.Add("readonly", "true"); //} this.ucFileList.UCTemplateName = TemplateName; //收文年份默认加载前后十年,并且默认选择当前年份 int l_intYear = DateTime.Now.Year; for (int i = l_intYear - 10; i < l_intYear + 10; i++) { ddlReceiveYear.Items.Add(i.ToString()); ddlQueryRecYear.Items.Add(i.ToString()); } ddlReceiveYear.Text = l_intYear.ToString(); txtReceiveDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); LoadRegisterList(); if (!String.IsNullOrEmpty(FormID)) { SetFormByID(FormID); } if (this.TemplateName != ProcessConstString.TemplateName.COMPANY_RECEIVE && this.ddlProcessTemplate.SelectedIndex >= 0) { ddlProcessTemplate_SelectedIndexChanged(null, null); } } }
/// <summary> /// 实体加载 /// </summary> protected override void EntityToControl() { B_FinanceHWBX entity = base.EntityData != null ? base.EntityData as B_FinanceHWBX : new B_FinanceHWBX(); //拟稿 if (base.StepName == ProcessConstString.StepName.STEP_DRAFT && !base.IsPreview) { //编制部门 OADept.GetDeptByUser(this.ddlBianZhiBuMen, CurrentUserInfo.UserName, 1, true, false); //部门负责人 if (this.ddlBianZhiBuMen.Items.Count > 0) { ddlBianZhiBuMen_SelectedIndexChanged(null, null); } //拟稿日期 txtNiGaoRiQi.Text = DateTime.Now.ToString("yyyy-MM-dd"); //拟稿人 this.txtNiGaoRen.Text = CurrentUserInfo.DisplayName; this.txtNiGaoRenID.Text = CurrentUserInfo.UserName; } else { FormsMethod.SetDropDownList(this.ddlBianZhiBuMen, entity.DepartmentID, entity.Department); FormsMethod.SetDropDownList(this.ddlYanShouRen, entity.YanShouRenID, entity.YanShouRen); FormsMethod.SetDropDownList(this.ddlShenQianRen, entity.ShenQianRenID, entity.ShenQianRen); FormsMethod.SetDropDownList(this.ddlShenHe, entity.ShenHeRenID, entity.ShenHeRen); FormsMethod.SetDropDownList(this.ddlShenPi, entity.ShenPiRenID, entity.ShenPiRen); this.txtNiGaoRen.Text = entity.Drafter; this.txtNiGaoRenID.Text = entity.DrafterID; } //验收 if (base.StepName == ProcessConstString.StepName.FinanceHWBXStepName.STEP_YANSHOU) { OAUser.GetUserByRole(this.ddlShenQianRen, "立项审签"); } //立项审签 if (base.StepName == ProcessConstString.StepName.FinanceHWBXStepName.STEP_LIXIANGSHENQIAN) { if (this.ddlBianZhiBuMen.Items.Count > 0) { OAUser.GetUserByDeptPost(this.ddlShenHe, this.ddlBianZhiBuMen.SelectedValue, OUConstString.PostName.FUCHUZHANG, true, true); } } //审核 if (base.StepName == ProcessConstString.StepName.FinanceHWBXStepName.STEP_SHENHE) { OAUser.GetUserByRole(this.ddlShenPi, OUConstString.RoleName.COMPANY_LEADER); OAUser.GetUserByRole(this.ddlCaiWu, OUConstString.RoleName.CaiWu); } //审批 if (base.StepName == ProcessConstString.StepName.FinanceHWBXStepName.STEP_SHENPI) { OAUser.GetUserByRole(this.ddlCaiWu, OUConstString.RoleName.CaiWu); } //财务 if (base.StepName == ProcessConstString.StepName.FinanceHWBXStepName.STEP_CAIWUSHENHE) { } //反馈报销人 if (base.StepName == ProcessConstString.StepName.FinanceHWBXStepName.STEP_FANKUI) { } if (txtNiGaoRen.Text == "") { txtNiGaoRen.Text = entity.Drafter; } if (txtNiGaoRiQi.Text == "") { txtNiGaoRiQi.Text = entity.DraftDate.ToString("yyyy-MM-dd"); } txtDocumentNo.Text = entity.DocumentNo; FormsMethod.SelectedDropDownList(this.ddlBianZhiBuMen, entity.DepartmentID, entity.Department); if (entity.DanJuZhangShu == Int32.MinValue) { txtDanJuZhangShu.Text = ""; } else { txtDanJuZhangShu.Text = entity.DanJuZhangShu.ToString(); } txtYongTu.Text = entity.YongTu; txtShouKuanYinHang.Text = entity.ShouKuanYinHang; txtShouKuanDanWei.Text = entity.ShouKuanDanWei; txtShouKuanZhangHao.Text = entity.ShouKuanZhangHao; txtBaoXiaoJinE.Text = entity.BaoXiaoJinE; txtBaoXiaoJinEDaXie.Text = entity.BaoXiaoJinEDaXie; txtLiXiangHao.Text = entity.LiXiangHao; txtLiXiangJinE.Text = entity.LiXiangJinE.ToString(); txtLiXiangLeiJiJinE.Text = entity.LiXiangLeiJiJinE.ToString(); FormsMethod.SelectedDropDownList(this.ddlYanShouRen, entity.YanShouRenID, entity.YanShouRen); FormsMethod.SelectedDropDownList(this.ddlShenQianRen, entity.ShenQianRenID, entity.ShenQianRen); FormsMethod.SelectedDropDownList(this.ddlShenHe, entity.ShenHeRenID, entity.ShenHeRen); FormsMethod.SelectedDropDownList(this.ddlShenPi, entity.ShenPiRenID, entity.ShenPiRen); FormsMethod.SelectedDropDownList(this.ddlCaiWu, entity.CaiWuID, entity.CaiWu); //提示信息 this.txtTiShiXinXi.Text = entity.Message; this.txtTianJia.Text = entity.MessageAdd; }
protected void Page_Load(object sender, EventArgs e) { DataSet l_dstDataSet = null; if (!Page.IsPostBack) { this.TemplateName = Request.QueryString[ConstString.QueryString.TEMPLATE_NAME]; if (String.IsNullOrEmpty(this.TemplateName)) { JScript.ShowMsgBox(this.Page, MsgType.VbCritical, "没有指定收文流程模版!", "Container.aspx?ClassName=FS.ADIM.OA.WebUI.WorkflowMenu.ToDoTask.PG_WaitHandle"); return; } this.ucCompany.UCNameControl = this.txtReceiveUnit.ClientID; this.ucQueryCompany.UCNameControl = this.txtQueryRecUnit.ClientID; OAList.BindHJLX2(ddlDocumentType, false);//任金权修改 ddlDocumentType.Items.Insert(0, new ListItem()); this.ucAttachment.UCTemplateName = TemplateName; l_dstDataSet = OAConfig.GetRankConfig(); DataTable l_dtbDataTable = l_dstDataSet.Tables[TemplateName]; String[] l_strAryRoleName = l_dtbDataTable.Rows[0]["角色"].ToString().Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); if (l_strAryRoleName.Length == 0) { JScript.RedirectPage(this.Page, "未配置收文登记权限", TemplateName, "1"); return; } String[] l_strAryUserRoleNames = CurrentUserInfo.RoleName.ToArray(); IEnumerable <String> l_enumRole = l_strAryUserRoleNames.Intersect(l_strAryRoleName); if (l_enumRole.Count() == 0) { JScript.RedirectPage(this.Page, string.Format("只有[{0}] {1} 可以访问该表单!", l_strAryRoleName[0], OAUser.GetUserByRole(l_strAryRoleName[0]).GetFieldVals("Name", ",")), TemplateName, "1"); return; } //初始化设置控件的验证功能 txtReceiveUnit.RequiredType = RequiredType.NotNull; txtReceiveDate.RequiredType = RequiredType.NotNull; txtDocumentTitle.RequiredType = RequiredType.NotNull; txtPageCount.RequiredType = RequiredType.PositiveInteger; txtReceiveUnit.BackColor = System.Drawing.Color.Empty; txtReceiveDate.BackColor = System.Drawing.Color.Empty; txtXingWenDate.BackColor = System.Drawing.Color.Empty; txtDocumentTitle.BackColor = System.Drawing.Color.Empty; //设置客户端只读 txtReceiveUnit.Attributes.Add("readOnly", "true"); txtQueryRecUnit.Attributes.Add("readOnly", "true"); txtDocumentNo.Attributes.Add("readonly", "true"); //收文年份默认加载前后十年,并且默认选择当前年份 txtReceiveDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); txtXingWenDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); txtFormationDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); ddlUrgentDegree.SelectedIndex = 1; txtPageCount.Text = "1"; ddlKeepTime.SelectedIndex = 3; LoadRegisterList(); if (m_ID != null) { SetFormByID(m_ID); } } }