Example #1
0
        public JsonResult DeleteMachine(DeleteExpenseVM vm)
        {
            try
            {
                Expense expense = _es.GetById(vm.Id);
                expense.IsActive   = false;
                expense.Modified   = DateTime.Now;
                expense.ModifiedBy = SessionManager.ActiveUser.Id;

                _es.Update(expense);

                return(Json(new { Result = true }));
            }
            catch (Exception ex)
            {
                return(Json(new { Result = false, ex.Message }));
            }
        }
Example #2
0
        public JsonResult DeletePersonnel(DeleteExpenseVM vm)
        {
            try
            {
                Expense personnel = _es.GetById(vm.Id);
                personnel.IsActive   = false;
                personnel.Modified   = DateTime.Now;
                personnel.ModifiedBy = SessionManager.ActiveUser.Id;

                _es.Update(personnel);

                return(Json(new { Result = true }));
            }
            catch (Exception ex)
            {
                return(Json(new { Result = false, ex.Message }));
            }
        }