Exemple #1
0
        /// <summary>
        /// This returns a new supplier.
        /// </summary>
        /// <param name="queryList">List of the queries for the supplier</param>
        /// <returns></returns>
        public async Task <DataSet> GetNewSupplier(IDictionary <string, string> queryList)
        {
            DataSet set = await SqlExecutor.AsyncDataSetLoadBatch(queryList).ConfigureAwait(false);

            string supplierId = GetNewId();

            for (int i = 0; i < set.Tables.Count; ++i)
            {
                if (set.Tables[i].Columns.Contains("NUM_PROVEE"))
                {
                    if (set.Tables[i].Rows.Count > 0)
                    {
                        set.Tables[i].Rows[0]["NUM_PROVEE"] = supplierId;
                    }
                    foreach (DataColumn col in set.Tables[i].Columns)
                    {
                        if (col.DataType == typeof(string))
                        {
                            if (col.ColumnName != "NUM_PROVEE")
                            {
                                set.Tables[i].Rows[0][col] = "";
                            }
                        }
                    }
                }
            }

            return(set);
        }
Exemple #2
0
        public async Task <DataSet> GetAsyncSupplierInfo(IDictionary <string, string> queryList)
        {
            var summary = await SqlExecutor.AsyncDataSetLoadBatch(queryList).ConfigureAwait(false);

            return(summary);
        }
Exemple #3
0
        /// <summary>
        /// Assist query using the data set
        /// </summary>
        /// <param name="assitQueryDictionary">Dictionary that contgins the assist query.</param>
        /// <returns></returns>
        public async Task <DataSet> GetAsyncHelper(IDictionary <string, string> assitQueryDictionary)
        {
            DataSet set = await SqlExecutor.AsyncDataSetLoadBatch(assitQueryDictionary);

            return(set);
        }