public ActionResult Login() { //var version = typeof(Controller).Assembly.GetName().Version; ViewBag.Branch = entity.BranchMasters.ToList(); ViewBag.fyears = entity.AcFinancialYearSelect(Convert.ToInt32(Session["branchid"])).ToList(); // Session["fyearid"] = 1; if (Session["UserID"] == null) { if (Request.QueryString["ID"] != null) { if (Request.QueryString["ID"] == "1") { ViewBag.Message = "Your session has been expired!. please login again."; } } } else { return(RedirectToAction("Home", "Home")); } return(View()); }
public ActionResult Home() { ViewBag.Message = ""; var Query = (from t in entity.Menus where t.IsAccountMenu.Value == false orderby t.MenuOrder select t).ToList(); var jobdetails = (from t in entity.GETLOCALCostForDashboard(Convert.ToInt32(Session["fyearid"].ToString())) select t).ToList(); if (jobdetails != null) { ViewBag.jobcostdetails = jobdetails; } var CostUpdation = (from t in entity.SPGetAllLocalCurrencyCostUpdation(Convert.ToInt32(Session["fyearid"].ToString())) select t).ToList(); if (CostUpdation != null) { ViewBag.CostUpdationDetails = CostUpdation; } var CustomerReciept = (from t in entity.SPGetAllLocalCurrencyCustRecievable(Convert.ToInt32(Session["fyearid"].ToString())) select t).ToList(); if (CustomerReciept != null) { ViewBag.custReciavable = CustomerReciept; } var SupplierPayble = (from t in entity.SPGetAllLocalCurrencyPayble(Convert.ToInt32(Session["fyearid"].ToString())) select t).ToList(); if (SupplierPayble != null) { ViewBag.Payble = SupplierPayble; } //Session["Menu"] = Query; var a = entity.AcFinancialYearSelect(Convert.ToInt32(Session["branchid"])).ToList(); ViewBag.AcFyear = a.ToList(); ViewBag.YTDSummaryDetails = GetYTDSummaryDetails(); Session["FinancialyearList"] = a.ToList(); return(View()); }