コード例 #1
0
            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();
                    }
                }
            }
コード例 #2
0
                public static void set()
                {
                    List <object[]> S = new ClassDB(null).queryResonse("SELECT * FROM ProductsWeb");


                    foreach (object[] s in S)
                    {
                        ProductsWeb_ p = new ProductsWeb_();
                        p.CustomerId       = (Guid)s[0];
                        p.Visible          = (bool)((s[1] is DBNull ? false : s[1]));
                        p.Images           = s[2].ToString();
                        p.DescrCourt       = s[3].ToString();
                        p.DescrLong        = s[4].ToString();
                        p.Volume           = (decimal)(s[5] is DBNull ? 0.0m : s[5]);
                        p.UniteVolume      = (int)(s[6] is DBNull ? 0 : s[6]);
                        p.ContenanceBox    = (decimal)(s[7] is DBNull ? 0.0m : s[7]);
                        p.ContenancePallet = (decimal)(s[8] is DBNull ? 0.0m : s[8]);
                        p.Weight           = (decimal)(s[9] is DBNull ? 0.0m : s[9]);
                        p.Frozen           = (bool)(s[10] is DBNull ? false : s[10]);

                        R.Add(p);
                    }
                }