private void BindTalkContent(string fromNick, string toNick, DateTime start, DateTime end) { List <TalkContent> list = talkDal.GetAllContentByFromId(fromNick, toNick, start, end); Rpt_TalkList.DataSource = list; Rpt_TalkList.DataBind(); }
protected void ShowTalk(object sender, EventArgs e) { if (ViewState["nick"] == null) { Page.RegisterStartupScript("error", "<script>alert('请选择左边的客服!');</script>"); return; } if (string.IsNullOrEmpty(ViewState["nick"].ToString())) { return; } LinkButton lb = (LinkButton)sender; string tnick = lb.Text; List <TalkContent> list = talkDal.GetAllContentByFromId(ViewState["nick"].ToString(), tnick, DateTime.Parse(ViewState["start"].ToString()), DateTime.Parse(ViewState["end"].ToString())); Rpt_TalkList.DataSource = list; Rpt_TalkList.DataBind(); }