private void btnThem_Click(object sender, EventArgs e) { frmTheLoai frmTL = new frmTheLoai(); frmTL.myEvent += frm_myEvent; frmTL.ShowDialog(); }
private void btnSua_Click(object sender, EventArgs e) { try { string _maTL = grid_DSTheLoai.GetRowCellValue(grid_DSTheLoai.FocusedRowHandle, grid_DSTheLoai.Columns["MaTL"]).ToString(); // Truyen cai MaTL vua lay dx...qua ben form NhapTheLoai. frmTheLoai frmTL = new frmTheLoai(_maTL); frmTL.myEvent += frm_myEvent; frmTL.ShowDialog(); } catch { XtraMessageBox.Show("Bạn phải chọn dòng chưa dữ liệu", Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }