コード例 #1
0
 public ActionResult GetAjaxHandlerListBarcodes(int quantity)
 {
     try
     {
         var barcodes = _boxAppService.GetListBarcodes(quantity);
         return(Json(new
         {
             aaData = barcodes,
             success = true
         }));
     }
     catch (Exception ex)
     {
         return(Json(CustomExceptionHandler.AjaxException(ex, Response)));
     }
 }
コード例 #2
0
        public ActionResult PostAjaxHandlerCreateBox(string entity)
        {
            try
            {
                JsonSerialize jsonS       = new JsonSerialize();
                var           createBoxVM = jsonS.JsonDeserializeObject <CreateBoxVM>(entity);
                _boxAppService.Add(createBoxVM);

                if (_notificationContext.HasNotifications)
                {
                    return(GetJSONResultNotifications());
                }

                return(GetJSONResultOK());
            }
            catch (Exception ex)
            {
                return(Json(CustomExceptionHandler.AjaxException(ex, Response)));
            }
        }