コード例 #1
0
 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();
 }
コード例 #2
0
 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;
     }
 }