예제 #1
0
        private void ModificarUsuario_Load(object sender, EventArgs e)
        {
            InternoBusiness internoBusiness = new InternoBusiness();

            try
            {
                dgvListar.DataSource                           = internoBusiness.listar();
                dgvListar.Columns[0].Visible                   = false;
                dgvListar.Columns["estado"].Visible            = false;
                dgvListar.Columns[0].HeaderText                = "Numero de Legajo";
                dgvListar.Columns["mail"].HeaderText           = "Direccion Mail";
                dgvListar.Columns["fnac"].HeaderText           = "Fecha Nacimiento";
                dgvListar.Columns["numerolegajo"].DisplayIndex = 0;
                dgvListar.Columns["apellido"].DisplayIndex     = 1;
                dgvListar.Columns["nombre"].DisplayIndex       = 2;
                dgvListar.Columns["dni"].DisplayIndex          = 3;
                dgvListar.Columns["direccion"].DisplayIndex    = 4;
                dgvListar.Columns["mail"].DisplayIndex         = 5;
                dgvListar.Columns["fnac"].DisplayIndex         = 6;
                dgvListar.Columns["usuario"].DisplayIndex      = 7;
                dgvListar.Columns["clave"].DisplayIndex        = 8;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
예제 #2
0
        private void frmBorrarUsuario_Load(object sender, EventArgs e)
        {
            InternoBusiness internoBusiness = new InternoBusiness();

            try
            {
                dgvListar.DataSource = internoBusiness.listar();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
예제 #3
0
        private void txtBuscarApellido_TextChanged(object sender, EventArgs e)
        {
            InternoBusiness internoBusiness = new InternoBusiness();
            string          busqueda        = txtBuscarApellido.Text.Trim();

            try
            {
                dgvListar.DataSource = internoBusiness.listar("apellido", busqueda);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }