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