public List<modeloDvd> Selecionar()
 {
     List<modeloDvd> listaDvd = new List<modeloDvd>();
     var queryDvd =
         from dvds in dblocadora.tabDvds
         select dvds;
     foreach (var dvdModel in queryDvd)
     {
         modeloDvd dvd = new modeloDvd();
         dvd.Id = dvdModel.Id;
         dvd.Nome = dvdModel.nome;
         dvd.Ano = Convert.ToInt32(dvdModel.ano);
         dvd.Genero = dvdModel.genero;
         listaDvd.Add(dvd);
     }
     return listaDvd;
 }
        public List <modeloDvd> Selecionar()
        {
            List <modeloDvd> listaDvd = new List <modeloDvd>();
            var queryDvd =
                from dvds in dblocadora.tabDvds
                select dvds;

            foreach (var dvdModel in queryDvd)
            {
                modeloDvd dvd = new modeloDvd();
                dvd.Id     = dvdModel.Id;
                dvd.Nome   = dvdModel.nome;
                dvd.Ano    = Convert.ToInt32(dvdModel.ano);
                dvd.Genero = dvdModel.genero;
                listaDvd.Add(dvd);
            }
            return(listaDvd);
        }
        public modeloDvd SelecionarDesc(int id)
        {
            modeloDvd dvd      = new modeloDvd();
            var       queryDvd =
                from nDvd in dblocadora.tabDvds
                where nDvd.Id == id
                select nDvd;

            foreach (var aDvd in queryDvd)
            {
                if (aDvd.Id == id)
                {
                    dvd.Id     = aDvd.Id;
                    dvd.Nome   = aDvd.nome;
                    dvd.Ano    = Convert.ToInt32(aDvd.ano);
                    dvd.Genero = aDvd.genero;
                    //dvd.Capa = aDvd.capa.ToArray();
                }
            }
            return(dvd);
        }
예제 #4
0
 public frmItemDesc(modeloDvd aDvd)
 {
     InitializeComponent();
     dvd = aDvd;
 }
예제 #5
0
 public frmItemDesc(modeloDvd aDvd)
 {
     InitializeComponent();
     dvd = aDvd;
 }
 public modeloDvd SelecionarDesc(int id)
 {
     modeloDvd dvd = new modeloDvd();
        var queryDvd =
        from nDvd in dblocadora.tabDvds
        where nDvd.Id == id
        select nDvd;
        foreach (var aDvd in queryDvd)
        {
        if (aDvd.Id == id)
        {
            dvd.Id = aDvd.Id;
            dvd.Nome = aDvd.nome;
            dvd.Ano = Convert.ToInt32(aDvd.ano);
            dvd.Genero = aDvd.genero;
            //dvd.Capa = aDvd.capa.ToArray();
        }
        }
        return dvd;
 }