public static void syncAll() { // if (!new ClassSync.LastUpdDB().getUpd()) { if (connect) { Products.L.Clear(); ProductsBC_.list.Clear(); StockReal.L.Clear(); TVA_.L.Clear(); SubGrpProduct.L.Clear(); GrpProduct.L.Clear(); infoClient.list.Clear(); ProductsBC_.set(); StockReal.set(); TVA_.set(); SubGrpProduct.set(); GrpProduct.set(); ClassGroupProduct.save(); ClassGroupProduct.loadFromFile(); ProductsWeb_.set(); Products.set(); infoClient.set(); ClassTVA.save(); ClassProducts.save(); ClassInfoClients.save(); } } }
public static void set() { List <object[]> l = new ClassDB(null).queryResonse("SELECT * FROM SubGrpNameSet"); foreach (object[] o in l) { SubGrpProduct sg = new SubGrpProduct(); sg.Id = (int)o[0]; sg.SubGroupName = (string)o[1]; sg.GrpProductId = (int)o[2]; sg.GrpProductSet = null; L.Add(sg); } }