Ejemplo n.º 1
0
 public Models.DocVenda Get(string id)
 {
     try
     {
         Models.DocVenda doc = (from p in db.DocVenda
                                where p.Id == id
                                select p).AsQueryable().First();
         return(doc);
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e);
         return(null);
     }
 }
Ejemplo n.º 2
0
        public EncomendaProduto Get(string id)
        {
            try
            {
                Models.DocVenda doc = (from p in db.DocVenda
                                       where p.Id == id
                                       select p).AsQueryable().First();

                List <Models.LinhaDocVenda> linhas = (from i in db.LinhaDocVenda
                                                      where i.IdCabecDoc == id
                                                      select i).ToList();

                EncomendaProduto encomenda = new EncomendaProduto(doc, linhas);

                return(encomenda);
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine(e);
                return(null);
            }
        }
Ejemplo n.º 3
0
 public EncomendaProduto(Models.DocVenda doc, List <Models.LinhaDocVenda> lines)
 {
     this.doc   = doc;
     this.lines = lines;
 }