public ActionResult register(RegisterViewModel validmodel) { var Rvm = new RegisterViewModel(); if (ModelState.IsValid) { var result = Rvm.AddUser(validmodel); if (result == 1) { TempData["status"] = "success"; return(RedirectToAction("register")); } else if (result == 2) { ViewBag.Status = "Phone Number"; } else if (result == 3) { ViewBag.Status = "Email Address"; } else { ViewBag.Status = "Username"; } } return(View()); }
private async void LabelSignIn_Click(object sender, EventArgs e) { var cameraForm = new CameraForm(); cameraForm.StartPosition = FormStartPosition.Manual; cameraForm.Location = Location; var registerViewModel = new RegisterViewModel(); await registerViewModel.AddUser("49874f70-b7e4-4d58-9ce4-67aa55dbd281", "34d75fd8 - 3f14 - 4e56 - a878 - e397447bd40b"); signInViewModel.Authenticate("49874f70-b7e4-4d58-9ce4-67aa55dbd281", "34d75fd8 - 3f14 - 4e56 - a878 - e397447bd40b"); cameraForm.Show(); Hide(); }