Ejemplo n.º 1
0
        public JsonResult Stores_Insert(IEnumerable <AddStoreRequest> requests)
        {
            GeneralResponse response = new GeneralResponse();

            #region Access Check

            bool hasPermission = GetEmployee().IsGuaranteed("Store_Insert");
            if (!hasPermission)
            {
                response.ErrorMessages.Add("AccessDenied");
                return(Json(response, JsonRequestBehavior.AllowGet));
            }

            #endregion

            response = _storeService.AddStores(requests, GetEmployee().ID);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }