protected void Page_Load(object sender, EventArgs e)
        {
            string sequence = Request.QueryString["seq"];
            string from = Request.QueryString["from"];
            if (!String.IsNullOrEmpty(from))
            {
                this.btnBack.Visible = false;
            }

            AgentComplianSuggestionDao agentComplianSuggestionDao = new ChinaUnion_DataAccess.AgentComplianSuggestionDao();
            AgentComplianSuggestion agentComplianSuggestion = agentComplianSuggestionDao.Get(Int32.Parse(sequence));
            if (agentComplianSuggestion != null)
            {
                this.lblType.Text = agentComplianSuggestion.type + "详情";
                this.lblSubject.Text = agentComplianSuggestion.subject;
                this.lblContent.Text = agentComplianSuggestion.content;
                this.lblCreateTime.Text = agentComplianSuggestion.createTime;

                if (String.IsNullOrEmpty(agentComplianSuggestion.replyContent))
                {
                    this.lblIsReply.Text = "尚未回复";
                    this.lblIsReply.ForeColor = System.Drawing.Color.Red;
                }
                else
                {
                    this.lblIsReply.Text = "已回复";
                    this.lblIsReply.ForeColor = System.Drawing.Color.Blue;
                    agentComplianSuggestion.agentReadtime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    agentComplianSuggestionDao.updateReadTime(agentComplianSuggestion);
                }



                this.lblReplyTime.Text = agentComplianSuggestion.replyTime;
                this.lblReplyContent.Text = agentComplianSuggestion.replyContent;


                WechatQueryLog wechatQueryLog = new ChinaUnion_BO.WechatQueryLog();
                wechatQueryLog.agentName = "";
                wechatQueryLog.module = Util.MyConstant.module_Service;
                wechatQueryLog.subSystem = "服务监督";
                wechatQueryLog.queryTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                wechatQueryLog.queryString = agentComplianSuggestion.type;
                wechatQueryLog.wechatId = agentComplianSuggestion.userId;
                WechatQueryLogDao wechatQueryLogDao = new WechatQueryLogDao();
                try
                {
                    wechatQueryLogDao.Add(wechatQueryLog);
                }
                catch
                {
                }
            }
            else
            {
                this.lblType.Text = "记录不存在";
            }
            
        }
Пример #2
0
        private void prepareGrid(String condition, String type,String agentNo)
        {
            this.Cursor = Cursors.WaitCursor;

            AgentComplianSuggestionDao agentComplianSuggestionDao = new ChinaUnion_DataAccess.AgentComplianSuggestionDao();

            IList<AgentComplianSuggestion> agentComplianSuggestionList = null;

            agentComplianSuggestionList = agentComplianSuggestionDao.GetListByKeyword(condition, type, agentNo, "");

          
            this.initControl();
            this.Cursor = Cursors.Default;
        }
