private void btnBuscar_Click(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(txtRazonSocial.Text.Trim())) { return; } DataSet ds = new DataSet(); GestionBE GestionBE = new GestionBE() { OPCION = 4, USUARIO = General.General.GetCodigoUsuario, Entidad = txtRazonSocial.Text.Trim() }; ds = new GestionBL().ProcesarGestion(GestionBE); dgvSocioCandidato.DataSource = ds.Tables[0]; } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnBuscar_Click(object sender, EventArgs e) { try { DataSet ds = new DataSet(); GestionBE GestionBE = new GestionBE() { OPCION = 1, USUARIO = General.General.GetUsuario, FechaInicio = dtFechaInicio.Value, FechaFin = dtFechaFin.Value, IdEstado_tt = cboIdEstado_tt.SelectedValue.ToString() }; ds = new GestionBL().ProcesarGestion(GestionBE); dgvGestion.DataSource = ds.Tables[0]; lblRegistros.Text = ds.Tables[0].Rows.Count.ToString() + " registro(s)"; DataSet dsDoc = new DataSet(); GestionBE.OPCION = 5; dsDoc = new GestionBL().ProcesarGestion(GestionBE); dgvDocumentos.DataSource = dsDoc.Tables[0]; lblRegistrosDocumentos.Text = dsDoc.Tables[0].Rows.Count.ToString() + " registro(s)"; } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void CargarDatos() { try { DataSet ds = new DataSet(); GestionBE GestionBE = new GestionBE() { OPCION = 7, USUARIO = General.General.GetUsuario, Entidad = Codigo, FechaFin = _FechaFin, }; ds = new GestionBL().ProcesarGestion(GestionBE); dgvDocumentos.DataSource = ds.Tables[0]; } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void dgvDocumentos_CellClick(object sender, DataGridViewCellEventArgs e) { try { if (dgvDocumentos.RowCount > 0) { DataSet ds = new DataSet(); GestionBE GestionBE = new GestionBE() { OPCION = 6, USUARIO = General.General.GetUsuario, IdEntidad = dgvDocumentos.CurrentRow.Cells["IdSocio"].Value.ToString(), FechaInicio = dtFechaInicio.Value, FechaFin = dtFechaFin.Value, }; ds = new GestionBL().ProcesarGestion(GestionBE); dgvGestionSocio.DataSource = ds.Tables[0]; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }