public ActionResult FinancialEdit() { if (!string.IsNullOrEmpty(Session["username"] as string)) { if (Session["roleid"].ToString() == "1" || Session["roleid"].ToString() == "2") { try { FinancialDataMonthly fd = new FinancialDataMonthly(); Financial financial = fd.GetFinancialData(); return(View(financial)); } catch (Exception ex) { return(View("Error", ex)); } } else { return(View("Accessdenied")); } } else { return(RedirectToAction("Index", "Login")); } }
public string Print() { FinancialDataMonthly fd = new FinancialDataMonthly(); Financial financial = fd.GetFinancialData(); return(new PageOrientations().RenderRazorViewToString(this, "Print", financial)); }
// GET: Financial public ActionResult Index() { if (!string.IsNullOrEmpty(Session["username"] as string)) { try { FinancialDataMonthly fd = new FinancialDataMonthly(); Financial financial = fd.GetFinancialData(); return(View(financial)); } catch (Exception ex) { return(View("Error", ex)); } } else { return(RedirectToAction("Index", "Login")); } }