public ActionResult Index() { ViewBag.TableData = GetTableData(); if (System.Web.HttpContext.Current != null) { string name = System.Web.HttpContext.Current.User.Identity.Name; HipChatLoginService service = new HipChatLoginService(); var userInfo = service.GetUser(name); ViewBag.CurrentUser = userInfo; } return(View()); }
private HipchatUser HipChatLogin(LoginViewModel login) { var service = new HipChatLoginService(); try { var result = service.Login(login.Username, login.Password); return(result); } catch (Exception ex) { return(null); } }