Exemplo n.º 1
0
        public ActionResult Edit(EditExpenseCategoryModel model)
        {
            if (ModelState.IsValid)
            {
                _repository.Update(model);

                return(RedirectToAction("List"));
            }
            else
            {
                return(View(model));
            }
        }
Exemplo n.º 2
0
        //using for active and deactive expenseCategory
        public void SetStatusExpenseCategory(string id)
        {
            var expenseCategoryToRemove = _expenseCategoryRepository.Get(c => c.CategoryC == id);

            if (expenseCategoryToRemove.IsActive == Constants.ACTIVE)
            {
                expenseCategoryToRemove.IsActive = Constants.DEACTIVE;
            }
            else
            {
                expenseCategoryToRemove.IsActive = Constants.ACTIVE;
            }
            _expenseCategoryRepository.Update(expenseCategoryToRemove);
            SaveExpenseCategory();
        }
Exemplo n.º 3
0
 public void UpdateCategory(ExpenseCategory category, string userId)
 {
     category.AppUserId = userId;
     _expenseCategoryRepository.Update(category);
 }
Exemplo n.º 4
0
 public Task <int> Update(ExpenseCategoryForm form)
 {
     return(_expensecategoryRepository.Update(form));
 }