Example #1
0
        public List <Perfiles> ObtenerPerfiles()
        {
            string    queryString = "select * from perfiles";
            DataTable tblRol      = new DataTable();

            tblRol = this.mtdSelect(queryString);

            for (int i = 0; i < tblRol.Rows.Count; i++)
            {
                Perfiles objPerfil = new Perfiles();
                objPerfil.idPerfil    = int.Parse(tblRol.Rows[i][0].ToString());
                objPerfil.descripcion = tblRol.Rows[i][1].ToString();
                Perfiles.Add(objPerfil);
            }
            return(Perfiles);
        }
Example #2
0
 /// <summary>
 /// Adds the givenn profile to the user.
 /// </summary>
 /// <param name="perfil"></param>
 public virtual void AddPerfil(Perfil perfil)
 {
     Perfiles.Add(perfil);
 }