private void btnNuevo_Click(object sender, EventArgs e) { FormMantPartidas frm = new FormMantPartidas(); frm.IsInsert = true; frm.FormClosed += new FormClosedEventHandler(Form3_Closed); frm.ShowDialog(); }
private void btnEditar_Click_1(object sender, EventArgs e) { if (GridPartidasContables.SelectedRows.Count == 1) { FormMantPartidas frm = new FormMantPartidas(); frm.IsInsert = false; frm.txtid.Text = GridPartidasContables.CurrentRow.Cells[0].Value.ToString(); frm.txtDetallePartida.Text = GridPartidasContables.CurrentRow.Cells[1].Value.ToString(); frm.fecha.Value = Convert.ToDateTime(GridPartidasContables.CurrentRow.Cells[2].Value.ToString()); frm.FormClosed += new FormClosedEventHandler(Form3_Closed); frm.ShowDialog(); } else { MessageBox.Show("seleccione una fila por favor"); } }