public void TestCreateMaintenanceWorkOrderValidInput()
        {
            //Arrange
            MaintenanceWorkOrder newMaintenanceWorkOrder = new MaintenanceWorkOrder()
            {
                MaintenanceTypeID = "Plumbing", DateRequested = DateTime.Now, DateCompleted = DateTime.Now.AddDays(1), RequestingEmployeeID = 100000, WorkingEmployeeID = 100001, Description = "Created In Unit Test: TestCreateMaintenanceWorkOrderValidInput()", Comments = "Test Comment", MaintenanceStatusID = "Open", ResortPropertyID = 1, Complete = true
            };

            //Act
            _maintenanceWorkOrderManager.AddMaintenanceWorkOrder(newMaintenanceWorkOrder);

            //Assert
            //Updates the list of MaintenanceWorkOrder
            _maintenanceWorkOrders = _maintenanceWorkOrderManager.RetrieveAllMaintenanceWorkOrders();

            //Checks to see if the new MaintenanceWorkOrder is in the updated list of MaintenanceWorkOrders
            Assert.IsNotNull(_maintenanceWorkOrders.Find(x => x.MaintenanceTypeID == newMaintenanceWorkOrder.MaintenanceTypeID &&
                                                         x.MaintenanceStatusID == newMaintenanceWorkOrder.MaintenanceStatusID &&
                                                         x.DateRequested.Day == newMaintenanceWorkOrder.DateRequested.Day &&
                                                         x.RequestingEmployeeID == newMaintenanceWorkOrder.RequestingEmployeeID &&
                                                         x.WorkingEmployeeID == newMaintenanceWorkOrder.WorkingEmployeeID &&
                                                         x.Description == newMaintenanceWorkOrder.Description &&
                                                         x.Comments == newMaintenanceWorkOrder.Comments &&
                                                         x.ResortPropertyID == newMaintenanceWorkOrder.ResortPropertyID));
        }
        /// <summary>
        /// Author: Dalton Cleveland
        /// Created : 1/31/2019
        /// The function which runs when Save is clicked
        /// </summary>
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            if (((string)btnSave.Content) == "Submit")
            {
                if (!ValidateInput())
                {
                    return;
                }
                MaintenanceWorkOrder newMaintenanceWorkOrder = new MaintenanceWorkOrder();
                newMaintenanceWorkOrder.MaintenanceTypeID    = (cboMaintenanceTypeID.SelectedItem.ToString());
                newMaintenanceWorkOrder.DateRequested        = DateTime.Now;
                newMaintenanceWorkOrder.RequestingEmployeeID = int.Parse(txtRequestingEmployeeID.Text);
                newMaintenanceWorkOrder.WorkingEmployeeID    = int.Parse(txtWorkingEmployeeID.Text);
                newMaintenanceWorkOrder.ResortPropertyID     = int.Parse(txtResortPropertyID.Text);
                newMaintenanceWorkOrder.MaintenanceStatusID  = cboStatus.SelectedItem.ToString();
                newMaintenanceWorkOrder.Comments             = txtComments.Text;
                newMaintenanceWorkOrder.Description          = txtDescription.Text;
                try
                {
                    if (_existingMaintenanceWorkOrder == null)
                    {
                        _maintenanceWorkOrderManager.AddMaintenanceWorkOrder(newMaintenanceWorkOrder);
                        SetError("");
                        MessageBox.Show("Maintenance Work Order Created Successfully: " +
                                        "\nMaintenanceTypeID: " + newMaintenanceWorkOrder.MaintenanceTypeID +
                                        "\nRequestingEmployeeID: " + newMaintenanceWorkOrder.RequestingEmployeeID +
                                        "\nWorkingEmployeeID: " + newMaintenanceWorkOrder.WorkingEmployeeID +
                                        "\nResortPropertyID: " + newMaintenanceWorkOrder.ResortPropertyID +
                                        "\nMaintenanceStatus: " + newMaintenanceWorkOrder.MaintenanceStatusID +
                                        "\nDescription: " + newMaintenanceWorkOrder.Description);
                    }
                    else
                    {
                        newMaintenanceWorkOrder.Complete = (bool)chkComplete.IsChecked;
                        _maintenanceWorkOrderManager.EditMaintenanceWorkOrder(_existingMaintenanceWorkOrder, newMaintenanceWorkOrder);
                        newMaintenanceWorkOrder.DateCompleted = DateTime.Now;
                        SetError("");
                        MessageBox.Show("Maintenance Work Order Updated Successfully: " +
                                        "\nOld MaintenanceTypeID: " + _existingMaintenanceWorkOrder.MaintenanceTypeID +
                                        "\nOld DateRequested: " + _existingMaintenanceWorkOrder.DateRequested +
                                        "\nOld RequestingEmployeeID: " + _existingMaintenanceWorkOrder.RequestingEmployeeID +
                                        "\nOld WorkingEmployeeID: " + _existingMaintenanceWorkOrder.WorkingEmployeeID +
                                        "\nOld ResortPropertyID: " + _existingMaintenanceWorkOrder.ResortPropertyID +
                                        "\nOldMaintenanceStatusID: " + _existingMaintenanceWorkOrder.MaintenanceStatusID +
                                        "\nOld Description: " + _existingMaintenanceWorkOrder.Description +
                                        "\n" +
                                        "\nNew MaintenanceTypeID: " + newMaintenanceWorkOrder.MaintenanceTypeID +
                                        "\nNew DateCompleted: " + newMaintenanceWorkOrder.DateCompleted +
                                        "\nNew RequestingEmployeeID: " + newMaintenanceWorkOrder.RequestingEmployeeID +
                                        "\nNew WorkingEmployeeID: " + newMaintenanceWorkOrder.WorkingEmployeeID +
                                        "\nNew ResortPropertyID: " + newMaintenanceWorkOrder.ResortPropertyID +
                                        "\nNew MaintenanceStatusID: " + newMaintenanceWorkOrder.MaintenanceStatusID +
                                        "\nNew Comments: " + newMaintenanceWorkOrder.Comments +
                                        "\nNew Description: " + newMaintenanceWorkOrder.Description);
                    }
                }
                catch (Exception ex)
                {
                    SetError(ex.Message);
                }

                Close();
            }
            else if (((string)btnSave.Content) == "Update")
            {
                setEditable();
            }
            else
            {
                MessageBox.Show(btnSave.Content.GetType() + " " + btnSave.Content);
            }
        }