public IEnumerable <Account> GetLastMonthAccounts() { JsonRepository.JsonMethods rep = new JsonMethods(); var ldate = DateTime.Now.AddMonths(-1); return(rep.GetAccountsBetweenDates(ldate, DateTime.Now)); }
public ActionResult ReportLastMonth() { JsonRepository.JsonMethods rep = new JsonMethods(); var ldate = DateTime.Now.AddMonths(-1); return(View(rep.GetAccountsBetweenDates(ldate, DateTime.Now))); }
public IEnumerable <Account> GetAccountsBetweenDates(string ldate, string rdate) { JsonMethods rep = new JsonMethods(); var lms = ldate.Split('.'); var rms = rdate.Split('.'); return(rep.GetAccountsBetweenDates(new DateTime(Convert.ToInt32(lms[2]), Convert.ToInt32(lms[1]), Convert.ToInt32(lms[0])), new DateTime(Convert.ToInt32(rms[2]), Convert.ToInt32(rms[1]), Convert.ToInt32(rms[0])))); }
public ActionResult Report(DateTime ldate, DateTime rdate) { JsonRepository.JsonMethods rep = new JsonMethods(); ReportViewModel model = new ReportViewModel(); model.Title = "c " + ldate.ToShortDateString() + " по " + rdate.ToShortDateString(); model.Bills = rep.GetAccountsBetweenDates(ldate, rdate); return(View(model)); }