コード例 #1
0
        private void cmdAgregar_Click(object sender, EventArgs e)
        {
            frmConceptoPago frm = new frmConceptoPago();

            frm.modo = "C";
            frm.conn = conn;
            frm.ShowDialog();
        }
コード例 #2
0
        private void DgbConceptoDePago_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (modo != "user")
            {
                try
                {
                    DataGridViewRow row = this.DgbConceptoDePago.SelectedRows[0];
                    frmConceptoPago frm = new frmConceptoPago();
                    frm.ID          = row.Cells[0].Value.ToString();
                    frm.Descripcion = row.Cells[1].Value.ToString();
                    frm.Estado      = row.Cells[2].Value.ToString();
                    frm.modo        = "U";
                    frm.conn        = conn;

                    frm.ShowDialog();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error al editar registro " + ex.Message);
                }
            }
        }