コード例 #1
0
        public ActionResult EditStroage()
        {
            int       sid     = int.Parse(Request.Form["SID"]);
            string    name    = Request.Form["StroageName"].ToString();
            I_Storage storage = new I_Storage();

            storage.StorageID = sid;
            storage.Name      = name;
            if (new I_StorageBLL().Modify(storage, "Name") > 0)
            {
                return(this.JsonResult(Utility.E_JsonResult.OK, "修改仓库成功!", null, null));
            }
            else
            {
                return(this.JsonResult(Utility.E_JsonResult.Error, "修改仓库失败!", null, null));
            }
        }
コード例 #2
0
        public ActionResult AddStroage()
        {
            string    pid     = Request.Form["PID"].ToString();
            int       lCode   = int.Parse(Request.Form["LevelC"]) + 1;
            string    name    = Request.Form["StroageName"].ToString();
            I_Storage storage = new I_Storage();

            storage.ParentStorageID = pid;
            storage.Name            = name;
            storage.LevelCode       = lCode;
            if (new I_StorageBLL().Add(storage) > 0)
            {
                return(this.JsonResult(Utility.E_JsonResult.OK, "新增仓库成功!", null, null));
            }
            else
            {
                return(this.JsonResult(Utility.E_JsonResult.Error, "新增仓库失败!", null, null));
            }
        }