示例#1
0
        protected void btnAdd_OnClick(object sender, EventArgs e)
        {
            var sto = new store();

            sto.stno      = Request.Form["stno"].ToString();
            sto.address   = Request.Form["address"].ToString();
            sto.telephone = Request.Form["telephone"].ToString();
            sto.capacity  = Convert.ToInt16(Request.Form["capacity"]);
            int number = bllsto.Insert(sto);

            if (number > 0)
            {
                Response.Write("<script>alert('添加成功');window.location.href='StoreList.aspx';</script>");
            }
            else
            {
                Response.Write("<script>alter('添加失败');</script>");
            }
        }
示例#2
0
        protected void btnAdd_OnClick(object sender, EventArgs e)
        {
            Store store = new Store();

            store.stno      = Request.Form["stno"].ToString();
            store.address   = Request.Form["address"].ToString();
            store.telephone = Request.Form["telephone"].ToString();
            store.capacity  = int.Parse(Request.Form["capacity"].ToString());
            int number = storeBLL.Insert(store);

            if (number > 0)
            {
                Response.Write("<script>alert('仓库添加成功');window.location.href='StoreList.aspx';</script>");
            }
            else
            {
                Response.Write("<script>alert('仓库添加失败');</script>");
            }
        }