示例#1
0
 public ActionResult ConfirmIncome(long incomeId, DateTime date, long oldevent)
 {
     try
     {
         var old = dataHelper.GetIncomeById(incomeId);
         old.Date          = date;
         old.IncomeReason  = null;
         old.OperationType = null;
         old.Source        = null;
         dataHelper.AddIncome(old, User.Identity.Name);
         dataHelper.DeleteEvent(oldevent);
         return(RedirectToAction("Income"));
     }
     catch (Exception ex)
     {
         logger.ErrorMessage("305", ex);
         return(View("Error", new Error()
         {
             ExDescription = ex.Message
         }));
     }
 }
示例#2
0
 public ActionResult DeleteEvent(long id)
 {
     try
     {
         dataHelper.DeleteEvent(id);
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         logger.ErrorMessage("305", ex);
         return(View("Error", new Error()
         {
             ExDescription = ex.Message
         }));
     }
 }