public ActionResult Index() { if (!string.IsNullOrEmpty(Session["username"] as string)) { try { Leasing leasing = new Leasing(); LeasingDataMonthly ld = new LeasingDataMonthly(); leasing.NewTenantOpenings = ld.GetNewTenantOpeningData(); leasing.DeliveredSpaces = ld.GetDelieverdSpaces(); leasing.keyDeals = ld.GetKeyDeals(); leasing.completedRenewals = ld.GetCompletedRenewals(); leasing.hotDeals = ld.GetHotDeals(); leasing.tenantsAtRisks = ld.GetTenantAtRisk(); leasing.tenantClosures = ld.GetTenantClosure(); return(View(leasing)); } catch (Exception ex) { return(View("Error", ex)); } } else { return(RedirectToAction("Index", "Login")); } }
public string Print() { Leasing leasing = new Leasing(); LeasingDataMonthly ld = new LeasingDataMonthly(); leasing.NewTenantOpenings = ld.GetNewTenantOpeningData(); leasing.DeliveredSpaces = ld.GetDelieverdSpaces(); leasing.keyDeals = ld.GetKeyDeals(); leasing.completedRenewals = ld.GetCompletedRenewals(); leasing.hotDeals = ld.GetHotDeals(); leasing.tenantsAtRisks = ld.GetTenantAtRisk(); leasing.tenantClosures = ld.GetTenantClosure(); return(new PageOrientations().RenderRazorViewToString(this, "Print", leasing)); }
public ActionResult TenantsAtRiskEdit() { if (!string.IsNullOrEmpty(Session["username"] as string)) { if (Session["roleid"].ToString() == "1" || Session["roleid"].ToString() == "7") { Leasing leasing = new Leasing(); LeasingDataMonthly ld = new LeasingDataMonthly(); leasing.tenantsAtRisks = ld.GetTenantAtRisk(); return(View(leasing.tenantsAtRisks)); } else { return(View("Accessdenied")); } } else { return(RedirectToAction("Index", "Login")); } }