public int Update(long ID, string PART_NUM, int? TotalInventory, int? Dallas, int? DC_AtlantaHub, int? DC_Dallas_Hub, int? DC_Elk_Grove_Hub , int? DC_Feura_Bush, int? DC_Louisville_Hub, int? DC_Reno_Hub, int? DC_Richmond_Dist_Ctr, int? Oklahama, int? RemainingBranches, DateTime? LastUpdate) { String Query = "UPDATE ADIInventory SET TotalInventory = @TotalInventory, Dallas = @Dallas, " + " DC_AtlantaHub = @DC_AtlantaHub, DC_Dallas_Hub = @DC_Dallas_Hub, DC_Elk_Grove_Hub = @DC_Elk_Grove_Hub, " + " DC_Feura_Bush = @DC_Feura_Bush, DC_Louisville_Hub = @DC_Louisville_Hub, DC_Reno_Hub = @DC_Reno_Hub, " + " DC_Richmond_Dist_Ctr = @DC_Richmond_Dist_Ctr, Oklahama = @Oklahama, RemainingBranches = @RemainingBranches, LastUpdate = @LastUpdate" + " WHERE PART_NUM = \"" + PART_NUM + "\" AND ID = " + ID.ToString(); OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true); //oDm.AddIntegerBigPara("ID", ID); //oDm.AddVarcharPara("PART_NUM", 4000, PART_NUM); oDm.AddIntegerPara("TotalInventory", TotalInventory); oDm.AddIntegerPara("Dallas", Dallas); oDm.AddIntegerPara("DC_AtlantaHub", DC_AtlantaHub); oDm.AddIntegerPara("DC_Dallas_Hub", DC_Dallas_Hub); oDm.AddIntegerPara("DC_Elk_Grove_Hub", DC_Elk_Grove_Hub); oDm.AddIntegerPara("DC_Feura_Bush", DC_Feura_Bush); oDm.AddIntegerPara("DC_Louisville_Hub", DC_Louisville_Hub); oDm.AddIntegerPara("DC_Reno_Hub", DC_Reno_Hub); oDm.AddIntegerPara("DC_Richmond_Dist_Ctr", DC_Richmond_Dist_Ctr); oDm.AddIntegerPara("Oklahama", Oklahama); oDm.AddIntegerPara("RemainingBranches", RemainingBranches); oDm.AddDateTimePara("LastUpdate", LastUpdate); return oDm.RunActionQuery(); }
public int Insert(long ID, string PART_NUM, int? TotalInventory, int? Dallas, int? DC_AtlantaHub, int? DC_Dallas_Hub, int? DC_Elk_Grove_Hub , int? DC_Feura_Bush, int? DC_Louisville_Hub, int? DC_Reno_Hub, int? DC_Richmond_Dist_Ctr, int? Oklahama, int? RemainingBranches, DateTime? LastUpdate) { String Query = "INSERT INTO ADIInventory (PART_NUM, TotalInventory, Dallas, DC_AtlantaHub, DC_Dallas_Hub, DC_Elk_Grove_Hub, DC_Feura_Bush, DC_Louisville_Hub, DC_Reno_Hub, DC_Richmond_Dist_Ctr, Oklahama, RemainingBranches, LastUpdate)" + " VALUES ( @PART_NUM, @TotalInventory, @Dallas, @DC_AtlantaHub, @DC_Dallas_Hub, @DC_Elk_Grove_Hub, @DC_Feura_Bush, @DC_Louisville_Hub, @DC_Reno_Hub, @DC_Richmond_Dist_Ctr, @Oklahama, @RemainingBranches, @LastUpdate)"; OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true); //oDm.AddIntegerBigPara("ID", ID); oDm.AddVarcharPara("PART_NUM", 4000, PART_NUM); oDm.AddIntegerPara("TotalInventory", TotalInventory); oDm.AddIntegerPara("Dallas", Dallas); oDm.AddIntegerPara("DC_AtlantaHub", DC_AtlantaHub); oDm.AddIntegerPara("DC_Dallas_Hub", DC_Dallas_Hub); oDm.AddIntegerPara("DC_Elk_Grove_Hub", DC_Elk_Grove_Hub); oDm.AddIntegerPara("DC_Feura_Bush", DC_Feura_Bush); oDm.AddIntegerPara("DC_Louisville_Hub", DC_Louisville_Hub); oDm.AddIntegerPara("DC_Reno_Hub", DC_Reno_Hub); oDm.AddIntegerPara("DC_Richmond_Dist_Ctr", DC_Richmond_Dist_Ctr); oDm.AddIntegerPara("Oklahama", Oklahama); oDm.AddIntegerPara("RemainingBranches", RemainingBranches); oDm.AddDateTimePara("LastUpdate", LastUpdate); return oDm.RunActionQuery(); }