Пример #3
0
        private void prepareGrid(String condition, String type,String agentNo)
        {
            this.Cursor = Cursors.WaitCursor;

            AgentComplianSuggestionDao agentComplianSuggestionDao = new ChinaUnion_DataAccess.AgentComplianSuggestionDao();

            IList<AgentComplianSuggestion> agentComplianSuggestionList = null;

            agentComplianSuggestionList = agentComplianSuggestionDao.GetListByKeyword(condition, type, agentNo, "");

            this.dgSuggestion.Rows.Clear();
            dgSuggestion.Columns.Clear();
            dgSuggestion.Columns.Add("序列号", "序列号");
            dgSuggestion.Columns.Add("类型", "类型");
            dgSuggestion.Columns.Add("标题", "标题");
            dgSuggestion.Columns.Add("内容", "内容");
            dgSuggestion.Columns.Add("代理商/门店", "代理商/门店");
            dgSuggestion.Columns.Add("吐槽建议用户", "吐槽建议用户");
            dgSuggestion.Columns.Add("创建时间", "创建时间");
            dgSuggestion.Columns.Add("阅读时间", "阅读时间");
            if (agentComplianSuggestionList != null && agentComplianSuggestionList.Count > 0)
            {

                for (int i = 0; i < agentComplianSuggestionList.Count; i++)
                {
                    dgSuggestion.Rows.Add();
                    DataGridViewRow row = dgSuggestion.Rows[dgSuggestion.RowCount - 1];
                    row.Cells[0].Value = agentComplianSuggestionList[i].sequence;
                    row.Cells[1].Value = agentComplianSuggestionList[i].type;
                    row.Cells[2].Value = agentComplianSuggestionList[i].subject;
                    row.Cells[3].Value = agentComplianSuggestionList[i].content;
                    row.Cells[4].Value = agentComplianSuggestionList[i].agentNo;
                    row.Cells[5].Value = agentComplianSuggestionList[i].userId;
                    row.Cells[6].Value = agentComplianSuggestionList[i].createTime;
                    row.Cells[7].Value = agentComplianSuggestionList[i].agentReadtime;

                }
            }


            dgSuggestion.ColumnHeadersDefaultCellStyle.WrapMode = DataGridViewTriState.False;
            this.dgSuggestion.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.ColumnHeader;
            this.dgSuggestion.AutoResizeColumns();
            this.initControl();
            this.Cursor = Cursors.Default;
        }
Пример #4
0
        private void dgSuggestion_SelectionChanged(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            if (this.dgSuggestion.CurrentRow != null)
            {
                if (this.dgSuggestion[0,this.dgSuggestion.CurrentRow.Index].Value != null)
                {
                    this.initControl();
                   
                  
                    AgentComplianSuggestionDao agentComplianSuggestionDao = new ChinaUnion_DataAccess.AgentComplianSuggestionDao();
                    AgentComplianSuggestion agentComplianSuggestion = agentComplianSuggestionDao.Get(Int32.Parse(this.dgSuggestion[0, this.dgSuggestion.CurrentRow.Index].Value.ToString()));

                    if (agentComplianSuggestion != null)
                    {
                        this.txtSubject.Text = agentComplianSuggestion.subject;
                        this.txtContent.Text = agentComplianSuggestion.content;
                        this.txtSequence.Text = agentComplianSuggestion.sequence.ToString();
                        this.txtType.Text = agentComplianSuggestion.type;
                       

                       
                        this.txtUserId.Text = agentComplianSuggestion.userId;
                        this.txtAgent.Text = agentComplianSuggestion.agentNo;
                        this.txtCreatetime.Text = agentComplianSuggestion.createTime;
                        this.txtReadtime.Text = agentComplianSuggestion.agentReadtime;
                        if (!String.IsNullOrEmpty(this.txtReadtime.Text))
                        {
                            this.txtReadtime.BackColor = Color.Blue;
                        }
                        else
                        {
                            this.txtReadtime.BackColor = Color.Bisque;
                        }
                      

                        this.txtOnwerDepartment.Text = agentComplianSuggestion.ownerDepartment;
                        this.txtOwnerReply.Text = agentComplianSuggestion.ownerReplyContent;
                        this.txtCheckStatus.Text = agentComplianSuggestion.checkStatus;
                        this.txtReplyContent.Text = agentComplianSuggestion.replyContent;

                        

                       // this.dtValidateDate.Value = DateTime.Parse(policy.validateTime);
                        
                    }
                }
            }
            this.Cursor = Cursors.Default;
        }
