Пример #1
0
        private SupplierDocument GetSupplierDetails(string supplierName)
        {
            var receiver = new SupplierCommand(supplierName, $"{GetResourceServerAddress()}?cn={supplierName}");
            var document = receiver.Execute();

            return(document.Data.Message);
        }
Пример #2
0
        protected static SupplierDocument GetSupplierFromErpNext(string name, ILogger logger = null)
        {
            var receiver         = new SupplierCommand(name, $"{GetSupplierResourceServerAddress()}");
            var supplierDocument = receiver.Execute();

            if (supplierDocument.StatusCode != System.Net.HttpStatusCode.OK && logger != null)
            {
                logger.Debug("Server did not return supplier information");
                logger.Error(supplierDocument.Content);
                return(null);
            }
            return(supplierDocument.Data?.Message);
        }