Exemple #1
0
        public SaleOptionsDVC(RootElement root, bool pushing, bool filling, JobRunTable JRT, JobInstallationViewController JIVC) : base(root, pushing)
        {
            jrt = JRT; jivc = JIVC;
            if (SaleOptionsDVC.dbSaleOptions == null || SaleOptionsDVC.dbSaleOptions.Count == 0)
            {
                dbSaleOptions = SaleOptionsDVC.ReadSaleOptions();
            }

            if (filling)
            {
                this.Root = new RootElement("Choose install options");
                Section scAllDone = new Section("");
                var     allDone   = new StringElement("Finished choosing options", "");
                scAllDone.Add(allDone);
                this.Root.Add(scAllDone);

                // fill the Tap Models section
                Section scTapModels = new Section("Tap models");
                if (dbSaleOptions != null)
                {
                    foreach (SaleOption option in dbSaleOptions)
                    {
                        if (option.Type == "Taps" && option.Active)
                        {
                            scTapModels.Add(new SaleOptionBadgeElement(option, null));
                        }
                    }
                }
                this.Root.Add(scTapModels);

                // fill the Extras section
                Section scExtras = new Section("Extras");
                if (dbSaleOptions != null)
                {
                    foreach (SaleOption option in dbSaleOptions)
                    {
                        if (option.Type != "Taps" && option.Active)
                        {
                            scExtras.Add(new SaleOptionBadgeElement(option, null));
                        }
                    }
                }
                this.Root.Add(scExtras);
            }
        }
Exemple #2
0
        public InstallTypesDVC(RootElement root, bool pushing, bool filling, JobRunTable JRT, JobInstallationViewController JIVC) : base(root, pushing)
        {
            jrt = JRT; jivc = JIVC;
            if (InstallTypesDVC.dbInstallTypes == null || InstallTypesDVC.dbInstallTypes.Count == 0)
            {
                dbInstallTypes = InstallTypesDVC.ReadInstallTypes();
            }

            if (filling)
            {
                this.Root = new RootElement("Choose install type");
                Root.Add(new Section("Install types"));

                foreach (InstallationType installType in dbInstallTypes)
                {
                    Root[0].Add(new InstallTypeBadgeElement(installType, null));
                }
            }
        }
Exemple #3
0
        public ProductsDVC(RootElement root, bool pushing, bool filling, JobRunTable JRT, JobInstallationViewController JIVC) : base(root, pushing)
        {
            jivc = JIVC;
            // jrt = JRT;
            if (ProductsDVC.dbProducts == null || ProductsDVC.dbProducts.Count == 0)
            {
                dbProducts = ProductsDVC.ReadProducts();
            }

            if (filling)
            {
                this.Root = new RootElement("Choose product");
                Root.Add(new Section("Products"));

                foreach (Product product in dbProducts)
                {
                    Root[0].Add(new ProductBadgeElement(product, null));
                }
            }
        }