public ActionResult Index() { if (Functions.NoSession()) { return(RedirectToAction("Login", "Authentication")); } String ID = Functions.GetID(); LogedInEmployee user = Models.DB_Adapters.DB_Functions.GetUserData(); //assign objects obtained above from database in this viewmodel LogedInEmployee viewModel = new LogedInEmployee() { UserInfo = user.UserInfo }; ViewBag.helpMessage = "This Homepage contains your dashboard with general information providing" + " an overview of your data & information.\n" + "In addition, an up to date number of the FRDs available in each list is shown."; return(View(user)); }
public static string GetName() { LogedInEmployee user = (LogedInEmployee)HttpContext.Current.Session["User_Info"]; return(user.UserInfo.Name + " " + user.UserInfo.Surname); }