Ejemplo n.º 1
0
        public void GetDatosDocumentoVenta(String Sopnumbe, short Soptype)
        {
            using (PER10Entities dv = new PER10Entities())
            {
                _DocVenta = dv.vwCfdiGeneraDocumentoDeVenta
                            .Where(v => v.sopnumbe == Sopnumbe && v.soptype == Soptype)
                            .First();
                _LDocVentaConceptos = dv.vwCfdiConceptos
                                      .Where(v => v.sopnumbe == Sopnumbe && v.soptype == Soptype)
                                      .ToList();
                _LDocVentaRelacionados = dv.vwCfdiRelacionados
                                         .Where(v => v.sopnumbeFrom == Sopnumbe && v.soptypeFrom == Soptype)
                                         .ToList();

                //var resDoc = dv.vwCfdiGeneraDocumentoDeVenta.Where(v => v.sopnumbe == Sopnumbe && v.soptype == Soptype);
                //foreach (vwCfdiGeneraDocumentoDeVenta doc in resDoc)
                //{
                //    _DocVenta = doc;
                //    break;
                //}
                //var resCon = dv.vwCfdiConceptos.Where(v => v.sopnumbe == Sopnumbe && v.soptype == Soptype);
                //foreach (vwCfdiConceptos c in resCon)
                //{
                //    _LDocVentaConceptos.Add(c);
                //}

                //var resRelacionados = dv.vwCfdiRelacionados.Where(v => v.sopnumbeFrom == Sopnumbe && v.soptypeFrom == Soptype);
                //foreach (vwCfdiRelacionados c in resRelacionados)
                //{
                //    _LDocVentaRelacionados.Add(c);
                //}
            }
        }
Ejemplo n.º 2
0
        public void GetDatosResumenBoletas(String Sopnumbe, short Soptype)
        {
            using (PER10Entities dv = new PER10Entities())
            {
                //System.Diagnostics.Debugger.NotifyOfCrossThreadDependency();
                _lDocResumenLineas = dv.vwCfdiGeneraResumenDiario
                                     .Where(v => v.numResumenDiario == Sopnumbe && v.tipoResumenDiario == Soptype)
                                     .ToList();

                _resumenCab = _lDocResumenLineas.First();
            }
        }