예제 #1
0
파일: MainForm.cs 프로젝트: X39/libfintx
        private async void btn_daueraufträge_abholen_Click(object sender, EventArgs e)
        {
            var connectionDetails = GetConnectionDetails();
            var client            = new FinTsClient(connectionDetails);
            var sync = await client.Synchronization();

            HBCIOutput(sync.Messages);

            if (sync.IsSuccess)
            {
                // TAN-Verfahren
                client.HIRMS = txt_tanverfahren.Text;

                if (!await InitTANMedium(client))
                {
                    return;
                }

                var bankersOrders = await client.GetBankersOrders(CreateTANDialog(client));

                HBCIOutput(bankersOrders.Messages);

                if (bankersOrders.IsSuccess)
                {
                    if (bankersOrders.Data != null && bankersOrders.Data.Count > 0)
                    {
                        foreach (var item in bankersOrders.Data)
                        {
                            Pain00100103CtData.PaymentInfo paymentData = item.SepaData.Payments.FirstOrDefault();
                            var txInfo = paymentData.CreditTxInfos.FirstOrDefault();

                            SimpleOutput("Auftrags-Id: " + item.OrderId + " | " +
                                         "Empfänger: " + txInfo.Creditor + " | " +
                                         "Betrag: " + txInfo.Amount + " | " +
                                         "Verwendungszweck: " + txInfo.RemittanceInformation + " | " +
                                         "Erste Ausführung: " + $"{item.FirstExecutionDate:d}" + " | " +
                                         "Nächste Ausführung: " + $"{paymentData.RequestedExecutionDate:d}" + " | " +
                                         "Letzte Ausführung: " + $"{item.LastExecutionDate:d}");
                        }
                    }
                }
            }
        }
예제 #2
0
파일: MainForm.cs 프로젝트: X39/libfintx
        private async void btn_terminueberweisungen_abholen_Click(object sender, EventArgs e)
        {
            var connectionDetails = GetConnectionDetails();
            var client            = new FinTsClient(connectionDetails);
            var sync = await client.Synchronization();

            HBCIOutput(sync.Messages);

            if (sync.IsSuccess)
            {
                // TAN-Verfahren
                client.HIRMS = txt_tanverfahren.Text;

                if (!await InitTANMedium(client))
                {
                    return;
                }

                var result = await client.GetTerminatedTransfers(CreateTANDialog(client));

                HBCIOutput(result.Messages);

                if (result.Data != null && result.Data.Count > 0)
                {
                    foreach (var item in result.Data)
                    {
                        Pain00100103CtData.PaymentInfo paymentData = item.SepaData.Payments.FirstOrDefault();
                        var txInfo = paymentData.CreditTxInfos.FirstOrDefault();

                        SimpleOutput(
                            "Auftrags-Id: " + item.OrderId + " | " +
                            (item.Deleteable != null ? "Löschbar: " + item.Deleteable + " | " : null) +
                            (item.Modifiable != null ? "Löschbar: " + item.Modifiable + " | " : null) +
                            "Empfänger: " + txInfo.Creditor + " | " +
                            "Betrag: " + txInfo.Amount + " | " +
                            "Verwendungszweck: " + txInfo.RemittanceInformation + " | " +
                            "Ausführung: " + $"{paymentData.RequestedExecutionDate:d}");
                    }
                }
            }
        }