Beispiel #1
0
        public JsonResult Courier_Insert(AddCourierRequest request)
        {
            GeneralResponse response = new GeneralResponse();

            EmployeeView employee = GetEmployee();

            #region Access Check

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

            #endregion



            response = _courierService.AddCourier(request, employee.ID);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
 public int Create(TblCourier courier)
 {
     return(_courierService.AddCourier(courier));
 }