private void LlenarRoles() { EnturnadorLIB.Enturnador.Lista objLista = new EnturnadorLIB.Enturnador.Lista(); this.listaRoles = objLista.GetListaRoles(); List<ROL> listaCopia = new List<ROL>(this.listaRoles.Count); foreach (ROL usu in this.listaRoles) { listaCopia.Add(usu); } //Se inserta item de "seleccione" a la lista ROL rol = new ROL(); rol.id = 0; rol.rol1 = "Seleccione..."; listaRoles.Insert(0, rol); //Se inserta item de "seleccione" a la lista ROL rol2 = new ROL(); rol2.id = 0; rol2.rol1 = "Todos..."; listaCopia.Insert(0, rol2); this.cboBuscarRol.DataSource = listaCopia; this.cboBuscarRol.DisplayMember = "rol1"; this.cboBuscarRol.ValueMember = "id"; this.cboRol.DataSource = listaRoles; this.cboRol.DisplayMember = "rol1"; this.cboRol.ValueMember = "id"; }
/// <summary> /// Deprecated Method for adding a new object to the ROL EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToROL(ROL rOL) { base.AddObject("ROL", rOL); }
/// <summary> /// Create a new ROL object. /// </summary> /// <param name="id">Initial value of the id property.</param> /// <param name="rol1">Initial value of the rol1 property.</param> /// <param name="activo">Initial value of the activo property.</param> public static ROL CreateROL(global::System.Int32 id, global::System.String rol1, global::System.Boolean activo) { ROL rOL = new ROL(); rOL.id = id; rOL.rol1 = rol1; rOL.activo = activo; return rOL; }