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 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; } } }