public PartialViewResult PlatformConfigPV() { SetupModels.PlatformConfig conf = new SetupModels.PlatformConfig(); try { UnitOfWork_Repositories uof_repos = new UnitOfWork_Repositories(); conf = uof_repos.repoDynSettings.GetSetupPlatformConfig(); ViewBag.TimeZone = new SelectList(StaticMenus.GetRegionalTimeOptions(), conf.TimeZone); } catch { ViewBag.TimeZone = new SelectList(StaticMenus.GetRegionalTimeOptions(), 0); } return(PartialView("_Config", conf)); }
public SetupModels.PlatformConfig GetSetupPlatformConfig() { SetupModels.PlatformConfig conf = new SetupModels.PlatformConfig(); DynSetting con = new DynSetting(); List <DynSetting> cons = db.DynSettings.Where(l => l.ID == 1).ToList(); if (cons.Count == 1) { con = cons[0]; conf.Title = con.PlatformTitle; conf.DevelopmentMode = con.DevelopmentMode; conf.PublicAccess = con.PublicAccess; conf.PublicSignUp = con.PublicSignUP; conf.TimeZone = con.App_TimeZone; } else { throw new Exception("Not Found"); } return(conf); }