public ActionResult Login(string returnUrl) { List <smIndustry> newlist = _manageContentService.GetCategories(); // string url = Request.Url.AbsoluteUri; // string [] urlarray=url.Split('/'); // string suburl=urlarray[3]; ViewBag.IndustryName = new SelectList(newlist, "IndustryId", "IndustryName"); if (ModelState.IsValid) { ModelState.Clear(); } ViewBag.ReturnUrl = returnUrl; LoginViewModel eTracLogin = new LoginViewModel(); if (Request.Cookies["LoginCookie"] != null) { try { eTracLogin.UserName = Request.Cookies["LoginCookie"]["UserName"]; eTracLogin.Password = Request.Cookies["LoginCookie"]["pwd"]; //Cryptography.GetDecryptedData(Request.Cookies["LoginCookie"]["pwd"], true); ; eTracLogin.IndustryId = Convert.ToInt32(Request.Cookies["LoginCookie"]["IndustryId"]); eTracLogin.RememberMe = true; // eTracLogin.user = suburl; return(View(eTracLogin)); } catch { return(View()); } } else { return(View()); } }
/// <summary> /// Get catgeories list /// </summary> /// <param name="id"></param> /// <param name="deletedByUserId"></param> /// <returns></returns> public List <smIndustry> GetCategories() { return(_manageContentService.GetCategories()); }