Ejemplo n.º 1
0
        /// <summary>
        /// Submit capacity and room type information to the reassignment page.
        /// </summary>
        /// <param name="sender">A reference to the control/object that raised the event.</param>
        /// <param name="e">State information and event data associated with a routed event.</param>
        private void Submit_Click(object sender, RoutedEventArgs e)
        {
            string capacity = roomCap.Text;

            if (int.TryParse(capacity, out int i) == false)
            {
                System.Windows.MessageBox.Show("Invalid capacity");
            }
            else
            {
                string type = TypeBox.SelectedItem.ToString();
                reassignmentPage = new ReassignmentPage(C, capacity, type);
                this.Close();
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Close the popup and cancel everything when cancel button is clicked.
 /// </summary>
 /// <param name="sender">A reference to the control/object that raised the event.</param>
 /// <param name="e">State information and event data associated with a routed event.</param>
 public void Cancel_Click(object sender, RoutedEventArgs e)
 {
     reassignmentPage = null;
     this.Close();
 }