Esempio n. 1
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            FormFlightScheduleCE f = new FormFlightScheduleCE();

            // f.MdiParent = this.MdiParent;

            // Hien form Create len va doi cho den khi form bi tat di
            f.ShowDialog();

            // Load lai bang sau khi form Create da tat
            LoadDataGridView();
        }
Esempio n. 2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            // Lay tai khoan admin dang duoc chon trong bang
            FlightSchedule flightSchedule = GetSelectedFlightSchedule();

            // Neu hien tai khong co tai khoan nao duoc chon thi hien thong bao
            if (flightSchedule == null)
            {
                MessageBox.Show("You must choose an aiplane to edit!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            // Neu co tai khoan dang duoc chon thi hien form chinh sua thong tin len, truyen du lieu qua
            FormFlightScheduleCE f = new FormFlightScheduleCE(flightSchedule, HelperClass.FormMode.EDIT);

            // f.MdiParent = this.MdiParent;

            // Hien form Edit len va doi cho den khi form bi tat di
            f.ShowDialog();

            // Load lai bang sau khi form Edit da tat
            LoadDataGridView();
        }