You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lj_plc/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjStock/StockDbHelp.cs

31 lines
877 B
C#

using System.Collections.Generic;
using System.Data;
using Mesnac.Action.ChemicalWeighing.LjMaterial;
namespace Mesnac.Action.ChemicalWeighing.LjStock
{
public class StockDbHelp:DBHelp
{
public static int Update(StockView view)
{
string sql = @"update lj_stock_material set MId=@MId ,MName=@MName where id=@id";
IDictionary<string,object> dic = GetDefault();
dic.Add("@id",view.Id);
dic.Add("@MId",view.MId);
dic.Add("@MName",view.MName);
ExecuteNonQuery(sql, dic);
return 1;
}
public static DataTable GetById(int Id)
{
string sql =
"select Id, Code, StockName, MTypeId, MTypeName, MId, MName, Remark from lj_stock_material where id=" +
Id;
return GetTable(sql);
}
}
}