private void btt_newProduct_Click(object sender, EventArgs e) { var newProductForm = new NewProductForm { RefToFormMain = this }; newProductForm.Show(); }
private void btt_EditProduct_Click(object sender, EventArgs e) { try { var row = productGridControl.SelectedRows; var cells = row[0].Cells; var newSupplierForm = new NewProductForm(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); } }