public ActionResult RegisterUser() { _usrAccBAL = new UserAccount(); AppDamnModels.UserAccViewModel modelObj = new UserAccViewModel(); modelObj.ProfList = _usrAccBAL.GetProfessionInfo().ToList(); return(View(modelObj)); }
public ActionResult RegisterUser(UserAccViewModel model) { ViewBag.Message = "Your contact page."; UserAccViewModel userModel = new UserAccViewModel(); _usrAccBAL.CreateUserAccount(model); return(View(model)); }
public async Task <IActionResult> AddUser(UserAccViewModel input) { if (!this.ModelState.IsValid) { return(this.View(input)); } string uniqueFileName = null; if (input.Photo != null) { string uploadsFolder = Path.Combine(this.hostingEnviroment.WebRootPath, "images"); uniqueFileName = Guid.NewGuid().ToString() + "_" + input.Photo.FileName; var filePath = Path.Combine(uploadsFolder, uniqueFileName); input.Photo.CopyTo(new FileStream(filePath, FileMode.Create)); var addUser = await this.addService.AddAsync( input.Email, input.Name, input.City, input.Specialty, uniqueFileName ); } else { string filePath = null; var addUser = await this.addService.AddAsync( input.Email, input.Name, input.City, input.Specialty, uniqueFileName ); } return(this.RedirectToAction("AddUser")); }
public int CreateUserAccount(UserAccViewModel model) { int result = 0; return(result); }
public IActionResult AddUser() { var addViewModel = new UserAccViewModel(); return(this.View(addViewModel)); }