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 GridCuenta_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (GridCuenta.SelectedRows.Count == 1) { FormMantPartidas frm = Owner as FormMantPartidas; frm.cuenta = GridCuenta.CurrentRow.Cells[1].Value.ToString(); frm.codigo = GridCuenta.CurrentRow.Cells[0].Value.ToString(); frm.tipo = GridCuenta.CurrentRow.Cells[3].Value.ToString(); frm.DGData(); this.Close(); } else { MessageBox.Show("seleccione una fila por favor"); } }
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"); } }