protected void GetList_Cancel() { LEANJU.BLL.Orders bll = new LEANJU.BLL.Orders(); int pagesize = int.Parse(Request.Form["rows"].ToString().Trim()); int pageindex = int.Parse(Request.Form["page"].ToString().Trim()); DataGridData dgd = new DataGridData(); dgd.total = bll.GetRecordCount("Ostate='已取消'"); dgd.rows = bll.GetListByPage("Ostate='已取消'", "", (pageindex - 1) * pagesize + 1, pageindex * pagesize); WriteMessage("", ToJson.Dataset2Json(dgd.rows, dgd.total)); }
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"); } }