示例#1
0
        public ActionResult AddEditContainerType(int containerTypeId, string containerTypeName, string maxCBM, string maxWeight)
        {
            #region Check Rights
            bool hasRights = false;
            if (containerTypeId == 0)
            {
                hasRights = AdminHelper.CheckUserAction(ScreenEnum.ContainersTypes, ActionEnum.Add);
            }
            else
            {
                hasRights = AdminHelper.CheckUserAction(ScreenEnum.ContainersTypes, ActionEnum.Edit);
            }
            if (!hasRights)
            {
                return(Json("You are UnAuthorized to do this action"));
            }

            #endregion
            return(Json(LibraryCommonHelper.AddEditContainerType(containerTypeId, containerTypeName, maxCBM, maxWeight)));
        }