protected void Cancel() { LEANJU.BLL.Orders bll = new LEANJU.BLL.Orders(); LEANJU.Model.Orders model = new LEANJU.Model.Orders(); string id = Convert.ToString(Request.QueryString["id"]); if (bll.GetList(string.Format("Oid='{0}' ", id)).Tables[0].Rows.Count > 0) { model = bll.GetModel(id); model.Ostate = "已取消"; bll.Update(model); WriteMessage("msg", "1"); } else { WriteMessage("msg", "0"); } }
protected void Add() { LEANJU.BLL.Orders bll = new LEANJU.BLL.Orders(); LEANJU.Model.Orders ex = new LEANJU.Model.Orders(); ex.emailorMbl = Convert.ToString(Session["emailorMbl"]); ex.Intime = Convert.ToDateTime(Request.QueryString["Intime"]); ex.Outtime = Convert.ToDateTime(Request.QueryString["Outtime"]); ex.Ostate = Request.QueryString["Ostate"]; ex.Lname = Request.QueryString["Landlord"]; ex.Price = Convert.ToDecimal(Request.QueryString["Price"]); ex.Hno = Request.QueryString["Rno"]; if (bll.Add(ex)) { WriteMessage("result", "1"); } else { WriteMessage("result", "0"); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(LEANJU.Model.Orders model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(LEANJU.Model.Orders model) { return(dal.Add(model)); }