Commit inicial: ITCA_API_SAP_WMS (.NET Core 3.1)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
2b82744eb8
168 files changed
+11066
No files matched your search
@@ -0,0 +1,34 @@
|
||||
using Sap.Data.Hana;
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
namespace Net.Data.HelperData.Invoices
|
||||
{
|
||||
public class HelperInvoice
|
||||
{
|
||||
public static int Get(string DocNum)
|
||||
{
|
||||
DataTable dt = new DataTable();
|
||||
int DocEntry = 0;
|
||||
using (HanaConnection con = new HanaConnection(LocalData.ConnectionString))
|
||||
{
|
||||
con.Open();
|
||||
HanaCommand cmd = new HanaCommand($"CALL\"{LocalData.Schema}\".\"ITCA_WMS_SAP_GetEntradaPorImportacion\"(?)", con);
|
||||
cmd.Parameters.Add("DocNum", HanaDbType.VarChar).Value = DocNum ?? "";
|
||||
HanaDataAdapter da = new HanaDataAdapter(cmd);
|
||||
if (da != null)
|
||||
{
|
||||
da.Fill(dt);
|
||||
}
|
||||
con.Close();
|
||||
}
|
||||
|
||||
for (int x = 0; x < dt.Rows.Count; x++)
|
||||
{
|
||||
DocEntry = (dt.Rows[x]["DocEntry"] != DBNull.Value) ? Convert.ToInt32(dt.Rows[x]["DocEntry"]) : 0;
|
||||
}
|
||||
|
||||
return DocEntry;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user