Beispiel #1
0
        public ActionResult CheckUser()
        {
            string    username = Request.Form["txtUserName"];
            string    password = Request.Form["txtUserPassword"];
            DataTable dt       = _objUserMaster.CheckUser(username, password);

            if (dt.Rows.Count == 1)
            {
                ClsGlobal.LoginUserCode         = dt.Rows[0]["UserCode"].ToString();
                ClsGlobalSession._LoginUserCode = dt.Rows[0]["UserCode"].ToString();
                ClsGlobalSession._LoginUserName = username;
                ClsGlobalSession._CustomerCode  = dt.Rows[0]["LedgerId"].ToString();
                ClsGlobalSession._UserType      = dt.Rows[0]["UserType"].ToString();

                //TempData["LoginAddress"] = Request.Form["txtLoginAddress"];
                //TempData["IPAddress"] = Request.Form["txtIPAddress"];
                //TempData["NetworkName"] = Request.Form["txtNetworkName"];
                //TempData["Latitude"] = Request.Form["txtLatitude"];
                //TempData["Longitude"] = Request.Form["txtLongitude"];

                return(RedirectToAction("Index", "Selection"));
            }
            else
            {
                ViewData["msg"] = "Invalid User Name Or Password";
            }

            return(PartialView("Index"));
        }