예제 #1
0
        private void OnAdd()
        {
            dlgAddCongTacNgoaiGio dlg = new dlgAddCongTacNgoaiGio();

            if (dlg.ShowDialog(this) == DialogResult.OK)
            {
                DisplayAsThread();
            }
        }
예제 #2
0
        private void OnEdit()
        {
            if (dgCongTacNgoaiGio.SelectedRows == null || dgCongTacNgoaiGio.SelectedRows.Count <= 0)
            {
                MsgBox.Show(Application.ProductName, "Vui lòng chọn 1 công tác ngoài giờ.", IconType.Information);
                return;
            }

            DataRow drCongTacNgoaiGio = (dgCongTacNgoaiGio.SelectedRows[0].DataBoundItem as DataRowView).Row;

            if (drCongTacNgoaiGio == null)
            {
                return;
            }

            dlgAddCongTacNgoaiGio dlg = new dlgAddCongTacNgoaiGio(drCongTacNgoaiGio);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                DisplayAsThread();
            }
        }