public void Bind() { int pageCount = 0; int Counts = 0; //每页显示的数据设置 if (this.txtPageSize.Value.ToString() != "") { if (this.txtPageSize.Value.Trim().Length >= 5) { Pager.PageSize = 20; this.txtPageSize.Value = "20"; } else { Pager.PageSize = this.txtPageSize.Value.Trim().ToInt(0); } } List <Hi.Model.SYS_UserMessage> LANewsNotice = new Hi.BLL.SYS_UserMessage().GetList(Pager.PageSize, Pager.CurrentPageIndex, "CreateDate", true, SearchWhere(), out pageCount, out Counts); this.Rpt_Distribute.DataSource = LANewsNotice; this.Rpt_Distribute.DataBind(); Pager.RecordCount = Counts; page = Pager.CurrentPageIndex.ToString(); }
protected void btn_Del(object sender, EventArgs e) { Hi.Model.SYS_UserMessage Message = new Hi.BLL.SYS_UserMessage().GetModel(KeyID); if (Message != null) { Message.dr = 1; if (new Hi.BLL.SYS_UserMessage().Update(Message)) { Response.Redirect("MessageList.aspx"); } } }
public void DataBinds() { if (KeyID != 0) { Hi.Model.SYS_UserMessage Message = new Hi.BLL.SYS_UserMessage().GetModel(KeyID); this.lblUserName.InnerText = Message.UserName; this.lblUserPhone.InnerText = Message.UserPhone; this.lblUserMailQQ.InnerText = Message.UserMailQQ; this.lblUserMessge.InnerText = Message.UserMessge; this.lblCreateDate.InnerText = Convert.ToDateTime(Message.CreateDate).ToString("yyyy-MM-dd HH:mm"); //处理 string strState = ""; if (Message.State == 1) { strState = "已处理"; this.tr1.Visible = true; this.tr2.Visible = false; this.txtRemark.Text = Message.Remark; this.lblModify.InnerText = Convert.ToDateTime(Message.ModifyDate).ToString("yyyy-MM-dd HH:mm"); } else { strState = "未处理"; this.tr2.Visible = true; this.tr1.Visible = false; } this.lblState.InnerText = strState; } else { Response.Write("信息不存在。"); Response.End(); } }
protected void btnAdd_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtRemark.Text.Trim())) { JScript.AlertMsg(this, "处理结果不能为空!"); return; } Hi.Model.SYS_UserMessage Message = null; if (KeyID != 0) { Message = new Hi.BLL.SYS_UserMessage().GetModel(KeyID); Message.State = 1; Message.ModifyDate = DateTime.Now; Message.ModifyUser = UserID; Message.Remark = Common.NoHTML(txtRemark.Text.Trim()); if (new Hi.BLL.SYS_UserMessage().Update(Message)) { Response.Redirect("MessageList.aspx"); } } }
private void Binds() { //待审的企业 List <Hi.Model.BD_Company> l = new Hi.BLL.BD_Company().GetList("id", "isnull(dr,0)=0 and orgid=" + OrgID + " and isenabled=1 and Auditstate<>2" + (this.OrgID == 0 ? "" : " and isnull(orgid,0)=" + this.OrgID), ""); this.lblCompcount.InnerText = l.Count.ToString(); //待处理留言 List <Hi.Model.SYS_UserMessage> l2 = new Hi.BLL.SYS_UserMessage().GetList("id", "isnull(dr,0)=0 and State=0", ""); this.lblMessage.InnerText = l2.Count.ToString(); //前台显示的企业 List <Hi.Model.BD_Company> ll = new Hi.BLL.BD_Company().GetList("id", "Auditstate=2 and orgid=" + OrgID + " and isenabled=1 and ISNULL(dr,0)=0 and FirstShow=1" + (this.OrgID == 0 ? "" : " and isnull(orgid,0)=" + this.OrgID), ""); this.lblShowcount.InnerText = ll.Count.ToString(); //机构 if (OrgID == 0) { } List <Hi.Model.BD_Org> lll = new Hi.BLL.BD_Org().GetList("id", "isenabled=1 and ISNULL(dr,0)=0", ""); this.lblOrgcount.InnerText = lll.Count.ToString(); NewsBind(); // 新闻公告 Bind(); //统计 }