예제 #1
0
        private void EditButton_Click(object sender, EventArgs e)
        {
            Button btn = (Button)sender;

            int x = 0;

            Int32.TryParse(btn.Name, out x);

            Bookings book = new Bookings();

            book.SetUpFromBookingsManager(x);
            book.FormClosing += BookingsClosing;
            book.ShowDialog();
        }
예제 #2
0
        private void btn_new_Click(object sender, EventArgs e)
        {
            Form fm = Application.OpenForms["Bookings"];

            if (fm != null)
            {
                fm.BringToFront();
            }
            else
            {
                Bookings st = new Bookings();
                st.FormClosing += BookingsClosing;
                st.ShowDialog();
            }
        }