コード例 #1
0
        private async Task CheckSecurityAsync()
        {
            try
            {
                if (!string.IsNullOrEmpty(TaxCode) && !string.IsNullOrEmpty(SecurityCode))
                {
                    var ret = await SPC.eInvoice.InvoiceInfos.GetInvoiceInfoBySecurityCodeAsync(SecurityCode);

                    if (ret == null || ret.Count == 0)
                    {
                        ret = await SPC.eInvoice.InvoiceInfos.GetBuyerInvoiceInfoBySecurityCodeAsync(TaxCode, SecurityCode);
                    }

                    if (ret != null && ret.Count > 0)
                    {
                        oneInvoice = ret[0];

                        Emails = Str.Nz(oneInvoice.Notes.Trim(), "-");
                    }
                    else
                    {
                        Emails = "!";
                    }
                }
            }
            catch (Exception ex)
            {
                await JsRuntime.InvokeVoidAsync("confirm", ex.Message);
            }
        }
コード例 #2
0
        async Task DownloadPdf(object pContext)
        {
            SPC.eInvoice.InvoiceInfo info = pContext as SPC.eInvoice.InvoiceInfo;

            if (info != null)
            {
                var key       = SPC.Helper.Extension.SPCHash.CRCToBase36(String.Format("{0}:{1}", info.SellerTaxCode, info.ProformaNo));
                var thePdfUrl = await SPC.eInvoice.OneInvoice.GetPdfUrlAsync(info.SellerTaxCode, info.ProformaNo, key);

                if (!string.IsNullOrWhiteSpace(thePdfUrl))
                {
                    //navi.NavigateTo(thePdfUrl, true);
                    await jsRuntime.InvokeAsync <object>("open", thePdfUrl, "_blank");
                }
            }
        }
コード例 #3
0
        async Task DownloadXml(object pContext)
        {
            SPC.eInvoice.InvoiceInfo info = pContext as SPC.eInvoice.InvoiceInfo;

            if (info != null)
            {
                var key       = SPC.Helper.Extension.SPCHash.CRCToBase36(String.Format("{0}:{1}", info.SellerTaxCode, info.ProformaNo));
                var theXmlUrl = await SPC.eInvoice.OneInvoice.GetXmlUrlAsync(info.SellerTaxCode, info.ProformaNo, key);


                if (!string.IsNullOrWhiteSpace(theXmlUrl))
                {
                    await SPC.Cloud.Blob.Storage.SetDownloadContentTypeForBlobAsync(theXmlUrl);

                    await jsRuntime.InvokeAsync <object>("open", theXmlUrl, "_blank");
                }
            }
        }