示例#1
0
 public async Task <JsonResult> Insert()
 {
     try {
         var id     = Guid.NewGuid();
         var bcode  = Request.Form["bcode"];
         var itemID = Guid.Parse(Request.Form["ii"]);
         var sid    = Guid.Parse(Request.Form["sid"]);
         if (IS_ItemStockService.Insert(id, bcode, itemID, sid))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtility.ServerError()));
     } catch { return(Failed(MessageUtility.ServerError())); }
 }
 public async Task <JsonResult> ISInsert()
 {
     try {
         var id     = Guid.Parse(Request.Form["id"]);
         var bcode  = Request.Form["bcode"];
         var iid    = Guid.Parse(Request.Form["iid"]);
         var ssid   = Guid.Parse(Request.Form["ssid"]);
         var dtid   = Guid.Parse(Request.Form["dtid"]);
         var sku    = Request.Form["sku"];
         var serNum = Request.Form["serNum"];
         var icid   = Guid.Parse(Request.Form["icid"]);
         if (IS_ItemStockService.Insert(id, bcode, sku, serNum, iid, ssid, dtid, icid))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedInsert("Stock")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }