コード例 #1
0
        /// <summary>
        /// Wes Richardson
        /// Created: 2019/03/07
        ///
        /// When the Add, Edit or save button is pressed
        /// </summary>
        private void BtnAddEditView_Click(object sender, RoutedEventArgs e)
        {
            bool results = false;

            if (_mode == EditMode.Add)
            {
                checkInputs();
                if (inputsGood)
                {
                    try
                    {
                        results = _appMgr.CreateAppointmentByGuest(_appointment);
                        if (results)
                        {
                            MessageBox.Show("Appointment Added.");
                            this.Close();
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                    }
                }
            }
            else if (_mode == EditMode.Edit)
            {
            }
            else if (_mode == EditMode.View)
            {
            }
        }