public ActionResult UserStatus() { DbContext currentDb = SysContext.GetCurrentDb(); string appName = currentDb.ExecuteScalar <string>("select SettingValue from core_setting where SettingKey = @0", new object[1] { "AppName" }); core_user core_user = currentDb.FirstOrDefault <core_user>("where id = @0", new object[1] { SysContext.FastDevUserID }); if (core_user == null) { return(Json(new { statusCode = "3" })); } return(Json(new { statusCode = "1", data = new { homeStyle = core_user.HomeStyle, realName = core_user.RealName, userName = core_user.LoginName, appName = appName, id = core_user.ID, myPic = core_user.MyPic } })); }
public ActionResult Index(string homestyle) { DbContext currentDb = SysContext.GetCurrentDb(); core_user core_user = currentDb.FirstOrDefault <core_user>("where id = @0", new object[1] { SysContext.FastDevUserID }); if (core_user == null) { return(new RedirectResult("/home/login")); } if (core_user.HomeStyle == "swin" || homestyle == "swin") { return(View("Index_StyleWin")); } //return View(); return(Content(System.IO.File.ReadAllText(Server.MapPath("~/index.html")), "text/html")); }