Exemplo n.º 1
0
        /// <summary>
        /// 绑定反馈类别
        /// </summary>
        private void DataBindAdviceTag()
        {
            AdviceState ast = (AdviceState)System.Enum.Parse(typeof(AdviceState), ThisAdvice.State.ToString());

            if (ast == AdviceState.WaitAccept)
            {
                XmlNode adviceTagNodes = XmlHelper.GetXmlNode(FileName, XPath);
                Dictionary <string, string> tagList = new Dictionary <string, string>();
                foreach (XmlNode node in adviceTagNodes)
                {
                    tagList.Add(node.Attributes["name"].Value, node.Attributes["name"].Value);
                }
                ddlAdviceTag.DataSource     = tagList;
                ddlAdviceTag.DataTextField  = "key";
                ddlAdviceTag.DataValueField = "value";
                ddlAdviceTag.DataBind();
                ddlAdviceTag.Attributes.Add("onchange", "SelectedAdviceTag('" + ddlAdviceTag.ClientID + "')");
            }
            else
            {
                ddlAdviceTag.Visible = false;
                //newTag.Visible = false;
                lbAdviceTag.Text = ThisAdvice.AdviceTag;
            }
        }
Exemplo n.º 2
0
        string _GetAdviceCountByState(AdviceState adviceState)
        {
            CurrentQuery.State = Convert.ToInt32(adviceState);
            int n = AdviceHelper.QueryAdviceCountByAll(CurrentQuery);

            return(n.ToString());
        }
Exemplo n.º 3
0
        /// <summary>
        /// 操作信息
        /// </summary>
        /// <returns></returns>
        protected bool OperationInfo(AdviceState state, string direction, bool saveReply)
        {
            try
            {
                AdviceType adviceType = AdviceTypeHelper.GetAdviceType(AdviceTypeID);
                Advice     a          = ThisAdvice;

                //处理反馈回复信息
                AdviceReply adviceReply = null;
                if (saveReply)
                {
                    adviceReply            = new AdviceReply();
                    adviceReply.AdviceID   = AdviceID;
                    adviceReply.Content    = We7Helper.ConvertPageBreakFromVisualToChar(ReplyContentTextBox.Value);
                    adviceReply.Suggest    = ToAdviceTextBox.Text;
                    adviceReply.UserID     = AccountID;
                    adviceReply.CreateDate = DateTime.Now;
                    adviceReply.Updated    = DateTime.Now;

                    //增加回复数
                    a.ReplyCount += 1;
                }

                //更新反馈信息
                a.Updated      = DateTime.Now;
                a.ToHandleTime = DateTime.Now;
                if (UserIDTextBox.Text.Trim() != "")
                {
                    a.ToOtherHandleUserID = UserIDTextBox.Text.ToString();
                }
                else
                {
                    a.ToOtherHandleUserID = AccountID;
                }
                a.State = (int)state;

                //处理反馈进度
                Advice     oldAdvice = AdviceHelper.GetAdvice(AdviceID);
                Processing ap        = ProcessHelper.GetAdviceProcess(oldAdvice);
                ap.UpdateDate       = DateTime.Now;
                ap.ProcessAccountID = AccountID;
                ap.ApproveName      = AccountHelper.GetAccount(AccountID, new string[] { "LastName" }).LastName;
                ap.ProcessDirection = direction.ToString();
                ap.Remark           = ToAdviceTextBox.Text;
                if (state == AdviceState.WaitHandle)
                {
                    a.ProcessState = ((int)state).ToString();
                    string myText   = "请 {0} 办理一下反馈“{1}”。";
                    string userName = AccountHelper.GetAccount(UserIDTextBox.Text, new string[] { "LastName" }).LastName;
                    ap.Remark = string.Format(myText, userName, a.Title) + "<br>" + ap.Remark;
                }
                switch (state)
                {
                case AdviceState.All:
                    break;

                case AdviceState.WaitAccept:
                case AdviceState.WaitHandle:
                case AdviceState.Finished:
                    break;

                case AdviceState.Checking:
                    int auditLevel = 0;
                    if (We7Helper.IsNumber(a.ProcessState))
                    {
                        auditLevel = int.Parse(a.ProcessState);
                    }
                    if (auditLevel < 0)
                    {
                        auditLevel = 0;
                    }
                    auditLevel += 1;
                    if (auditLevel > adviceType.FlowSeries)
                    {
                        a.ProcessState = ((int)AdviceState.Finished).ToString();
                        a.State        = (int)AdviceState.Finished;
                        a.MustHandle   = 0;
                    }
                    else
                    {
                        a.ProcessState = auditLevel.ToString();
                    }
                    break;

                default:
                    break;
                }
                ap.CurLayerNO  = a.ProcessState;
                ap.AdviceState = (AdviceState)a.State;

                AdviceHelper.OperationAdviceInfo(adviceReply, oldAdvice, ap);
                if (state == AdviceState.WaitHandle)
                {
                    AdviceHelper.UpdateAdvice(a, new string[] { "ToHandleTime", "ToOtherHandleUserID" });
                }

                if (state == AdviceState.Finished)
                {
                    AdviceEmailConfigs    adviceEmailConfigs = new AdviceEmailConfigs();
                    AdviceEmailConfigInfo info = adviceEmailConfigs["ReplyUser"];
                    AdviceHelper.SendResultMailToAdvicer(a, adviceReply, adviceType, info);
                }
                return(true);
            }
            catch (Exception ex)
            {
                Messages.ShowError(" 信息操作失败!原因:" + ex.Message);
                return(false);
            }
        }
Exemplo n.º 4
0
 protected bool OperationInfo(AdviceState state)
 {
     return(OperationInfo(state, "1", false));
 }