protected void Page_Load(object sender, EventArgs e) { string sequence = Request.QueryString["seq"]; string userId = Request.QueryString["userId"]; string from = Request.QueryString["from"]; if (!String.IsNullOrEmpty(from)) { //this.btnBack.Visible = false; } this.lblSeq.Text = sequence; this.lblWechatUser.Text = userId; AgentComplainDao agentComplainDao = new ChinaUnion_DataAccess.AgentComplainDao(); AgentComplain agentComplain = agentComplainDao.Get(int.Parse(sequence)); AgentComplainReplyDao agentComplainReplyDao = new AgentComplainReplyDao(); IList<AgentComplainReply> agentComplainReplyList = agentComplainReplyDao.GetList(sequence); if (agentComplain != null) { this.lblUserId.Text = agentComplain.userName; this.lblProcessCode.Text = agentComplain.processCode; this.lblJoinTime.Text = agentComplain.joinTime; this.lblJoinMenu.Text = agentComplain.joinMenu; this.lblComplainContent.Text = agentComplain.content; this.lblBranchCode.Text = agentComplain.processBranchCode; this.lblBranchName.Text = agentComplain.processBranchName; this.lblReplyTime.Text = agentComplain.replyTime; this.lblComment.Text = agentComplain.comment; this.lblReplyHis.Text = "<br>"; foreach (AgentComplainReply agentComplainReply in agentComplainReplyList) { this.lblReplyHis.Text += "【"+agentComplainReply.replyTime + "】" + agentComplainReply.replyContent + "<br>"; } WechatQueryLog wechatQueryLog = new ChinaUnion_BO.WechatQueryLog(); wechatQueryLog.agentName = ""; wechatQueryLog.module = Util.MyConstant.module_Complain; wechatQueryLog.subSystem = "投诉协查"; wechatQueryLog.queryTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); wechatQueryLog.queryString = ""; wechatQueryLog.wechatId = userId; WechatQueryLogDao wechatQueryLogDao = new WechatQueryLogDao(); try { wechatQueryLogDao.Add(wechatQueryLog); } catch { } } else { this.lblType.Text = "记录不存在"; } }
void bindDataToGrid(String condition) { String userId = ""; if (Session["userId"] != null) { userId = this.Session["userId"].ToString(); ; } else { logger.Info("userId=null" ); } logger.Info("userId=" + userId); AgentComplainDao agentComplainDao = new AgentComplainDao(); IList<AgentComplain> complainList = agentComplainDao.GetListByWechatUserId(userId); // this.lblAgentNo.Text = agentNo; this.lblUserId.Text = userId; // int index = 1; DataTable dt = new DataTable(); dt.Columns.Add("seq"); dt.Columns.Add("userId"); dt.Columns.Add("processCode"); dt.Columns.Add("content"); dt.Columns.Add("replyTime"); DataRow row = null; if (complainList != null && complainList.Count > 0) { foreach (AgentComplain agentComplain in complainList) { row = dt.NewRow(); row["seq"] = agentComplain.sequence; row["userId"] = userId; row["processCode"] = agentComplain.processCode; if (!String.IsNullOrEmpty(agentComplain.content) && agentComplain.content.Length > 20) { row["content"] = agentComplain.content.Substring(0,20)+"..."; } else { row["content"] = agentComplain.content; } row["replyTime"] = agentComplain.replyTime; dt.Rows.Add(row); } } else { this.lblMessag.Text = "未找到" + "记录!"; } GridView1.DataSource = dt.DefaultView; GridView1.DataBind(); }