コード例 #1
0
 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"));
     }
 }
コード例 #2
0
        public string Print()
        {
            FinancialDataMonthly fd        = new FinancialDataMonthly();
            Financial            financial = fd.GetFinancialData();

            return(new PageOrientations().RenderRazorViewToString(this, "Print", financial));
        }
コード例 #3
0
 // 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"));
     }
 }