private PagedList <OutputViewModels> Journals(OutputViewModels model) { var page = new PagedList <OutputViewModels>(); page.Content = OutputBusinessLogic.getInstance().TodaysJournal(model); return(page); }
public ActionResult Index(string Submit, OutputViewModels model) { model.TodaysJournal = Journals(model); ViewBag.AccountList = common.ToSelectList(AccountDetailsBusinessLogic.getInstance().getAccountDetailDDL(), "ID", "NAME", model.Account); ViewBag.BankFacilityList = common.ToSelectList(BankFacilityBusinessLogic.getInstance().getBankFacilityDDL(), "ID", "NAME", model.BankAccount); ViewBag.SortByList = common.ToSelectList(OutputBusinessLogic.getInstance().getSortByDDL(), "ID", "NAME", model.SortBy); if (!String.IsNullOrEmpty(Submit)) { if (Submit.Equals("PDF")) { GeneratePdf(model); } else if (Submit.Equals("Excel")) { GenerateExcel(model); } else if (Submit.Equals("Print")) { } } DateTime?startDate = null, endDate = null; if (!String.IsNullOrEmpty(model.Date)) { startDate = Convert.ToDateTime(model.Date.Split('-')[0].Trim()); endDate = Convert.ToDateTime(model.Date.Split('-')[1].Trim()); } return(View(model)); }
public ActionResult Approved(string id) { if (OutputBusinessLogic.getInstance().Approved(id) == -1) { TempData["Success"] = "submission was successfully approved"; } else { TempData["Error"] = "submission was unsuccessfully approved"; } return(RedirectToAction("Index")); }
public ActionResult Index(string sd, string ed, string acc, string bnk, string srt) { HistoryViewModels model = new HistoryViewModels(); string strDate = DateTime.Now.AddMonths(-1).ToString("MM/dd/yyyy"); string endDate = DateTime.Now.ToString("MM/dd/yyyy"); model.Date = string.Format("{0}{1}", sd == null ? strDate : sd, ed == null ? " - " + endDate : " - " + ed); model.Account = acc == null ? string.Empty : acc; model.BankAccount = bnk == null ? string.Empty : bnk; model.SortBy = srt == null ? string.Empty : srt; model.TodaysJournal = Journals(model); ViewBag.AccountList = common.ToSelectList(AccountDetailsBusinessLogic.getInstance().getAccountDetailDDL(), "ID", "NAME", string.Empty); ViewBag.BankFacilityList = common.ToSelectList(BankFacilityBusinessLogic.getInstance().getBankFacilityDDL(), "ID", "NAME", model.BankAccount); ViewBag.SortByList = common.ToSelectList(OutputBusinessLogic.getInstance().getSortByDDL(), "ID", "NAME", string.Empty); return(View(model)); }
public ActionResult Index(string Submit, HistoryViewModels model) { model.TodaysJournal = Journals(model); ViewBag.AccountList = common.ToSelectList(AccountDetailsBusinessLogic.getInstance().getAccountDetailDDL(), "ID", "NAME", model.Account); ViewBag.BankFacilityList = common.ToSelectList(BankFacilityBusinessLogic.getInstance().getBankFacilityDDL(), "ID", "NAME", model.BankAccount); ViewBag.SortByList = common.ToSelectList(OutputBusinessLogic.getInstance().getSortByDDL(), "ID", "NAME", model.SortBy); if (!String.IsNullOrEmpty(Submit)) { if (Submit.Equals("PDF")) { GeneratePdf(model); } else if (Submit.Equals("Excel")) { GenerateExcel(model); } else if (Submit.Equals("Print")) { } } return(View(model)); }