public async Task <IActionResult> Register(Customer customer) { if (ModelState.IsValid) { _mahjongDBContext.Add(customer); await _mahjongDBContext.SaveChangesAsync(); ViewBag.JavaScriptFunction = "Showsuccess()"; ModelState.Clear(); } return(View()); }
public async Task <IActionResult> Addmember(AdminStore adminStore) { if (ModelState.IsValid) { _mahjongDBContext.AdminStore.Add(adminStore); await _mahjongDBContext.SaveChangesAsync(); ModelState.Clear(); ViewBag.JavaScriptFunction = true; ViewBag.RasId = new SelectList(_mahjongDBContext.RightAdminStore, "RasId", "RasDetail"); ViewBag.SId = HttpContext.Session.GetString("Store_sid"); } return(View()); }