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)); }
public int Create(TblCourier courier) { return(_courierService.AddCourier(courier)); }