public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; if (context.Request["id"] != null) { context.Response.Write(JsonConvert.SerializeObject(StoreHouseManager.StoreHouseID(Convert.ToInt32(context.Request["id"])))); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; int index = Convert.ToInt32(context.Request["rows"]); int rows = Convert.ToInt32(context.Request["page"]); context.Response.Write("{\"total\":" + StoreHouseManager.StoreHousezong() + ",\"rows\":" + JsonConvert.SerializeObject(StoreHouseManager.StoreHouseALL(index, rows)) + "}"); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; if (context.Request["id"] != null) { context.Response.Write(StoreHouseManager.StoreHouseDelete(Convert.ToInt32(context.Request["id"])) > 0); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; if (context.Request["housename"] != null) { StoreHouse s = new StoreHouse(); s.HouseID = Convert.ToInt32(context.Request["houseid"]); s.HouseName = context.Request["housename"]; s.Description = context.Request["Description"]; context.Response.Write(StoreHouseManager.StoreHouseUpdate(s) > 0); } }
protected void Unnamed1_Click(object sender, EventArgs e) { if (this.TextBox1.Text != "") { StoreHouse s = new StoreHouse(); s.HouseName = this.TextBox1.Text; s.Description = this.TextBox2.Text; int rows = StoreHouseManager.StoreHouseInsert(s); if (rows > 0) { Response.Write("<script>alert('添加成功!');</script>"); this.TextBox1.Text = ""; this.TextBox2.Text = ""; } else { Response.Write("<script>alert('添加失败!');</script>"); } } else { Response.Write("<script>alert('库房名称不能为空!');</script>"); } }