/// <summary> /// 保存修改 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSave_Click(object sender, EventArgs e) { string HistoryGuid = Request.QueryString["HistoryGuid"]; Detail_RG_ConsultHistory historyDetail = mana.GetDetail(HistoryGuid); mana.UpdateUserSendToBox(HistoryGuid, treeSendToBox.Value); mana.UpdateOver(HistoryGuid, Session["DisplayName"].ToString(), txtReplyOption.Text, RblType.SelectedValue, RblPublishOnweb.SelectedIndex == 0 ? true : false);//将信件结束 mana.UpdateReplyType(HistoryGuid, RblType.SelectedValue); mana.UpdatePublishOnWeb(HistoryGuid, RblPublishOnweb.SelectedIndex == 0 ? true : false); WriteScript("refreshParent(\"\");window.close();"); }
/// <summary> /// 直接回复 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnReply_Click(object sender, EventArgs e) { if (txtReplyOption.Text == "") { AlertAjaxMessage("请输入回复意见"); } if (txtReplyOption.Text != "") { DateTime Times = DateTime.Now; string Typr = "普通件"; string HistoryGuid = Request.QueryString["HistoryGuid"]; Detail_RG_ConsultHistory historyDetail = mana.GetDetail(HistoryGuid); mana.UpdateUserSendToBox(HistoryGuid, treeSendToBox.Value); DataView handleDV = mana.SelectAllHandle(HistoryGuid); if (handleDV.Count == 0) { // 信件不经过分发,直接就回复 mana.InsertHandle(treeSendToBox.Value, HistoryGuid, Typr, "", "", "", 0, Convert.ToDateTime(txtEndDate.Text + " " + DateTime.Now.ToShortTimeString())); mana.UpdateHandle(HistoryGuid, treeSendToBox.Value, Times, txtReplyOption.Text, Session["UserGuid"].ToString());//结束自己的办理流程 mana.UpdateHandleStatus(HistoryGuid, treeSendToBox.Value, 9); } else { // 信件已经分发 handleDV.RowFilter = "HandleStatus=9"; if (handleDV.Count == 0) { // 没有回复 mana.InsertHandle(treeSendToBox.Value, HistoryGuid, Typr, "", "", "", 0, Convert.ToDateTime(txtEndDate.Text + " " + DateTime.Now.ToShortTimeString())); mana.UpdateHandle(HistoryGuid, treeSendToBox.Value, Times, txtReplyOption.Text, Session["UserGuid"].ToString());//结束自己的办理流程 mana.UpdateHandleStatus(HistoryGuid, treeSendToBox.Value, 9); } } mana.UpdateOver(HistoryGuid, Times, Session["DisplayName"].ToString(), txtReplyOption.Text, RblType.SelectedValue, RblPublishOnweb.SelectedIndex == 0 ? true : false);//将信件结束 mana.UpdateReplyType(HistoryGuid, RblType.SelectedValue); mana.UpdatePublishOnWeb(HistoryGuid, RblPublishOnweb.SelectedIndex == 0 ? true : false); mana.Update(HistoryGuid, 9); //if(RblPublishOnweb.SelectedIndex == 0) //AddCatch(); } WriteScript("refreshParent(\"\");window.close();"); }
/// <summary> /// 回复 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void BtnReply_Click(object sender, EventArgs e) { if (txtReplyOption.Text != "") { string HistoryGuid = Request.QueryString["HistoryGuid"]; DateTime Times = DateTime.Now; mana.UpdateHandle(Convert.ToInt32(Request.QueryString["Row_ID"]), Times, txtReplyOption.Text, Session["UserGuid"].ToString()); //结束自己的办理流程 mana.UpdateHandleStatus(Convert.ToInt32(Request.QueryString["Row_ID"]), 9); if (ViewState["ReplayType"].ToString() != "普通件") //联办件传给了多个人,需要全部办完才结束 { Detail_RG_ConsultHistory detialHt = mana.GetDetail(HistoryGuid); string BoxName = BoxMana.GetDetail(ViewState["BoxGuid"].ToString()).BoxName; string ReplatOption = detialHt.ReplyOpinion + "<br>" + BoxName + ":" + txtReplyOption.Text + "<br> "; if (mana.SelectIFHandleOver(HistoryGuid))//全部办理完 { mana.UpdateOver(HistoryGuid, Times, detialHt.HandleUser + Session["DisplayName"].ToString() + ";", ReplatOption, Rdo_HuiFu.SelectedValue, RblPublishOnweb.SelectedIndex == 0 ? true : false);//将信件结束 mana.Update(Request.QueryString["HistoryGuid"], handledStatusCode); } else//没办理完 仅更新办理人 和办理意见 和回复方式 { mana.UpdateOver(HistoryGuid, detialHt.HandleUser + Session["DisplayName"].ToString() + ";", ReplatOption, Rdo_HuiFu.SelectedValue, RblPublishOnweb.SelectedIndex == 0 ? true : false); } } else//普通件一个人办完就结束 { mana.UpdateOver(HistoryGuid, Times, Session["DisplayName"].ToString(), txtReplyOption.Text, Rdo_HuiFu.SelectedValue, RblPublishOnweb.SelectedIndex == 0 ? true : false);//将信件结束 mana.Update(Request.QueryString["HistoryGuid"], handledStatusCode); } mana.UpdateAfterOver(HistoryGuid, lblSubject.Text, txtContent.Text, txtReplyOption.Text, RblPublishOnweb.SelectedIndex == 0 ? true : false, Rdo_HuiFu.SelectedValue); } //AddCatch(); WriteScript("refreshParent(\"\");window.close();"); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { this.CurrentPosition = "咨询回复"; BtnDel.Visible = false; BtnReply.Visible = false; btnSave.Visible = false; btnBack.Visible = false; BtnChange.Visible = false; BtnZbcl.Visible = false; BtnHfcl.Visible = false; trfenfa.Visible = false; trfenfadate.Visible = false; string HistoryGuid = Request.QueryString["HistoryGuid"]; Detail_RG_ConsultHistory ConsultHistory = mana.GetDetail(HistoryGuid); #region 初始化ConsultHistory页面信息 lblSubject.Text = ConsultHistory.Subject; //lblSex.Text = ConsultHistory.Sex; lblPostUserName.Text = ConsultHistory.PostUserName; lblPostDate.Text = ConsultHistory.PostDate.ToString(); //lblPhone.Text = ConsultHistory.Tel; //lblEmail.Text = ConsultHistory.Email; //lblAddress.Text = ConsultHistory.Address; txtContent.Text = ConsultHistory.Content; lblUserIP.Text = ConsultHistory.UserIP; if (ConsultHistory.PublishOnWeb) { RblPublishOnweb.SelectedIndex = 0; } else { RblPublishOnweb.SelectedIndex = 1; } if (ConsultHistory.ReplyType == "网站回复") { Rdo_HuiFu.SelectedIndex = 1; } if (ConsultHistory.IsDelete) { lblHandled.Text = "暂不处理"; } else { lblHandled.Text = mana.SelectAllHandleStr(HistoryGuid);//处理情况 } #endregion Detail_RG_ConsultBox DetailBox = BoxMana.GetDetail(ConsultHistory.UserSendToBoxGuid); int Row_ID = Convert.ToInt32(Request.QueryString["Row_ID"]); Detail_RG_ConsultHandle ConsultHandle = mana.GetDetailHanDle(Row_ID); ViewState["ReplayType"] = ConsultHandle.HandleType; ViewState["BoxGuid"] = ConsultHandle.BoxGuid; txtReplyOption.Text = ConsultHandle.strComment; if (ConsultHandle.HandleStatus != 2 && ConsultHandle.HandleStatus != 3) //已退回、已转发 操作按钮都不可见 { if (ConsultHandle.HandleStatus == handledStatusCode) //已处理 保存按钮可见 { btnSave.Visible = true; } if (DetailBox.NeedAudit == 0) //不启用信访局过滤 { if (ConsultHistory.IsDelete) //恢复处理按钮可见 { BtnHfcl.Visible = true; } else { BtnZbcl.Visible = true; if (ConsultHandle.HandleStatus == 0)//未处理 转发、回复按钮可见 { BtnReply.Visible = true; BtnChange.Visible = true; if (ConsultHistory.UserSendToBoxGuid == ConsultHandle.BoxGuid) { BtnDel.Visible = true; } } } } else//启用信访局过滤 只能回复和退回 { #region 分发意见 trfenfa.Visible = true; trfenfadate.Visible = true; lbzfcomment.Text = ConsultHandle.strFenfaComment; lblFenfaDate.Text = ConsultHandle.dtFenfaDate.ToString("yyyy-MM-dd"); #endregion if (ConsultHandle.HandleStatus == 0)//ConsultHandle.HandleStatus { BtnReply.Visible = true; btnBack.Visible = true; } } } /// 判断是否现在网上发布行 if (new Epoint.Frame.Bizlogic.Frame_Config().GetDetail("Consult_EnablePubAtReply").ConfigValue == "1") { trIsPub.Visible = true; } else { trIsPub.Visible = false; } /// 判断是否现 回复方式 if (new Epoint.Frame.Bizlogic.Frame_Config().GetDetail("Consult_EnableReplyType").ConfigValue == "1") { trReplyType.Visible = true; } else { trReplyType.Visible = false; } } else { if (Request.Form["__EVENTTARGET"] == "SendBack") { if (Request.Form["__EVENTARGUMENT"] != "") { //mana.InsertHandle("", Request.QueryString["HistoryGuid"], "普通件", "","","",2);//添加一条退回的记录 mana.UpdateHandle(Convert.ToInt32(Request.QueryString["Row_ID"]), DateTime.Now, Request.Form["__EVENTARGUMENT"], Session["UserGuid"].ToString());//结束自己的办理流程 mana.Update(Request.QueryString["HistoryGuid"], 2); mana.UpdateHandleStatus(Convert.ToInt32(Request.QueryString["Row_ID"]), 2); WriteAjaxMessage("refreshParent(\"\");window.close();"); } } if (Request.Form["__EVENTTARGET"] == "ReSend")//转发信件 { string AllInfo = Request.Form["__EVENTARGUMENT"]; if (AllInfo.IndexOf('★') > -1) { string BoxGuid = AllInfo.Split('★')[0].ToString(); // AlertAjaxMessage(BoxGuid); string NoticeInfo = AllInfo.Replace(BoxGuid + "★", ""); int HandleDays = BoxMana.GetDetail(BoxGuid).HandleDays; DateTime dt = DateTime.Now; //DateTime HandleEndDate = new Epoint.Frame.Webbuilder.Bizlogic.WorkingDay.DB_WorkingDay().GetEndWorkingDate(dt, HandleDays) DateTime HandleEndDate = dt.AddDays(HandleDays); mana.InsertHandle(BoxGuid, Request.QueryString["HistoryGuid"], "普通件", "", "", "", 0, HandleEndDate); //添加一个待处理信息 mana.UpdateHandle(Convert.ToInt32(Request.QueryString["Row_ID"]), DateTime.Now, NoticeInfo, Session["UserGuid"].ToString()); //结束自己的办理流程 mana.UpdateHandleStatus(Convert.ToInt32(Request.QueryString["Row_ID"]), 3); WriteAjaxMessage("refreshParent(\"\");window.close();"); } } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { trfenfa.Visible = false; trfenfadate.Visible = false; string HistoryGuid = Request.QueryString["HistoryGuid"]; Detail_RG_ConsultHistory ConsultHistory = mana.GetDetail(HistoryGuid); #region 初始化ConsultHistory页面信息 lblXjbh.Text = ConsultHistory.Consultflowsn; lblSubject.Text = ConsultHistory.Subject; lblSex.Text = ConsultHistory.Sex; lblPostUserName.Text = ConsultHistory.PostUserName; lblPostDate.Text = ConsultHistory.PostDate.ToString("yyyy-MM-dd"); lblPhone.Text = ConsultHistory.Tel; lblEmail.Text = ConsultHistory.Email; lblAddress.Text = ConsultHistory.Address; lblContent.Text = ConsultHistory.Content; lblUserIP.Text = ConsultHistory.UserIP; if (ConsultHistory.IsDelete) { lblHandled.Text = "暂不处理"; } else { lblHandled.Text = mana.SelectAllHandleStr(HistoryGuid).Replace("<p>", "<div>").Replace("</p>", "</div>");//处理情况 } #endregion Detail_RG_ConsultBox DetailBox = BoxMana.GetDetail(ConsultHistory.UserSendToBoxGuid); lblBoxName.Text = DetailBox.BoxName; int Row_ID = Convert.ToInt32(Request.QueryString["Row_ID"]); Detail_RG_ConsultHandle ConsultHandle = mana.GetDetailHanDle(Row_ID); lblReplyOption.Text = ConsultHandle.strComment; if (ConsultHandle.HandleStatus != 2 && ConsultHandle.HandleStatus != 3) //已退回、已转发 操作按钮都不可见 { if (DetailBox.NeedAudit == 1) //不启用信访局过滤 { #region 分发意见 trfenfa.Visible = true; trfenfadate.Visible = true; lbzfcomment.Text = ConsultHandle.strFenfaComment; lblFenfaDate.Text = ConsultHandle.dtFenfaDate.ToString("yyyy-MM-dd"); #endregion } } } }
private string ConsultHandleDateSpan = Frame_Config.GetConfigValue("ConsultHandleDateSpan", "10");//new Epoint.Frame.Bizlogic.Frame_Config().GetDetail("ConsultHandleDateSpan").ConfigValue; protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { this.CurrentPosition = "信件处理"; // btnChange.Visible = false; BtnDel.Visible = false; BtnZbcl.Visible = false; BtnHfcl.Visible = false; BtnOk.Visible = false; btnReply.Visible = false; string HistoryGuid = Request.QueryString["HistoryGuid"]; Detail_RG_ConsultHistory ConsultHistory = mana.GetDetail(HistoryGuid); Detail_RG_ConsultBox ConsultBoxDetail = BoxMana.GetDetail(ConsultHistory.UserSendToBoxGuid); ViewState["UserSendToBoxGuid"] = ConsultHistory.UserSendToBoxGuid; treeSendToBox.Value = ConsultHistory.UserSendToBoxGuid; treeSendToBox.Text = ConsultBoxDetail.BoxName; #region 初始化页面信息 if (string.IsNullOrEmpty(ConsultHandleDateSpan)) { throw new Exception("没有配置系统变量:ConsultHandleDateSpan"); } int HandleDays = ConsultBoxDetail.HandleDays; DateTime PostDate = ConsultHistory.PostDate; DateTime dt = DateTime.Now; //DateTime HandleEndDate = new Epoint.Frame.Webbuilder.Bizlogic.WorkingDay.DB_WorkingDay().GetEndWorkingDate(dt, HandleDays); //txtEndDate.Text = HandleEndDate.ToString("yyyy-M-d"); txtEndDate.Text = PostDate.AddDays(HandleDays).ToString("yyyy-M-d"); spnbeizhu.InnerText = "(超过截止日期回复则算超时回复,默认截止日期至分发日期相隔" + HandleDays + "个工作日。)"; lblSubject.Text = ConsultHistory.Subject; // lblSex.Text = ConsultHistory.Sex; lblPostUserName.Text = ConsultHistory.PostUserName; lblPostDate.Text = ConsultHistory.PostDate.ToString(); //lblPhone.Text = ConsultHistory.Tel; //lblEmail.Text = ConsultHistory.Email; //lblAddress.Text = ConsultHistory.Address; txtContent.Text = ConsultHistory.Content; //txtReplyOption.Text = ConsultHistory.ReplyOpinion; lblIP.Text = ConsultHistory.UserIP; if (ConsultHistory.PublishOnWeb) { lblToWeb.Text = "发布到网上"; } else { lblToWeb.Text = "不发布"; } /// 判断是否现在网上发布行 if (new Epoint.Frame.Bizlogic.Frame_Config().GetDetail("Consult_EnablePubAtReply").ConfigValue == "1" || ConsultHistory.InfoStatus == 9) { if (ConsultHistory.PublishOnWeb) { RblPublishOnweb.SelectedIndex = 0; } else { RblPublishOnweb.SelectedIndex = 1; } } ViewState["ReplyType"] = ConsultHistory.ReplyType == "网站回复" ? 2 : 1; RblType.SelectedIndex = RblType.Items.IndexOf(RblType.Items.FindByValue(ConsultHistory.ReplyType)); if (ConsultHistory.IsDelete) { lblHandled.Text = "暂不处理"; } else { lblHandled.Text = mana.SelectAllHandleStr(HistoryGuid);//处理情况 } #endregion if (ConsultHistory.IsDelete)//恢复处理按钮可见 { BtnHfcl.Visible = true; } else { if (ConsultHistory.InfoStatus == 0)//初始时可以直接同意处理 { BtnOk.Visible = true; BtnZbcl.Visible = true; BtnDel.Visible = true; } //btnChange.Visible = true; txtReplyOption.Text = ConsultHistory.ReplyOpinion; if (Convert.ToDateTime("0001-1-1 0:00:00") == ConsultHistory.HandleDate)//还没有处理 { DataView dvHandle = mana.SelectAllHandle(HistoryGuid); ViewState["AlowSendaAgain"] = ""; if (dvHandle.Count > 0) { // dvHandle.RowFilter = "HandleDate is not null and BoxGuid<>''"; //if (dvHandle.Count == 0) //{//已经分发 在还没处理前可以重新转发 // btnChange.Text = "重新分发"; ViewState["AlowSendaAgain"] = "重新分发"; } } else//已经处理 { // btnChange.Visible = false; BtnOk.Visible = false; } btnReply.Visible = true; } /// 判断是否现 回复方式 if (new Epoint.Frame.Bizlogic.Frame_Config().GetDetail("Consult_EnableReplyType").ConfigValue == "1") { trReplyType.Visible = true; } else { trReplyType.Visible = false; } } else { Epoint.Common.Log.WriteLog(Request.Form["txtPostBack"]); if (Request.Form["__EVENTTARGET"] == "ReSend")//信件分发 { string HistoryGuid = Request.QueryString["HistoryGuid"]; mana.UpdateUserSendToBox(HistoryGuid, treeSendToBox.Value); if (ViewState["AlowSendaAgain"].ToString() == "重新分发")//删除未处理的流程 { mana.DeleteNotHandle(HistoryGuid); } string[] RetValue = Request.Form["__EVENTARGUMENT"].Split('★'); string[] BoxGuidList = RetValue[0].Split(';'); int SelectNum = 0;//选择的数量 for (int i = 0; i < BoxGuidList.Length; i++) { if (BoxGuidList[i] != "") { SelectNum += 1; } } string Typr = "普通件"; if (SelectNum > 1) { Typr = "联办件"; } for (int i = 0; i < BoxGuidList.Length; i++)//添加处理记录 { if (BoxGuidList[i] != "") { mana.InsertHandle(BoxGuidList[i], HistoryGuid, Typr, "", RetValue[2], Session["UserGuid"].ToString(), 0, Convert.ToDateTime(txtEndDate.Text + " " + DateTime.Now.ToShortTimeString())); } } mana.UpdateReplyType(HistoryGuid, RetValue[1]); mana.Update(HistoryGuid, 1); WriteAjaxMessage("refreshParent(\"\");window.close();"); } } if (string.IsNullOrEmpty(Frame_Config.GetConfigValue("Consult_UserSendToGroup"))) { AddTopNodes(); } else { AddGroupNodes(); } }