Exemplo n.º 1
0
        private void SetInfoInControls()
        {
            try
            {
                txtID.Text              = infoXML.IdDocumento.ToString();
                txtContribuyente.Text   = infoXML.emi_ContribuyenteEspecial;
                deFecha.DateTime        = infoXML.FechaEmision.Date;
                txtCodDocumento.Text    = infoXML.CodDocumento;
                txtTipo.Text            = infoXML.Tipo;
                txtEstablecimiento.Text = infoXML.Establecimiento;
                txtPuntoEmision.Text    = infoXML.PuntoEmision;
                txtNumDocumento.Text    = infoXML.NumeroDocumento;
                txtClaveAcceso.Text     = infoXML.ClaveAcceso;
                txtIdentificacion.Text  = infoXML.emi_Ruc;
                txtRazonSocial.Text     = infoXML.emi_RazonSocial;
                txtNombreComercial.Text = infoXML.emi_NombreComercial;
                txtDireccion.Text       = infoXML.emi_DireccionMatriz;

                infoXML.ListaDet        = busXMLDet.GetList(infoXML.IdEmpresa, infoXML.IdDocumento);
                blst                    = new BindingList <cxc_XML_DocumentoDet_Info>(infoXML.ListaDet);
                gcDetalleXML.DataSource = blst;


                txtTotalRetencionFuente.Text = infoXML.ListaDet.Where(q => q.TipoRetencion == "FTE").Sum(q => q.ValorRetenido).ToString("n2");
                txtTotalRetencionIVA.Text    = infoXML.ListaDet.Where(q => q.TipoRetencion == "IVA").Sum(q => q.ValorRetenido).ToString("n2");
            }
            catch (Exception)
            {
                throw;
            }
        }