public IActionResult ScrapIndex() { string userId = _httpContextAccessor.HttpContext.Request.Cookies["UserId"]; GetDashboardMenuResponse response = _mesHomeService.GetDashboardMenu(Convert.ToInt32(userId)); ViewBag.UserName = _httpContextAccessor.HttpContext.Request.Cookies["UserName"]; var baseUrl = $"{this.Request.Scheme}://{this.Request.Host.Value.ToString()}"; string apiUrl = ""; if (baseUrl.Contains("localhost")) { apiUrl = "http://localhost:60445"; } else { apiUrl = "http://192.168.107.11:81"; } ViewBag.UrlPath = apiUrl; if (response != null) { return(View(response)); } else { return(View()); } }
public IActionResult GetDashboardMenu(int UserId) { var response = _mesHomeService.GetDashboardMenu(UserId); if (response.isSuccess == false) { return(null); } return(Ok(response)); }
public IActionResult Index() { string userId = _httpContextAccessor.HttpContext.Request.Cookies["UserId"]; GetDashboardMenuResponse response = _mesHomeService.GetDashboardMenu(Convert.ToInt32(userId)); ViewBag.UserName = _httpContextAccessor.HttpContext.Request.Cookies["UserName"]; ViewBag.UrlPath = Globals.URLPath; if (response != null) { return(View(response)); } else { return(View()); } }