Пример #1
0
        /// <summary>
        /// 查询上传SAP数据
        /// </summary>
        /// <param name="filter"></param>
        /// <param name="TotalCount"></param>
        /// <returns></returns>
        public DataTable QuerySAPDOCHeader(HeaderDataQueryFilter filter, out int TotalCount)
        {
            CustomDataCommand cmd = DataCommandManager.CreateCustomDataCommandFromConfig("GetHeaderData");

            using (DynamicQuerySqlBuilder sb = new DynamicQuerySqlBuilder(cmd.CommandText, cmd, HelpDA.ToPagingInfo(filter.PagingInfo), "[InDate] DESC"))
            {
                AddSAPDOCHeaderParameters(filter, cmd, sb);
                DataTable dt = cmd.ExecuteDataTable();
                CodeNamePairColumnList codeNameColList = new CodeNamePairColumnList();
                codeNameColList.Add("DOC_TYPE", "Invoice", "DocumentType");

                cmd.ConvertCodeNamePairColumn(dt, codeNameColList);
                TotalCount = Convert.ToInt32(cmd.GetParameterValue("TotalCount"));

                return(dt);
            }
        }