|
|
|
@ -75,9 +75,16 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.DB
|
|
|
|
|
|
|
|
|
|
public static int GetCodeById(int id)
|
|
|
|
|
{
|
|
|
|
|
string sql = $"select Code from lj_stock_material where Id={id}";
|
|
|
|
|
var dataTable = DBHelp.GetTable(sql);
|
|
|
|
|
return Convert.ToInt16(dataTable.Rows[0][0]);
|
|
|
|
|
|
|
|
|
|
if (id > 0)
|
|
|
|
|
{
|
|
|
|
|
string sql = $"select Code from lj_stock_material where Id={id}";
|
|
|
|
|
var dataTable = DBHelp.GetTable(sql);
|
|
|
|
|
return Convert.ToInt16(dataTable.Rows[0][0]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return id;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|