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