/// <summary>
        /// GetAsyncSupplierCodeDo. Returns a data object from a supplierCode.
        /// </summary>
        /// <param name="supplierCode"></param>
        /// <returns></returns>
        public async Task <ISupplierData> GetAsyncSupplierDo(string supplierCode)
        {
            var supplier = new Supplier(SqlExecutor);
            var loaded   = await supplier.LoadValue(null, supplierCode).ConfigureAwait(false);

            if (loaded)
            {
                return(supplier);
            }
            return(supplier);
        }
示例#2
0
        public async Task <ISupplierData> GetAsyncSupplierDo(string validSupplierCode)
        {
            Supplier supplier = new Supplier(_executor);
            bool     loaded   = await supplier.LoadValue(null, validSupplierCode);

            if (loaded)
            {
                return(supplier);
            }
            return(supplier);
        }
示例#3
0
        /// <summary>
        /// GetAsyncSupplierCodeDo. Returns a data object from a supplierCode.
        /// </summary>
        /// <param name="supplierCode"></param>
        /// <returns></returns>
        public async Task <ISupplierData> GetAsyncSupplierDo(string supplierCode)
        {
            var supplier = new Supplier(SqlExecutor);

            try
            {
                var loaded = await supplier.LoadValue(null, supplierCode).ConfigureAwait(false);

                if (loaded)
                {
                    return(supplier);
                }
            }
            catch (DataLayerException ex)
            {
                throw new DataLayerException(ex.Message, ex);
            }

            return(supplier);
        }