Exemple #1
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            if (dgv.RowCount > 0)
            {
                int oid = new int();

                if (dgv.RowCount > 1)
                {
                    oid = int.Parse(dgv.Rows[dgv.SelectedRows[0].Index].Cells[0].Value.ToString());
                }
                else
                {
                    oid = int.Parse(dgv.Rows[0].Cells[0].Value.ToString());
                }

                FrmLectoraAdd oFrmAdd = new FrmLectoraAdd(this, oid, "U");

                oFrmAdd.ShowDialog();
            }

            else
            {
                MessageBox.Show("Debe Seleccionar un Tipo de Documento de Identidad");
            }
        }
Exemple #2
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            int           oid  = new int();
            FrmLectoraAdd oFrm = new FrmLectoraAdd(this, oid, "C");

            oFrm.ShowDialog();
        }