示例#1
0
        private static async Task UpdateAccount()
        {
            await Task.Delay(10);

            string[] lines = File.ReadAllLines(@"C:\Data\VS19\trash\NBCH\NBCHConsoleClient\Accounts.txt");

            lines.AsParallel().ForAll(i => {
                try {
                    using (Service1CsoapProxy pdnProxy = new Service1CsoapProxy()) {
                        var gg = pdnProxy.GetCreditDocument(new string[] { "http://*****:*****@"C:\Data\VS19\trash\NBCH\NBCHConsoleClient\Error.txt";

                    if (!File.Exists(path))
                    {
                        string createText = $"Ошибка обновления данных по договору {i}{Environment.NewLine}" +
                                            (ex.InnerException?.Message ?? ex.Message) + Environment.NewLine;
                        File.WriteAllText(path, createText, Encoding.UTF8);
                    }

                    string appendText = $"Ошибка обновления данных по договору {i}{Environment.NewLine}" +
                                        (ex.InnerException?.Message ?? ex.Message) + Environment.NewLine;
                    File.AppendAllText(path, appendText, Encoding.UTF8);
                }
            });
        }
示例#2
0
 private static void LoadPDNAsync(KeyValuePair <string, double> pdn)
 {
     using (Service1CsoapProxy service1CProxy = new Service1CsoapProxy()) {
         service1CProxy.LoadPDNFromFile(new string[] { "http://ma-1c-main:82/sap/cash_loan.1cws" }, "soapuser", "UfD45", pdn.Key, pdn.Value);
         Console.WriteLine($"{pdn.Key}, {pdn.Value}");
     }
 }