public ActionResult RegisterBuyer(Buyer bu)
 {
     try
     {
         Context.Add(bu);
         Context.SaveChanges();
         ViewBag.meassage = bu.Bname + " " + "Registration Success";
     }
     catch (Exception e)
     {
         ViewBag.message = bu.Bname + " " + "Registration Failed";
     }
     return(RedirectToAction("Login"));
 }
Example #2
0
 public IActionResult RegisterUser(Buyer b)
 {
     try
     {
         _context.Add(b);
         _context.SaveChanges();
         ViewBag.message = b.Name + "Successfully registerd";
     }
     catch (Exception e)
     {
         ViewBag.message = b.Name + "Faied to register";
     }
     return(RedirectToAction("Login"));
 }
 public ActionResult B_SignUp(Buyer b)
 {
     try
     {
         _context1.Add(b);
         _context1.SaveChanges();
         ViewBag.message = b.b_name + " Has got successfully Registered";
         return(View());
     }
     catch (Exception e)
     {
         ViewBag.message = b.b_name + " Registration Failed";
         return(View());
     }
 }
Example #4
0
 public ActionResult RegisterBuyer(Buyer buyer)
 {
     try
     {
         _context.Add(buyer);
         _context.SaveChanges();
         ViewBag.message = buyer.Name + "\thas got successfull";
         return(View("Login"));
     }
     catch (Exception e)
     {
         ViewBag.message = buyer.Name + "\tfailed";
     }
     return(View());
 }
 public ActionResult BuyerRegister(Buyer buy)
 {
     try
     {
         _context.Add(buy);
         _context.SaveChanges();
         ViewBag.message = buy.Name + "  registration successful";
         return(View());
     }
     catch (Exception e)
     {
         ViewBag.message = buy.Name + "  registration failed ";
         return(View());
     }
 }
Example #6
0
 public ActionResult RegisterBuyer(Buyer b)
 {
     try
     {
         _context.Add(b);
         _context.SaveChanges();
         ViewBag.message = b.Username + "has got successfully registered";
         return(RedirectToAction("BuyerLogin"));
     }
     catch (Exception e)
     {
         ViewBag.message = b.Username + "Registration failed ";
         return(View());
     }
 }
 public ActionResult Register(Buyer Buy)
 {
     try
     {
         _Context.Add(Buy);
         _Context.SaveChanges();
         ViewBag.message = "Hi " + Buy.BUname + "\n You are Successfully Registered.";
         //return RedirectToAction("Login");
         return(View());
     }
     catch (Exception e)
     {
         ViewBag.message = "Sorry " + Buy.BUname + "\n You are Not Successfully Registered.\n try again after Sometime.";
         return(View());
     }
 }
Example #8
0
 public void BuyerRegister(Buyer buyer)
 {
     _context.Add(buyer);
     _context.SaveChanges();
 }