public ActionResult Money()
 {
     using (DBAgent.DBAgent agent = new DBAgent.DBAgent())
     {
         ViewBag.money  = agent.GetFinancialReport(null, null);
         ViewBag.amount = agent.GetAmountOfMoney();
     }
     return(View());
 }
 public ActionResult Money(DateTime?startDate, DateTime?endDate)
 {
     using (DBAgent.DBAgent agent = new DBAgent.DBAgent())
     {
         if (startDate == null)
         {
             startDate = agent.FirstMoneyEntry().AddMinutes(-1);
         }
         if (endDate == null)
         {
             endDate = DateTime.Now.AddMinutes(1);
         }
         ViewBag.money  = agent.GetFinancialReport(startDate, endDate);
         ViewBag.amount = agent.GetAmountOfMoney();
     }
     return(View());
 }