예제 #1
0
        public override List <ulong> ParseAddressIds(MySqlConnection connection, ulong supplierId, string archFileName, string currentFileName)
        {
            string supplierDeliveryId;

            try {
                supplierDeliveryId = Path.GetFileName(currentFileName).Split('_')[0];
            }
            catch (Exception ex) {
                throw new Exception("Не получилось сформировать код доставки из имени файла накладной.", ex);
            }

            return(AddressIdQuery.GetAddressIds(supplierId, supplierDeliveryId));
        }
        public override List <ulong> ParseAddressIds(MySqlConnection connection, ulong supplierId, string archFileName, string currentFileName)
        {
            string firmClientCode;

            try {
                firmClientCode = Path.GetFileName(currentFileName).Split('_')[0];
            }
            catch (Exception ex) {
                throw new Exception("Не получилось сформировать SupplierDeliveryId(FirmClientCode2) из имени накладной.", ex);
            }

            var list = AddressIdQuery.GetAddressIds(supplierId, firmClientCode);

            if (list.Count == 0)
            {
                throw new Exception("Не удалось найти клиентов с SupplierClientId(FirmClientCode) = " + firmClientCode + ".");
            }

            return(list);
        }