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
840 B
C#

using System.Collections.Generic;
using Mesnac.Action.ChemicalWeighing.LjMaterial;
namespace Mesnac.Action.ChemicalWeighing.LjStock
{
public class StockDbHelp:DBHelp
{
public static int Update(StockView view)
{
string sql = @"update [Stock] set
[MTypeId] = @MTypeId,
[High] = @High,
[Slow] = @Slow,
[SlowScale] = @SlowScale,
[Lead] = @Lead,
[Jog] = @Jog where id=@id";
IDictionary<string,object> dic = GetDefault();
dic.Add("@id",view.Id);
dic.Add("@MTypeId",view.MTypeId);
dic.Add("@High",view.High);
dic.Add("@Slow",view.Slow);
dic.Add("@SlowScale",view.SlowScale);
dic.Add("@Lead",view.Lead);
dic.Add("@Jog",view.Jog);
ExecuteNonQuery(sql, dic);
return 1;
}
}
}