This commit is contained in:
seb
2026-07-14 23:30:16 +02:00
parent 245fb047d7
commit 262fa63f1b
109 changed files with 21566 additions and 367 deletions

View File

@@ -0,0 +1,32 @@
#pragma once
#include <string>
#include "xml.hpp"
#include "../db/pool.hpp"
namespace delivery {
inline void commit_picklists(OdbcPool::Connection* c, int kBenutzer, int kSessionId, int kAuftrag) {
std::string bestellungen = xml::element("Bestellung", xml::tag("kBestellung", int64_t(kAuftrag)));
const char* sql =
"DECLARE @xBestellungen XML = CONVERT(XML, ?);"
"DECLARE @xResult XML;"
"EXEC Auslieferung.spPicklistenUebernehmen"
" @Bestellungen = @xBestellungen,"
" @kBenutzer = ?,"
" @nTeillieferung = 0,"
" @kSessionId = ?,"
" @xResult = @xResult OUTPUT";
std::vector<Param> ps = {
{ParamType::NVarChar, bestellungen, 0},
{ParamType::Int, "", kBenutzer},
{ParamType::Int, "", kSessionId}
};
ResultSet rs;
if (!get_pool().execute(c, sql, ps, rs)) {
throw std::runtime_error("commit_picklists failed");
}
}
} // namespace delivery