Beispiel #1
0
        //GET: TestGetToken/GetUserInfo
        public async Task <ActionResult> GetList2()
        {
            try
            {
                string        url        = "test/doc-danh-sach2";
                string        user_token = (string)Session["user_token"];
                List <string> ds         = await ApiHeplper <List <string> > .RunGetAsync(url, user_token);

                string s = string.Join(",", ds);
                ViewBag.Values = s;
            }
            catch (Exception ex)
            {
                ViewBag.Err = ex.Message;
            }
            return(View());
        }
Beispiel #2
0
        public async Task <ActionResult> GetUserInfo()
        {
            try
            {
                string        url        = "Account/UserInfo";
                string        user_token = (string)Session["user_token"];
                UserInfoModel userInfo   = await ApiHeplper <UserInfoModel> .RunGetAsync(url, user_token);

                if (userInfo.Email == "*****@*****.**")
                {
                    return(RedirectToAction("Index", "AdminHangHoa"));
                }
                ViewBag.Email = userInfo.Email;
            }
            catch (Exception ex)
            {
                ViewBag.Err = ex.Message;
            }
            return(View());
        }