private void frmRequisicion_Load(object sender, EventArgs e) { this.Icon = ClasesSGUV.Propiedades.IconHalcoNET; Clases.FillControl fill = new Clases.FillControl(); fill.FillDataSource(cbCuenta, "-----Selecciona una Cuenta-----", 3); fill.FillDataSource(cbSucursal, "-----Selecciona una Sucursal-----", 5); fill.FillDataSource(cbDepto, "-----Selecciona un Departamento-----", 6); try { System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand("PRES_Catalogos", new System.Data.SqlClient.SqlConnection(ClasesSGUV.Propiedades.conectionPJ_Pres)); command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@TipoConsulta", 7); command.Parameters.AddWithValue("@Usuario", ClasesSGUV.Login.Id_Usuario); DataTable tblUser = Clases.Datos.Sql.Fill(command); txtUsuario.Text = tblUser.Rows[0].Field <string>("Nombre"); cbSucursal.SelectedValue = tblUser.Rows[0].Field <string>("Sucursal"); cbDepto.SelectedValue = tblUser.Rows[0].Field <string>("Depto"); } catch (Exception) { } }