private void bttNuovo_Click(object sender, EventArgs e) { frmModDocViaggi newForm = new frmModDocViaggi(); newForm.MdiParent = this.MdiParent; this.Hide(); newForm.frmParent = this; newForm.Show(); }
private void bttModifica_Click(object sender, EventArgs e) { if (dgvResult.CurrentRow != null) { if (dgvResult.CurrentRow.Cells["Fatturato"].Value.ToString() == "SI") { MessageBox.Show("Il viaggio è fatturato.\n\nImpossibile procedere ", "Attenzione", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { frmModDocViaggi newForm = new frmModDocViaggi(); newForm.MdiParent = this.MdiParent; this.Hide(); newForm.frmParent = this; newForm.IdSel = Convert.ToInt32(dgvResult.CurrentRow.Cells["ID"].Value); newForm.Show(); NumberAllRow(); } } }