Exemple #1
0
        /// <summary>
        /// 得到信箱分类组
        /// </summary>
        private void AddGroupNodes()
        {
            Db_ConsultMana mana        = new Db_ConsultMana();
            bool           isNeedCheck = new Db_ConsultMana().GetDetail(Request.QueryString["HistoryGuid"]).InfoStatus == 0 ? false : true;

            EpointTreeNode node;
            DataView       dvBox = BoxMana.BoxSelectAll();                                              //选择所有的邮箱

            dvBox.RowFilter = "BoxGroupID='" + Frame_Config.GetConfigValue("Consult_FenFaGroup") + "'"; //判断组下是否有信箱
            if (dvBox.Count > 0)
            {
                EpointTreeNode newnode;
                for (int j = 0; j < dvBox.Count; j++)
                {
                    newnode = new EpointTreeNode();
                    newnode.ShowInputCtrl = true;
                    newnode.Text          = dvBox[j]["BoxName"].ToString();
                    newnode.Value         = dvBox[j]["BoxGuid"].ToString();
                    //if (isNeedCheck)//有未处理的则不能选择
                    //{
                    //    if (mana.IsNotHandle(Request.QueryString["HistoryGuid"], dvBox[j]["BoxGuid"].ToString()))
                    //    {
                    //        newnode.CtrlEnable = false;
                    //    }
                    //}
                    TextTreeView1.Nodes.Add(newnode);
                }
            }
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.CurrentPosition = "信件分发";
            this.Title           = "信件分发";


            /// 判断是否现 回复方式
            if (new Epoint.Frame.Bizlogic.Frame_Config().GetDetail("Consult_EnableReplyType").ConfigValue == "1")
            {
                trReplyType.Visible = true;
            }
            else
            {
                trReplyType.Visible = false;
            }

            if (string.IsNullOrEmpty(Frame_Config.GetConfigValue("Consult_FenFaGroup")))
            {
                AddTopNodes();
            }
            else
            {
                AddGroupNodes();
            }
        }
        /// <summary>
        /// 得到信箱分类组
        /// </summary>
        private void AddGroupNodes()
        {
            Db_ConsultMana mana = new Db_ConsultMana();

            EpointTreeNode node;
            DataView       dvBox = BoxMana.BoxSelectAll();//选择所有的邮箱

            string tmpBoxGroupID = "";

            if ("TopGroup" == Frame_Config.GetConfigValue("Consult_UserSendToGroup"))
            {
                tmpBoxGroupID = BoxMana.GetDetail(treeSendToBox.Value).BoxGroupID;
            }
            else
            {
                tmpBoxGroupID = Frame_Config.GetConfigValue("Consult_UserSendToGroup");
            }

            string[] BoxGroupIDs = tmpBoxGroupID.Split('|');
            foreach (string BoxGroupID in BoxGroupIDs)
            {
                if (string.IsNullOrEmpty(BoxGroupID))
                {
                    continue;
                }
                node = new EpointTreeNode();
                Detail_RG_ConsultBoxGroup boxgroup = BoxMana.BoxGroupGetDetail(BoxGroupID);

                node.Text          = boxgroup.BoxGroupName;
                node.Value         = boxgroup.BoxGroupID;
                node.ShowInputCtrl = false;

                dvBox.RowFilter = "BoxGroupID='" + BoxGroupID + "'";//判断组下是否有信箱
                if (dvBox.Count > 0)
                {
                    EpointTreeNode newnode;
                    for (int j = 0; j < dvBox.Count; j++)
                    {
                        newnode = new EpointTreeNode();
                        newnode.ShowInputCtrl = true;
                        newnode.Text          = dvBox[j]["BoxName"].ToString();
                        newnode.Value         = dvBox[j]["BoxGuid"].ToString();
                        node.ChildNodes.Add(newnode);
                    }
                }
                treeSendToBox.Nodes.Add(node);
            }
        }
        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();
            }
        }