コード例 #1
0
 public void ProcessRequest(HttpContext context)
 {
     context.Response.ContentType = "text/plain";
     if (context.Request["id"] != null)
     {
         context.Response.Write(JsonConvert.SerializeObject(StoreHouseDetailManager.StoreHouseDetailID(Convert.ToInt32(context.Request["id"]))));
     }
 }
コード例 #2
0
        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\":" + StoreHouseDetailManager.StoreHouseDetailzong() + ",\"rows\":" + JsonConvert.SerializeObject(StoreHouseDetailManager.StoreHouseDetailALL(index, rows)) + "}");
        }
コード例 #3
0
 public void ProcessRequest(HttpContext context)
 {
     context.Response.ContentType = "text/plain";
     if (context.Request["id"] != null)
     {
         context.Response.Write(StoreHouseDetailManager.StoreHouseDetailDelete(Convert.ToInt32(context.Request["id"])) > 0);
     }
 }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         this.DropDownList1.DataSource     = StoreHouseDetailManager.StoreHouseDetailDrop();
         this.DropDownList1.DataTextField  = "HouseName";
         this.DropDownList1.DataValueField = "HouseID";
         this.DropDownList1.DataBind();
     }
 }
コード例 #5
0
 public void ProcessRequest(HttpContext context)
 {
     context.Response.ContentType = "text/plain";
     if (context.Request["SubareaName"] != null)
     {
         StoreHouseDetail s = new StoreHouseDetail();
         s.ID          = Convert.ToInt32(context.Request["id"]);
         s.HouseID     = Convert.ToInt32(context.Request["houseid"]);
         s.Description = context.Request["Description"];
         s.SubareaName = context.Request["SubareaName"];
         s.State       = context.Request["State"];
         context.Response.Write(StoreHouseDetailManager.StoreHouseDetailUpdate(s) > 0);
     }
 }
コード例 #6
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (this.TextBox1.Text != null)
     {
         StoreHouseDetail s = new StoreHouseDetail();
         s.SubareaName = this.TextBox1.Text;
         s.HouseID     = Convert.ToInt32(this.DropDownList1.SelectedValue);
         s.Description = this.TextBox2.Text;
         //s.State = this.DropDownList2.Text;
         if (this.DropDownList2.Text == "正常")
         {
             s.State = "Y";
         }
         else
         {
             s.State = "N";
         }
         int rows = StoreHouseDetailManager.StoreHouseDetailInsert(s);
         if (rows > 0)
         {
             Response.Write("<script>alert('添加成功!');</script>");
             this.DropDownList1.SelectedIndex = 1;
             this.TextBox1.Text      = "";
             this.TextBox2.Text      = "";
             this.DropDownList2.Text = "正常";
         }
         else
         {
             Response.Write("<script>alert('添加失败!');</script>");
         }
     }
     else
     {
         Response.Write("<script>alert('库区名称不能为空!');</script>");
     }
 }
コード例 #7
0
 public void ProcessRequest(HttpContext context)
 {
     context.Response.ContentType = "text/plain";
     context.Response.Write(JsonConvert.SerializeObject(StoreHouseDetailManager.StoreHouseDetailDrop()));
 }