public string Print()
        {
            HomeDataMonthly hd   = new HomeDataMonthly();
            Home            home = hd.GetHomeData();
            string          s    = new PageOrientations().RenderRazorViewToString(this, "Print", home);

            return(s);
        }
 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"));
     }
 }
 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"));
     }
 }