Exemplo n.º 1
0
        public DeleteAppointmentType(IAppointmentTypeManager appointmentTypeManager = null)
        {
            _appointmentTypeManager = appointmentTypeManager;
            if (_appointmentTypeManager == null)
            {
                _appointmentTypeManager = new AppointmentTypeManager();
            }
            InitializeComponent();
            try
            {
                if (cboAppointmentType.Items.Count == 0)
                {
                    var appointmentTypeID = _appointmentTypeManager.RetrieveAllAppointmentTypes();
                    foreach (var item in appointmentTypeID)
                    {
                        cboAppointmentType.Items.Add(item);
                    }
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + Environment.NewLine + ex.StackTrace);
            }
        }
 public void TestSetup()
 {
     accessor            = new AppointmentTypeAccessorMock();
     appointmenttManager = new AppointmentTypeManager(accessor);
     appointmentTypes    = new List <AppointmentType>();
     appointmentTypes    = appointmenttManager.RetrieveAllAppointmentTypes("all");
 }
        private AppointmentType _newAppointmentType; //for edit and add



        public CreateAppointmentType(IAppointmentTypeManager appointmentTypeManager = null)
        {
            _appointmentTypeManager = appointmentTypeManager;
            if (_appointmentTypeManager == null)
            {
                _appointmentTypeManager = new AppointmentTypeManager();
            }
            InitializeComponent();
            this.Title             = "Add an Appointment Type";
            this.btnCreate.Content = "Create";
        }
        /// <summary>
        /// NAME: Austin Gee
        /// DATE: 2/6/2020
        /// CHECKED BY: Mohamed Elamin, 02/07/2020
        ///
        /// This is the standard no argument constructor
        /// </summary>
        /// <remarks>
        /// UPDATED BY: NA
        /// UPDATE DATE: NA
        /// WHAT WAS CHANGED: NA
        ///
        /// </remarks>
        public pgAdoptionCustomers()
        {
            InitializeComponent();
            _adoptionCustomerManager    = new AdoptionCustomerManager();
            _appointmentTypeManager     = new AppointmentTypeManager();
            _adoptionApplicationManager = new AdoptionApplicationManager();
            _locationManager            = new LocationManager();
            _adoptionAppointmentManager = new AdoptionAppointmentManager();

            canAdoptionCustomerProfile.Visibility  = Visibility.Collapsed;
            canAdoptionCustomerProfiles.Visibility = Visibility.Visible;


            populateCustomerDataGrid();
        }
Exemplo n.º 5
0
 /// <summary>
 /// NAME: Austin Gee
 /// DATE: 2/17/2020
 /// CHECKED BY: Thomas Dupuy
 ///
 /// This is the no-argeument constructor
 /// </summary>
 /// <remarks>
 /// UPDATED BY: Austin Gee
 /// UPDATE DATE: 3/4/2020
 /// WHAT WAS CHANGED: _homeInspectorManager added.
 ///
 /// </remarks>
 public pgMeetAndGreets()
 {
     InitializeComponent();
     _adoptionAppointmentManager = new AdoptionAppointmentManager();
     _homeInspectorManager       = new InHomeInspectionAppointmentDecisionManager();
     _appointmentTypeManager     = new AppointmentTypeManager();
     _inHomeInspectionAppointmentDecisionManager = new InHomeInspectionAppointmentDecisionManager();
     populateAppointmentDataGrid();
     try
     {
         cmbApptFilter.ItemsSource = _appointmentTypeManager.RetrieveAllAppontmentTypes();
     }
     catch (Exception)
     {
     }
 }
Exemplo n.º 6
0
 /// <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);
 }
        // BrowseAppointmentType(IAppointmentTypeManager appointmentTypeManager = null)
        /// <summary>
        /// Method for retrieving all appointment types.
        /// </summary>
        /// <param name="PetType newPetType">The BrowseAppointmentType calls the RetrieveAllAppointmentTypes.</param>
        /// <returns>dgAppointmentTypes.ItemsSource</returns>
        public BrowseAppointmentType(IAppointmentTypeManager appointmentTypeManager = null)
        {
            _appointmentTypeManager = appointmentTypeManager;
            if (_appointmentTypeManager == null)
            {
                _appointmentTypeManager = new AppointmentTypeManager();
            }

            InitializeComponent();
            try
            {
                _appointmentType = _appointmentTypeManager.RetrieveAllAppointmentTypes("All");
                if (_currentAppointmentType == null)
                {
                    _currentAppointmentType = _appointmentType;
                }
                dgAppointmentTypes.ItemsSource = _currentAppointmentType;
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + Environment.NewLine + ex.StackTrace);
            }
        }