private void newSupp_Click(object sender, EventArgs e) { var newSupplierForm = new NewSupplierForm { RefToFormMain = this }; newSupplierForm.Show(); }
private void btt_EditSupplier_Click(object sender, EventArgs e) { try { var row = supplierGridControl.SelectedRows; var cells = row[0].Cells; var newSupplierForm = new NewSupplierForm(int.Parse(cells[0].Value.ToString())) { RefToFormMain = this }; newSupplierForm.Show(); } catch (Exception ex) { MessageBox.Show("Vui lòng chọn một dòng.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } }