コード例 #1
0
        public string Print()
        {
            HomeDataMonthly hd   = new HomeDataMonthly();
            Home            home = hd.GetHomeData();
            string          s    = new PageOrientations().RenderRazorViewToString(this, "Print", home);

            return(s);
        }
コード例 #2
0
 public ActionResult IndexEdit()
 {
     if (!string.IsNullOrEmpty(Session["username"] as string))
     {
         try
         {
             HomeDataMonthly hd   = new HomeDataMonthly();
             Home            home = hd.GetHomeData();
             return(View("IndexEdit", home));
         }
         catch (Exception ex)
         {
             return(View("Error", ex));
         }
     }
     else
     {
         return(RedirectToAction("Index", "Login"));
     }
 }
コード例 #3
0
 public ActionResult IndexEdit(Home home)
 {
     if (!string.IsNullOrEmpty(Session["username"] as string))
     {
         try
         {
             home.quarter = string.IsNullOrEmpty(home.quarter) ? string.Empty : home.quarter;
             HomeDataMonthly hd = new HomeDataMonthly();
             hd.UpdateHomeData(home);
             return(RedirectToAction("Index"));
         }
         catch (Exception ex)
         {
             return(View("Error", ex));
         }
     }
     else
     {
         return(RedirectToAction("Index", "Login"));
     }
 }