예제 #1
0
        /// <summary>
        ///  Get async supplier summary.
        /// </summary>
        /// <returns></returns>
        public async Task <DataSet> GetAsyncAllSupplierSummary()
        {
            string str     = GenericSql.SupplierSummaryQuery;
            var    summary = await SqlExecutor.AsyncDataSetLoad(str).ConfigureAwait(false);

            return(summary);
        }
예제 #2
0
        /// <summary>
        /// Get the helper dataset for the async layer.
        /// </summary>
        /// <param name="assistQuery">Assist query.</param>
        /// <param name="assitTableName">Assist table</param>
        /// <returns></returns>
        public async Task <DataSet> GetAsyncHelper(string assistQuery, string assitTableName)
        {
            DataSet set = await SqlExecutor.AsyncDataSetLoad(assistQuery);

            set.Tables[0].TableName = assitTableName;
            return(set);
        }
예제 #3
0
        /// <summary>
        /// Return the dataset of the delegations given a supplier.
        /// </summary>
        /// <param name="supplierCode">code of the supplier</param>
        /// <returns></returns>
        public async Task <Tuple <string, DataSet> > GetAsyncDelegations(string supplierCode)
        {
            string  supplierCodeQuery = "";
            DataSet delegationDataSet;

            if (!String.IsNullOrEmpty(supplierCode))
            {
                supplierCodeQuery = string.Format(GenericSql.DelegationQuery, "'" + supplierCode + "'");
                delegationDataSet = await SqlExecutor.AsyncDataSetLoad(supplierCodeQuery);
            }
            else
            {
                supplierCodeQuery = GenericSql.DelegationGenericQuery;
                delegationDataSet = await SqlExecutor.AsyncDataSetLoad(supplierCodeQuery);
            }
            var retValue = new Tuple <string, DataSet>(supplierCodeQuery, delegationDataSet);

            return(retValue);
        }
예제 #4
0
        /// <summary>
        ///  Get async supplier dataset
        /// </summary>
        /// <returns></returns>
        public async Task <DataSet> GetAsyncSuppliers()
        {
            var summary = await SqlExecutor.AsyncDataSetLoad(GenericSql.SupplierQuery).ConfigureAwait(false);

            return(summary);
        }