public ActionResult CustReg() { ServiceReference1.CustomerRegistration Re = new ServiceReference1.CustomerRegistration(); ServiceReference1.CS c = new ServiceReference1.CS(); ServiceReference1.Service1Client s = new ServiceReference1.Service1Client(); string[] cy = s.GetCountry(); countries = new List <SelectListItem>(); for (int i = 0; i < cy.Length; i++) { countries.Add(new SelectListItem { Text = cy[i], Value = cy[i] }); } ViewBag.D3 = countries; Session["Country"] = cy; //ServiceReference1.CS S = new ServiceReference1.CS(); //ServiceReference1.Service1Client s1 = new ServiceReference1.Service1Client(); // st= s1.GetState(); //ViewBag.D4 = st; return(View(Re)); }
public static string InsertCustomer(ServiceReference1.CustomerRegistration Cr) { ServiceReference1.Service1Client S = new ServiceReference1.Service1Client(); string s = S.InsertCustomer(Cr); return(s); }
public ActionResult CustReg(ServiceReference1.CustomerRegistration Cr) { ServiceReference1.Service1Client s = new ServiceReference1.Service1Client(); ViewBag.D3 = countries; // ViewBag.D4 = states; ViewBag.msg = DbOperations.InsertCustomer(Cr); return(View()); }
public ActionResult GetLoginC(ServiceReference1.CustomerRegistration V) { //ServiceReference1.CustomerRegistration Re1 = new ServiceReference1.CustomerRegistration(); ServiceReference1.Service1Client s = new ServiceReference1.Service1Client(); ViewBag.D4 = s.Userlogin(V.MobileNo, V.Password); string Username = Request.Form["MobileNo"]; string Password = Request.Form["Password"]; string CustomerId = Request.Form["CustomerId"]; if (ViewBag.D4 != null) { Session["Username"] = ViewBag.D4.MobileNo; Session["CustomerId"] = ViewBag.D4.CustomerId; return(View("CustomerHome")); } else { ViewBag.msg = "Invalid credentials"; return(View("GetLoginC")); } }