public ActionResult GetLogin(Register d, Login r) { using (simpleEntities _LoginEntities = new simpleEntities()) { var user = _LoginEntities.Registers.Where(u => u.Email.Equals(d.Email) && u.Password.Equals(d.Password)).FirstOrDefault(); string message = "User already logged in"; //List<Login> abc = new List<Login>(); //bool aa = false; //var user1 = _LoginEntities.Logins.Where(u => u.LogID.Equals(user.ID) && u.Status==(false)).FirstOrDefault(); if (user != null) { //SELECT * // FROM Notification n // LEFT OUTER JOIN Acknowledgment a ON a.parent_id = n.id // WHERE (a.parent_id IS NULL OR a.status = @somevalue) List<Login> ddd = new List<Login>(); ddd = (from a in db.Logins where a.LogID == user.ID where (a.Status == (false)) select a).ToList(); if (ddd!=null) { Session["ID"] = user.ID.ToString(); Session["Email"] = user.Email.ToString(); Session["Username"] = user.Fname.ToString() + "" + user.Lname.ToString(); return RedirectToAction("UserDashBoard"); } else { return Json(message, JsonRequestBehavior.AllowGet); } } return View(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)