Пример #1
0
        public ActionResult AddEditExpense(int expenseId, string expenseNameEn, string expenseNameAr)
        {
            #region Check Rights
            bool hasRights = false;
            if (expenseId == 0)
            {
                hasRights = AdminHelper.CheckUserAction(ScreenEnum.ExpensesLibrary, ActionEnum.Add);
            }
            else
            {
                hasRights = AdminHelper.CheckUserAction(ScreenEnum.ExpensesLibrary, ActionEnum.Edit);
            }
            if (!hasRights)
            {
                return(Json("You are UnAuthorized to do this action"));
            }

            #endregion
            return(Json(LibraryCommonHelper.AddEditExpense(expenseId, expenseNameEn, expenseNameAr)));
        }