protected void btnArchive_Click(object sender, EventArgs e) { B_ReceiveEdit l_BusReceiveEdit = new B_ReceiveEdit(); l_BusReceiveEdit.ID = Convert.ToInt32(RegisterID); if (l_BusReceiveEdit != null) { l_BusReceiveEdit.ArchiveStatus = "已归档"; l_BusReceiveEdit.Save(); } string strMessage = string.Empty; try { this.Devolve(out strMessage); base.Devolved(base.ProcessID, base.TemplateName); JScript.Alert("归档成功!\\n流水号:" + strMessage, false); } catch (Exception ex) { base.WriteLog(ex.Message); JScript.Alert("归档失败!请查看配置是否正确!", false); } }
/// <summary> /// 修改按钮处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnModify_Click(object sender, EventArgs e) { B_ReceiveEdit l_BusReceiveEdit = null; if (String.IsNullOrEmpty(txtDocumentNo.Text.TrimEnd())) { JScript.ShowMsgBox(this.Page, "请先选择一条收文记录!", false); return; } if (!VerifyEditField()) { JScript.ShowMsgBox(Page, MsgType.VbCritical, m_strAryMessages); return; } l_BusReceiveEdit = new B_ReceiveEdit(); l_BusReceiveEdit.ID = Convert.ToInt32(txtRegisterID.Text); if (this.txtSendNo.Text.TrimEnd() != l_BusReceiveEdit.SendLetterNo)//任金权增加 { //行文号是否重复 if (B_ReceiveEdit.IsHaveSendNo(this.txtSendNo.Text.TrimEnd())) { JScript.ShowMsgBox(this.Page, "行文号重复", false); this.txtSendNo.Focus(); return; } } if (l_BusReceiveEdit.CreateDate == DateTime.MinValue) { JScript.ShowMsgBox(this.Page, "当前收文登记信息已经被删除,不能做修改动作!", false); return; } PopulateEntity(l_BusReceiveEdit); //归档状态 if (chkIsArchive.Checked) { l_BusReceiveEdit.ArchiveStatus = "已归档"; } else { l_BusReceiveEdit.ArchiveStatus = "未完成"; } if (l_BusReceiveEdit.Save()) { JScript.ShowMsgBox(this.Page, "保存成功", false); PopulateEditField(l_BusReceiveEdit); LoadRegisterList(); } }
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)); }
/// <summary> /// 启动流程按钮处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnLaunch_Click(object sender, EventArgs e) { B_ReceiveEdit l_BusReceiveEdit = null; if (String.IsNullOrEmpty(txtDocumentNo.Text.TrimEnd())) { JScript.ShowMsgBox(this.Page, "请先选择一条收文记录!", false); return; } l_BusReceiveEdit = new B_ReceiveEdit(); l_BusReceiveEdit.ID = Convert.ToInt32(txtRegisterID.Text); l_BusReceiveEdit.Save(); if (!String.IsNullOrEmpty(l_BusReceiveEdit.ProcessID)) { JScript.ShowMsgBox(this.Page, "当前选择的收文登记记录已经启动!", false); return; } String l_strSuffix = ConstString.QueryString.REGISTER_ID + "=" + Convert.ToString(txtRegisterID.Text); switch (SubTemplateName) { case ProcessConstString.TemplateName.COMPANY_RECEIVE: Response.Redirect("Container.aspx?ClassName=FS.ADIM.OA.WebUI.WorkFlow.Receive.PG_CompanyReceive&TemplateName=" + Server.UrlEncode(ProcessConstString.TemplateName.COMPANY_RECEIVE) + "&" + l_strSuffix, true); break; case ProcessConstString.TemplateName.TRADE_UNION_RECEIVE: Response.Redirect("Container.aspx?ClassName=FS.ADIM.OA.WebUI.WorkFlow.Receive.PG_Receive&TemplateName=" + Server.UrlEncode(ProcessConstString.TemplateName.MERGED_RECEIVE) + "&" + l_strSuffix, true); break; case ProcessConstString.TemplateName.PARTY_DISCIPLINE_RECEIVE: Response.Redirect("Container.aspx?ClassName=FS.ADIM.OA.WebUI.WorkFlow.Receive.PG_Receive&TemplateName=" + Server.UrlEncode(ProcessConstString.TemplateName.MERGED_RECEIVE) + "&" + l_strSuffix, true); break; case ProcessConstString.TemplateName.YOUTH_LEAGUE_RECEIVE: Response.Redirect("Container.aspx?ClassName=FS.ADIM.OA.WebUI.WorkFlow.Receive.PG_Receive&TemplateName=" + Server.UrlEncode(ProcessConstString.TemplateName.MERGED_RECEIVE) + "&" + l_strSuffix, true); break; } }
/// <summary> /// 新增按钮处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnAddNew_Click(object sender, EventArgs e) { B_ReceiveEdit l_BusReceiveEdit = null; //表单的合法性验证 if (!VerifyEditField()) { JScript.ShowMsgBox(Page, MsgType.VbCritical, m_strAryMessages); return; } //行文号是否重复 if (B_ReceiveEdit.IsHaveSendNo(this.txtSendNo.Text.TrimEnd()))//任金权增加 { JScript.ShowMsgBox(this.Page, "行文号重复", false); this.txtSendNo.Focus(); return; } l_BusReceiveEdit = new B_ReceiveEdit(); PopulateEntity(l_BusReceiveEdit); //l_BusReceiveEdit.ReceiveNo = B_ReceiveID.GenerateReceiveNo(DateTime.Now.Year.ToString(), TemplateName); ////////////////////////////////////////////////////20110124 扬子江 if (!(TemplateName.Equals("党纪工团收文"))) { l_BusReceiveEdit.ReceiveNo = B_ReceiveID.GenerateReceiveNo(DateTime.Now.Year.ToString(), TemplateName); } else { this.SubTemplateName = ddlProcessTemplate.SelectedValue; if (this.SubTemplateName == "工会收文") { l_BusReceiveEdit.ReceiveNo = B_ReceiveID.GenerateDJGTReceiveNo("H" + DateTime.Now.Year.ToString(), this.SubTemplateName); } if (this.SubTemplateName == "团委收文") { l_BusReceiveEdit.ReceiveNo = B_ReceiveID.GenerateDJGTReceiveNo("T" + DateTime.Now.Year.ToString(), this.SubTemplateName); } if (this.SubTemplateName == "党委纪委收文") { l_BusReceiveEdit.ReceiveNo = B_ReceiveID.GenerateDJGTReceiveNo("D" + DateTime.Now.Year.ToString(), this.SubTemplateName); } } //归档状态 if (chkIsArchive.Checked) { l_BusReceiveEdit.ArchiveStatus = "已归档"; } else { l_BusReceiveEdit.ArchiveStatus = "未完成"; } if (l_BusReceiveEdit.Save()) { JScript.ShowMsgBox(this.Page, "新增成功", false); PopulateEditField(l_BusReceiveEdit); btnQuery_Click(null, null); } }
protected void btnArchive_Click(object sender, EventArgs e) { B_ReceiveEdit l_BusReceiveEdit = new B_ReceiveEdit(); l_BusReceiveEdit.ID = Convert.ToInt32(RegisterID); if (l_BusReceiveEdit != null) { l_BusReceiveEdit.ArchiveStatus = "已归档"; l_BusReceiveEdit.Save(); } string strMessage = string.Empty; try { this.Devolve(out strMessage); base.Devolved(base.ProcessID, base.TemplateName); JScript.Alert("归档成功!\\n流水号:" + strMessage, false); } catch (Exception ex) { base.WriteLog(ex.Message); JScript.Alert("归档失败!请查看配置是否正确!", 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)); }
/// <summary> /// 修改按钮处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnModify_Click(object sender, EventArgs e) { B_ReceiveEdit l_BusReceiveEdit = null; if (String.IsNullOrEmpty(txtDocumentNo.Text.TrimEnd())) { JScript.ShowMsgBox(this.Page, "请先选择一条收文记录!", false); return; } if (!VerifyEditField()) { JScript.ShowMsgBox(Page, MsgType.VbCritical, m_strAryMessages); return; } l_BusReceiveEdit = new B_ReceiveEdit(); l_BusReceiveEdit.ID = Convert.ToInt32(txtRegisterID.Text); if (this.txtSendNo.Text.TrimEnd() != l_BusReceiveEdit.SendLetterNo)//任金权增加 { //行文号是否重复 if (B_ReceiveEdit.IsHaveSendNo(this.txtSendNo.Text.TrimEnd())) { JScript.ShowMsgBox(this.Page, "行文号重复", false); this.txtSendNo.Focus(); return; } } if (l_BusReceiveEdit.CreateDate == DateTime.MinValue) { JScript.ShowMsgBox(this.Page, "当前收文登记信息已经被删除,不能做修改动作!", false); return; } PopulateEntity(l_BusReceiveEdit); //归档状态 if (chkIsArchive.Checked) { l_BusReceiveEdit.ArchiveStatus = "已归档"; } else { l_BusReceiveEdit.ArchiveStatus = "未完成"; } if (l_BusReceiveEdit.Save()) { JScript.ShowMsgBox(this.Page, "保存成功", false); PopulateEditField(l_BusReceiveEdit); LoadRegisterList(); } }
/// <summary> /// 启动流程按钮处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnLaunch_Click(object sender, EventArgs e) { B_ReceiveEdit l_BusReceiveEdit = null; if (String.IsNullOrEmpty(txtDocumentNo.Text.TrimEnd())) { JScript.ShowMsgBox(this.Page, "请先选择一条收文记录!", false); return; } l_BusReceiveEdit = new B_ReceiveEdit(); l_BusReceiveEdit.ID = Convert.ToInt32(txtRegisterID.Text); l_BusReceiveEdit.Save(); if (!String.IsNullOrEmpty(l_BusReceiveEdit.ProcessID)) { JScript.ShowMsgBox(this.Page, "当前选择的收文登记记录已经启动!", false); return; } String l_strSuffix = ConstString.QueryString.REGISTER_ID + "=" + Convert.ToString(txtRegisterID.Text); switch (SubTemplateName) { case ProcessConstString.TemplateName.COMPANY_RECEIVE: Response.Redirect("Container.aspx?ClassName=FS.ADIM.OA.WebUI.WorkFlow.Receive.PG_CompanyReceive&TemplateName=" + Server.UrlEncode(ProcessConstString.TemplateName.COMPANY_RECEIVE) + "&" + l_strSuffix, true); break; case ProcessConstString.TemplateName.TRADE_UNION_RECEIVE: Response.Redirect("Container.aspx?ClassName=FS.ADIM.OA.WebUI.WorkFlow.Receive.PG_Receive&TemplateName=" + Server.UrlEncode(ProcessConstString.TemplateName.MERGED_RECEIVE) + "&" + l_strSuffix, true); break; case ProcessConstString.TemplateName.PARTY_DISCIPLINE_RECEIVE: Response.Redirect("Container.aspx?ClassName=FS.ADIM.OA.WebUI.WorkFlow.Receive.PG_Receive&TemplateName=" + Server.UrlEncode(ProcessConstString.TemplateName.MERGED_RECEIVE) + "&" + l_strSuffix, true); break; case ProcessConstString.TemplateName.YOUTH_LEAGUE_RECEIVE: Response.Redirect("Container.aspx?ClassName=FS.ADIM.OA.WebUI.WorkFlow.Receive.PG_Receive&TemplateName=" + Server.UrlEncode(ProcessConstString.TemplateName.MERGED_RECEIVE) + "&" + l_strSuffix, true); break; } }
/// <summary> /// 新增按钮处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnAddNew_Click(object sender, EventArgs e) { B_ReceiveEdit l_BusReceiveEdit = null; //表单的合法性验证 if (!VerifyEditField()) { JScript.ShowMsgBox(Page, MsgType.VbCritical, m_strAryMessages); return; } //行文号是否重复 if (B_ReceiveEdit.IsHaveSendNo(this.txtSendNo.Text.TrimEnd()))//任金权增加 { JScript.ShowMsgBox(this.Page, "行文号重复", false); this.txtSendNo.Focus(); return; } l_BusReceiveEdit = new B_ReceiveEdit(); PopulateEntity(l_BusReceiveEdit); //l_BusReceiveEdit.ReceiveNo = B_ReceiveID.GenerateReceiveNo(DateTime.Now.Year.ToString(), TemplateName); ////////////////////////////////////////////////////20110124 扬子江 if (!(TemplateName.Equals("党纪工团收文"))) { l_BusReceiveEdit.ReceiveNo = B_ReceiveID.GenerateReceiveNo(DateTime.Now.Year.ToString(), TemplateName); } else { this.SubTemplateName = ddlProcessTemplate.SelectedValue; if (this.SubTemplateName == "工会收文") { l_BusReceiveEdit.ReceiveNo = B_ReceiveID.GenerateDJGTReceiveNo("H" + DateTime.Now.Year.ToString(), this.SubTemplateName); } if (this.SubTemplateName == "团委收文") { l_BusReceiveEdit.ReceiveNo = B_ReceiveID.GenerateDJGTReceiveNo("T" + DateTime.Now.Year.ToString(), this.SubTemplateName); } if (this.SubTemplateName == "党委纪委收文") { l_BusReceiveEdit.ReceiveNo = B_ReceiveID.GenerateDJGTReceiveNo("D" + DateTime.Now.Year.ToString(), this.SubTemplateName); } } //归档状态 if (chkIsArchive.Checked) { l_BusReceiveEdit.ArchiveStatus = "已归档"; } else { l_BusReceiveEdit.ArchiveStatus = "未完成"; } if (l_BusReceiveEdit.Save()) { JScript.ShowMsgBox(this.Page, "新增成功", false); PopulateEditField(l_BusReceiveEdit); btnQuery_Click(null, null); } }