/// <summary> /// 绑定 /// </summary> public void Bind() { Hi.Model.BD_ShopMessage model = OrderBll.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.lblname.InnerText = model.Name; this.lblphone.InnerText = model.Phone; this.lblremark.InnerText = model.Remark; this.lblread.InnerText = model.IsRead == 0 ? "未读" : "已读"; this.lblDate.InnerText = model.CreateDate.ToString("yyyy-MM-dd"); model.IsRead = 1; model.ID = int.Parse(Request.QueryString["ID"].ToString()); bool bol = new Hi.BLL.BD_ShopMessage().Update(model); }
//删除 protected void btnDelate_Click(object sender, EventArgs e) { try { if (Request.QueryString["ID"] != "") { Hi.Model.BD_ShopMessage model = OrderBll.GetModel(int.Parse(Request.QueryString["ID"].ToString())); model.dr = 1; model.ID = int.Parse(Request.QueryString["ID"].ToString()); bool bol = new Hi.BLL.BD_ShopMessage().Update(model); if (bol) { Response.Redirect("ShopMessage.aspx"); } } } catch (Exception) { Response.Redirect("ShopMessage.aspx"); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Hi.Model.BD_ShopMessage model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Hi.Model.BD_ShopMessage model) { return(dal.Add(model)); }