Пример #5
0
        private void btnSave_Click(object sender, EventArgs e)
        {

            if (String.IsNullOrEmpty(this.txtReplyContent.Text.Trim()))
            {
                MessageBox.Show("请输入回复内容!");
                this.txtSubject.Focus();
                return;
            }


            this.Cursor = Cursors.WaitCursor;
            AgentComplianSuggestionDao agentComplianSuggestionDao = new ChinaUnion_DataAccess.AgentComplianSuggestionDao();
            AgentComplianSuggestion agentComplianSuggestion = new AgentComplianSuggestion();

            agentComplianSuggestion.subject = this.txtSubject.Text;
            agentComplianSuggestion.content = this.txtContent.Text;
            agentComplianSuggestion.sequence = Int32.Parse(this.txtSequence.Text);
            agentComplianSuggestion.type = this.txtType.Text;



            agentComplianSuggestion.userId = this.txtUserId.Text;
            agentComplianSuggestion.agentNo = this.txtAgent.Text;
            agentComplianSuggestion.createTime = this.txtCreatetime.Text;
            agentComplianSuggestion.agentReadtime = this.txtReadtime.Text;



            agentComplianSuggestion.ownerDepartment = this.txtOnwerDepartment.Text;
            agentComplianSuggestion.ownerReplyContent = this.txtOwnerReply.Text;
            agentComplianSuggestion.checkStatus = this.txtCheckStatus.Text;
            agentComplianSuggestion.replyContent = this.txtReplyContent.Text;
            agentComplianSuggestion.replyTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            agentComplianSuggestionDao.update(agentComplianSuggestion);


            WechatAction wechatAction = new WechatAction();
            wechatAction.sendTextMessageToWechat(agentComplianSuggestion.userId, "针对您" + agentComplianSuggestion.type + "的:[" + agentComplianSuggestion.subject + "],反馈如下:\n" + agentComplianSuggestion.replyContent + " \n\n<a href=\"http://112.64.17.80/Wechat/OnlineComplainSuggestionDetail.aspx?seq=" + agentComplianSuggestion.sequence + "&from=OIC\">点击查询详情</a>", Settings.Default.Wechat_Secret, MyConstant.APP_Service_Monitor);



            prepareGrid(this.txtSearchCondition.Text.Trim(), this.cboType.Text, this.txtAgentNoSearch.Text.Trim());

            MessageBox.Show("操作完成");

            this.Cursor = Cursors.Default;
        }
        void bindDataToGrid(String subject, String type, String agentNo,String userId)
        {
            logger.Info("bindDataToGrid=");
            logger.Info("subject=" + subject);
            logger.Info("type=" + type);
            logger.Info("agentNo=" + agentNo);
            AgentComplianSuggestionDao agentComplianSuggestionDao = new ChinaUnion_DataAccess.AgentComplianSuggestionDao();
           
            IList<AgentComplianSuggestion> agentComplianSuggestionList = null;

            agentComplianSuggestionList = agentComplianSuggestionDao.GetListByKeyword("", type, agentNo,userId);
          
            this.lblType.Text = type;
            this.lblAgentNo.Text = agentNo;
            this.lblUserId.Text = userId;
            // int index = 1;
            DataTable dt = new DataTable();
            dt.Columns.Add("seq");
            dt.Columns.Add("createTime");
            dt.Columns.Add("subject");
            //  dt.Columns.Add("content");
            dt.Columns.Add("isReply");

            DataRow row = null;
            if (agentComplianSuggestionList != null && agentComplianSuggestionList.Count>0)
            {
                foreach (AgentComplianSuggestion agentComplianSuggestion in agentComplianSuggestionList)
                {
                    row = dt.NewRow();
                    row["seq"] = agentComplianSuggestion.sequence;
                    row["createTime"] = agentComplianSuggestion.createTime;
                    row["subject"] = agentComplianSuggestion.subject;
                    if (String.IsNullOrEmpty(agentComplianSuggestion.replyContent))
                    {
                        row["isReply"] = "尚未回复";
                    }
                    else
                    {
                        row["isReply"] = "已回复";
                    }

                    dt.Rows.Add(row);
                }
            }
            else
            {
                this.lblMessag.Text = "未找到" + type+"记录!";
            }
            GridView1.DataSource = dt.DefaultView;
            GridView1.DataBind();
        }