public ActionResult Create(FormCollection form) { CustomerDto customer = new CustomerDto(); customer.Address = form["address"]; customer.Carddetails = form["carddetais"]; customer.City = form["city"]; customer.Country = form["country"]; customer.Firstname = form["firstname"]; customer.Lastname = form["lastname"]; customer.Phoneno = form["phonenumber"]; customer.State = form["state"]; customer.Username = form["username"]; customer.Password = form["password"]; CustomerServices cs = new CustomerServices(); cs.Savecustomer(customer); return View(); }
public ActionResult Login(FormCollection form) { string cname = form["cname"]; string pwd = form["pwd"]; var result = new CustomerServices().Login(cname, pwd); if (result.CustomerId > 0) { Session["customerId"] = result.CustomerId; return RedirectToAction("CabsList"); } else { ViewBag.Message = "User does not exist"; return View(); } }