/// <summary> /// Eduardo Colon /// Created: 2019/03/20 /// /// constructor to create shuttleReservation with one parameter. /// </summary> public ShuttleReservationDetail(IShuttleReservationManager shuttleReservationManager = null, IEmployeeManager employeeManager = null, IGuestManager guestManager = null) { if (shuttleReservationManager == null) { shuttleReservationManager = new ShuttleReservationManager(); } if (employeeManager == null) { employeeManager = new EmployeeManager(); } if (guestManager == null) { guestManager = new GuestManager(); } _shuttleReservationManager = shuttleReservationManager; _employeeManager = employeeManager; _guestManager = guestManager; _isUpdate = false; InitializeComponent(); btnDropoffSubmit.Visibility = Visibility.Collapsed; }
public UserAppService( IRepository <File, Guid> fileRepository, IRepository <User, long> userRepository, IRepository <Invitation, Guid> invitationRepository, IRepository <FriendPair, long> friendPairRepository, IGuestManager guestManager, ICacheManager cacheManager) { _fileRepository = fileRepository; _userRepository = userRepository; _invitationRepository = invitationRepository; _friendPairRepository = friendPairRepository; _guestManager = guestManager; _cacheManager = cacheManager; }
public AnalysisAppService( IRepository <RouteHistory, long> routeHistoryRepository, IRepository <LocationHistory, long> locationHistoryRepository, IRepository <FriendPair, long> friendPairRepository, IRepository <User, long> userRepository, IGuestManager guestManager, IRouteHistoryManager routeHistoryManager, ILocationHistoryManager locationHistoryManager) { _routeHistoryRepository = routeHistoryRepository; _locationHistoryRepository = locationHistoryRepository; _friendPairRepository = friendPairRepository; _userRepository = userRepository; _guestManager = guestManager; _routeHistoryManager = routeHistoryManager; _locationHistoryManager = locationHistoryManager; }
/// <summary> /// Eduardo Colon /// Created: 2019/03/10 /// /// constructor to create shuttleReservation with three parameters. /// </summary> public ShuttleReservationDetail(ShuttleReservation selectedShuttleReservation, IShuttleReservationManager shuttleReservationManager = null, IEmployeeManager employeeManager = null, IGuestManager guestManager = null) { _selectedShuttleReservation = selectedShuttleReservation; if (shuttleReservationManager == null) { shuttleReservationManager = new ShuttleReservationManager(); } if (employeeManager == null) { employeeManager = new EmployeeManager(); } if (guestManager == null) { guestManager = new GuestManager(); } _shuttleReservationManager = shuttleReservationManager; _employeeManager = employeeManager; _guestManager = guestManager; InitializeComponent(); txtPickupLocation.Text = _selectedShuttleReservation.PickupLocation; txtDropoffDestination.Text = _selectedShuttleReservation.DropoffDestination; this.Title = "Update Shuttle Reservatiion"; cboGuestLast.IsEnabled = false; cboGuestFirst.IsEnabled = false; cboGuestPhoneNumber.IsEnabled = false; cboEmployeeLast.IsEnabled = false; cboEmployeeFirst.IsEnabled = false; if (_selectedShuttleReservation.DropoffDateTime != null) { btnDropoffSubmit.IsEnabled = false; } _isUpdate = true; }
/// <summary> /// Eduardo Colon /// Created: 2019/04/23 /// /// constructor to create walkinappointment with three parameters. /// </summary> public WalkInAppointmentDetail(IGuestManager guestManager = null, IAppointmentManager appointmentManager = null, IAppointmentTypeManager appointmentTypeManager = null) { InitializeComponent(); _appointmentManager = appointmentManager; _appointmentTypeManager = appointmentTypeManager; _guestManager = guestManager; if (_appointmentManager == null) { _appointmentManager = new AppointmentManager(); } if (_appointmentTypeManager == null) { _appointmentTypeManager = new AppointmentTypeManager(); } if (_guestManager == null) { _guestManager = new GuestManager(); } try { _guests = _guestManager.ReadAllGuests(); cboAppointmentTypes.ItemsSource = _appointmentTypeManager.RetrieveAllAppointmentTypes(); } catch (Exception ex) { MessageBox.Show(ex.Message + Environment.NewLine + ex.StackTrace); } cboEmail.ItemsSource = _guests.Select(g => g.Email); cboFirstName.ItemsSource = _guests.Select(g => g.FirstName); cboLastName.ItemsSource = _guests.Select(g => g.LastName); dtpikStart.SelectedDate = DateTime.Now; dtpikStart.DisplayDateStart = DateTime.Now; dtpikStart.DisplayDateEnd = DateTime.Now.AddDays(14); dtpikEnd.DisplayDateStart = DateTime.Now; dtpikEnd.DisplayDateEnd = DateTime.Now.AddDays(28); }
public GuestController(IGuestManager manager) { _manager = manager; }
/// <summary> /// Initializes a new instance of the <see cref="GuestsController"/> class. /// </summary> /// <param name="guestManager">The guest manager.</param> public GuestsController(IGuestManager guestManager) { this.guestManager = guestManager; }
public async Task <ActionResult> Register(RegisterViewModel model) { /// <summary> /// Author: Austin Berquam /// Created On: 04/12/2019 /// </summary> if (ModelState.IsValid) { try { //Creates the member _memberManager = new MemberManagerMSSQL(); Member newMember = new Member( fName: model.FirstName, lName: model.LastName, mail: model.Email, number: model.PhoneNumber ); _memberManager.CreateMember(newMember); int memberID = 0; memberID = _memberManager.RetrieveMemberByEmail(model.Email); _memberTabManager.CreateMemberTab(memberID); //Creates the guest _guestManager = new GuestManager(); Guest newGuest = new Guest( memberID: memberID, fName: model.FirstName, lName: model.LastName, mail: model.Email, phoneNumber: model.PhoneNumber, emergencyFName: model.EmergencyFirstName, emergencyLName: model.EmergencyLastName, emergencyPhone: model.EmergencyPhoneNumber, emergencyRelation: model.Relation, texts: model.RecieveTexts ); _guestManager.CreateGuest(newGuest); } catch (Exception up) { throw up; } var user = new ApplicationUser { UserName = model.Email, Email = model.Email, PhoneNumber = model.PhoneNumber, FirstName = model.FirstName, LastName = model.LastName }; var result = await UserManager.CreateAsync(user, model.Password); if (result.Succeeded) { await SignInManager.SignInAsync(user, isPersistent : false, rememberBrowser : false); // For more information on how to enable account confirmation and password reset please visit https://go.microsoft.com/fwlink/?LinkID=320771 // Send an email with this link // string code = await UserManager.GenerateEmailConfirmationTokenAsync(user.Id); // var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Request.Url.Scheme); // await UserManager.SendEmailAsync(user.Id, "Confirm your account", "Please confirm your account by clicking <a href=\"" + callbackUrl + "\">here</a>"); return(RedirectToAction("Index", "Home")); } AddErrors(result); } // If we got this far, something failed, redisplay form return(View(model)); }
public VenueController(IGuestManager guestManager) { _GuestManager = guestManager; }
/// <summary> /// Initializes a new instance of the <see cref="GuestManagerTests"/> class. /// </summary> public GuestManagerTests() { this.guestData = new Mock<IGuestData>(); this.guestManager = new GuestManager(this.guestData.Object); }
public RSVPController(IGuestManager guestManager) { _GuestManager = guestManager; }