public ActionResult CreateInterview(AppointmentLocationVM appointmentLocationVM) { if (ModelState.IsValid) { try { Location location = new Location() { LocationID = appointmentLocationVM.LocationID, Name = appointmentLocationVM.LocationName, Address1 = appointmentLocationVM.LocationAddress1, Address2 = appointmentLocationVM.LocationAddress2, City = appointmentLocationVM.LocationCity, State = appointmentLocationVM.LocationState, Zip = appointmentLocationVM.LocationZip }; _locationManager.AddLocation(location); Appointment appointment = new Appointment() { AppointmentID = appointmentLocationVM.AppointmentID, AdoptionApplicationID = appointmentLocationVM.AdoptionApplicationID, AppointmentTypeID = "Interview", DateTime = appointmentLocationVM.DateTime, LocationID = appointmentLocationVM.LocationID }; _appointmentManager.AddAppointment(appointment); return(RedirectToAction("Index")); } catch { return(View()); } } return(View()); }
public string AddUser(Appointment model) { return(_appointmentManager.AddAppointment(model).Message); }