示例#1
0
        public HidraRede(CarroselSubItems carousel, Puma.ModelosBanco.ItemSubItem itemSubItem, Puma.Banco.AcessoBanco conexao)
        {
            InitializeComponent();
            this.database    = conexao;
            this.itemSubItem = itemSubItem;
            this.carousel    = carousel;

            //Lista Comum
            simples.Add(new ComboBox(1, "Sim", "#008000"));
            simples.Add(new ComboBox(2, "Não", "#FF0000"));
            simples.Add(new ComboBox(3, "N/A", "#000000"));

            apontamentos.Add(new ComboBox(1, "Sim", "#FF0000"));
            apontamentos.Add(new ComboBox(2, "Não", "#008000"));
            apontamentos.Add(new ComboBox(3, "N/A", "#000000"));

            nota.Add(new ComboBox(1, "35%", "#FF0000"));
            nota.Add(new ComboBox(2, "75%", "#FF9933"));
            nota.Add(new ComboBox(3, "100%", "#008000"));

            nivelRisco.Add(new ComboBox(1, "BAIXO", "#008000"));
            nivelRisco.Add(new ComboBox(2, "MÉDIO", "#FF9933"));
            nivelRisco.Add(new ComboBox(3, "ALTO", "#FF0000"));

            //Lista Especifica
            nomenclatura.Add(new ComboBox(1, "Queimada indireta", "#000000"));
            nomenclatura.Add(new ComboBox(2, "Queimada direta", "#000000"));

            tubMaterial.Add(new ComboBox(1, "Ferro", "#000000"));
            tubMaterial.Add(new ComboBox(2, "Aço Carbono", "#000000"));
            tubMaterial.Add(new ComboBox(3, "PVC marron", "#000000"));
            tubMaterial.Add(new ComboBox(4, "CPVC Branco", "#000000"));
            tubMaterial.Add(new ComboBox(5, "Ferro Fundido", "#000000"));
            tubMaterial.Add(new ComboBox(6, "Mangueira Pex", "#000000"));
            tubMaterial.Add(new ComboBox(7, "PVC Branco", "#000000"));
            tubMaterial.Add(new ComboBox(8, "Cobre", "#000000"));
            tubMaterial.Add(new ComboBox(9, "PPR", "#000000"));
            tubMaterial.Add(new ComboBox(10, "Aço fundido", "#000000"));
            tubMaterial.Add(new ComboBox(11, "Concreto", "#000000"));

            tubAcabamento.Add(new ComboBox(1, "Isolada", "#008000"));
            tubAcabamento.Add(new ComboBox(2, "Sem pintura", "#FF0000"));
            tubAcabamento.Add(new ComboBox(3, "Sem isolação", "#FF0000"));
            tubAcabamento.Add(new ComboBox(4, "Pintura Ok", "#008000"));
            tubAcabamento.Add(new ComboBox(5, "Ok", "#008000"));
            tubAcabamento.Add(new ComboBox(6, "Envelopada", "#008000"));

            tubVazamento.Add(new ComboBox(1, "Sim", "#FF0000"));
            tubVazamento.Add(new ComboBox(2, "Não", "#008000"));
            tubVazamento.Add(new ComboBox(3, "Irregular", "#FF0000"));


            tubFixacao.Add(new ComboBox(1, "Ok", "#008000"));
            tubFixacao.Add(new ComboBox(2, "Irregular", "#FF0000"));
            tubFixacao.Add(new ComboBox(3, "Vazando", "#FF0000"));
            tubFixacao.Add(new ComboBox(4, "Corrosão", "#FF0000"));
            tubFixacao.Add(new ComboBox(5, "Sem Canopla", "#FF0000"));
            tubFixacao.Add(new ComboBox(6, "Travado", "#FF0000"));

            regInstalacao.Add(new ComboBox(1, "Ok", "#008000"));
            regInstalacao.Add(new ComboBox(2, "Irregular", "#FF0000"));
            regInstalacao.Add(new ComboBox(3, "Sem identificação", "#FF0000"));

            regAcabamento.Add(new ComboBox(1, "Ok", "#008000"));
            regAcabamento.Add(new ComboBox(2, "Irregular", "#FF0000"));
            regAcabamento.Add(new ComboBox(3, "Sem identificação", "#FF0000"));

            regFixacao.Add(new ComboBox(1, "Ok", "#008000"));
            regFixacao.Add(new ComboBox(2, "Irregular", "#FF0000"));

            PickerNomenclatura.ItemsSource           = nomenclatura;
            PickerNomenclatura.SelectedIndexChanged += this.PickerSimpleChanged;


            //---------- Simples ---------

            PickerAuditado.ItemsSource           = simples;
            PickerAuditado.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerPlanejado.ItemsSource           = simples;
            PickerPlanejado.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerExecutado.ItemsSource          = simples;
            PickerAuditado.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerApontamentos.ItemsSource           = apontamentos;
            PickerApontamentos.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerNivelRisco.ItemsSource           = nivelRisco;
            PickerNivelRisco.SelectedIndexChanged += this.PickerSimpleChanged;

            //------------ Tubulação ------------ -
            PickerTubMaterial.ItemsSource           = tubMaterial;
            PickerTubMaterial.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerTubAcabamento.ItemsSource           = tubAcabamento;
            PickerTubAcabamento.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerTubVazamento.ItemsSource           = tubVazamento;
            PickerTubVazamento.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerTubFixacao.ItemsSource           = tubFixacao;
            PickerTubFixacao.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerNotaTub.ItemsSource           = nota;
            PickerNotaTub.SelectedIndexChanged += this.PickerNotaChanged;
            //----------------  Registros --------

            PickerRegInstalacao.ItemsSource           = regInstalacao;
            PickerRegInstalacao.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerRegAcabamento.ItemsSource           = regAcabamento;
            PickerRegAcabamento.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerRegFixacao.ItemsSource           = regFixacao;
            PickerRegFixacao.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerNotaReg.ItemsSource           = nota;
            PickerNotaReg.SelectedIndexChanged += this.PickerNotaChanged;

            this.CarregaDoBanco();
        }
示例#2
0
        public HidraBombas(CarroselSubItems carousel, Puma.ModelosBanco.ItemSubItem itemSubItem, Puma.Banco.AcessoBanco conexao)
        {
            InitializeComponent();
            this.database    = conexao;
            this.itemSubItem = itemSubItem;
            this.carousel    = carousel;

            //Lista Comum
            simples.Add(new ComboBox(1, "Sim", "#008000"));
            simples.Add(new ComboBox(2, "Não", "#FF0000"));
            simples.Add(new ComboBox(3, "N/A", "#000000"));

            apontamentos.Add(new ComboBox(1, "Sim", "#FF0000"));
            apontamentos.Add(new ComboBox(2, "Não", "#008000"));
            apontamentos.Add(new ComboBox(3, "N/A", "#000000"));

            nota.Add(new ComboBox(1, "35%", "#FF0000"));
            nota.Add(new ComboBox(2, "75%", "#FF9933"));
            nota.Add(new ComboBox(3, "100%", "#008000"));

            nivelRisco.Add(new ComboBox(1, "BAIXO", "#008000"));
            nivelRisco.Add(new ComboBox(2, "MÉDIO", "#FF9933"));
            nivelRisco.Add(new ComboBox(3, "ALTO", "#FF0000"));

            //Lista Especifica
            nomenclatura.Add(new ComboBox(1, "Rede de água fria", "#000000"));
            nomenclatura.Add(new ComboBox(2, "Rede de água quente", "#000000"));

            bombaAcoplamento.Add(new ComboBox(1, "Ok", "#008000"));
            bombaAcoplamento.Add(new ComboBox(2, "Irregular", "#FF0000"));
            bombaAcoplamento.Add(new ComboBox(3, "Alinhado", "#008000"));
            bombaAcoplamento.Add(new ComboBox(4, "Não Alinhado", "#FF0000"));
            bombaAcoplamento.Add(new ComboBox(5, "Gaxeta irregular", "#FF0000"));

            bombaRolamentos.Add(new ComboBox(1, "Com ruídos", "#FF0000"));
            bombaRolamentos.Add(new ComboBox(2, "Com vibrações", "#FF0000"));
            bombaRolamentos.Add(new ComboBox(3, "Ok", "#008000"));
            bombaRolamentos.Add(new ComboBox(4, "Irregular", "#FF0000"));

            bombaSeloMecanico.Add(new ComboBox(1, "Ok", "#008000"));
            bombaSeloMecanico.Add(new ComboBox(2, "Irregular", "#FF0000"));
            bombaSeloMecanico.Add(new ComboBox(3, "Vazando", "#FF0000"));

            bombaAquecimento.Add(new ComboBox(1, "Sim", "#FF0000"));
            bombaAquecimento.Add(new ComboBox(2, "Não", "#008000"));

            bombaPintura.Add(new ComboBox(1, "Ok", "#008000"));
            bombaPintura.Add(new ComboBox(2, "Oxidada", "#FF0000"));
            bombaPintura.Add(new ComboBox(3, "Irregular", "#FF0000"));

            bombaStatusGeral.Add(new ComboBox(1, "Ok", "#008000"));
            bombaStatusGeral.Add(new ComboBox(2, "irregular", "#FF0000"));
            bombaStatusGeral.Add(new ComboBox(3, "Crítica", "#FF0000"));

            bfeFixacao.Add(new ComboBox(1, "Ok", "#008000"));
            bfeFixacao.Add(new ComboBox(2, "Irregular", "#FF0000"));
            bfeFixacao.Add(new ComboBox(3, "Não tem", "#FF0000"));

            bfeVibStop.Add(new ComboBox(1, "Ok", "#008000"));
            bfeVibStop.Add(new ComboBox(2, "Irregular", "#FF0000"));
            bfeVibStop.Add(new ComboBox(3, "Não tem", "#FF0000"));

            bfeInstaEletrica.Add(new ComboBox(1, "Ok", "#008000"));
            bfeInstaEletrica.Add(new ComboBox(2, "Irregular", "#FF0000"));

            bfeStatusGeral.Add(new ComboBox(1, "Ok", "#008000"));
            bfeStatusGeral.Add(new ComboBox(2, "Solto", "#FF0000"));
            bfeStatusGeral.Add(new ComboBox(3, "Com corrosão", "#FF0000"));
            bfeStatusGeral.Add(new ComboBox(4, "NA", "#008000"));
            bfeStatusGeral.Add(new ComboBox(5, "Irregular", "#FF0000"));


            PickerNomenclatura.ItemsSource = nomenclatura;
            //---------- Simples ---------

            PickerAuditado.ItemsSource     = simples;
            PickerPlanejado.ItemsSource    = simples;
            PickerExecutado.ItemsSource    = simples;
            PickerApontamentos.ItemsSource = apontamentos;
            PickerNivelRisco.ItemsSource   = nivelRisco;

            //------------Bomba ---------------- -

            PickerBombaRolamentos.ItemsSource   = bombaRolamentos;
            PickerBombaAcoplamento.ItemsSource  = bombaAcoplamento;
            PickerBombaSeloMecanico.ItemsSource = bombaSeloMecanico;
            PickerBombaAquecimento.ItemsSource  = bombaAquecimento;
            PickerBombaPintura.ItemsSource      = bombaPintura;
            PickerBombaStatusGeral.ItemsSource  = bombaStatusGeral;
            PickerNotaBomba.ItemsSource         = nota;
            //---------------Bomba Fixação--------------

            PickerBfeFixacao.ItemsSource       = bfeFixacao;
            PickerBfeVibStop.ItemsSource       = bfeVibStop;
            PickerBfeInstaEletrica.ItemsSource = bfeInstaEletrica;
            PickerBfeStatusGeral.ItemsSource   = bfeStatusGeral;
            PickerNotaBfe.ItemsSource          = nota;

            this.CarregaDoBanco();
        }
示例#3
0
        public Reservatorios(CarroselSubItems carousel, Puma.ModelosBanco.ItemSubItem itemSubItem, Puma.Banco.AcessoBanco conexao)
        {
            InitializeComponent();
            this.database    = conexao;
            this.itemSubItem = itemSubItem;
            this.carousel    = carousel;


            simples.Add(new ComboBox(1, "Sim", "#008000"));
            simples.Add(new ComboBox(2, "Não", "#FF0000"));
            simples.Add(new ComboBox(3, "N/A", "#000000"));

            apontamentos.Add(new ComboBox(1, "Sim", "#FF0000"));
            apontamentos.Add(new ComboBox(2, "Não", "#008000"));
            apontamentos.Add(new ComboBox(3, "N/A", "#000000"));

            nomeclatura.Add(new ComboBox(1, "Incêndio", "#000000"));
            nomeclatura.Add(new ComboBox(2, "Consumo", "#000000"));
            nomeclatura.Add(new ComboBox(3, "Reuso", "#000000"));
            nomeclatura.Add(new ComboBox(4, "Consumo/Incêndio", "#000000"));

            tipo.Add(new ComboBox(1, "Concreto", "#000000"));
            tipo.Add(new ComboBox(2, "Fibra", "#000000"));
            tipo.Add(new ComboBox(3, "Polietileno", "#000000"));
            tipo.Add(new ComboBox(4, "Metálico", "#000000"));

            fechamento.Add(new ComboBox(1, "Cadeado", "#008000"));
            fechamento.Add(new ComboBox(2, "Não tem", "#FF0000"));
            fechamento.Add(new ComboBox(3, "Irregular", "#FF0000"));
            fechamento.Add(new ComboBox(4, "Ok", "#008000"));

            hermetico.Add(new ComboBox(1, "Sim", "#008000"));
            hermetico.Add(new ComboBox(2, "Não", "#FF0000"));
            hermetico.Add(new ComboBox(3, "Irregular", "#FF0000"));
            hermetico.Add(new ComboBox(4, "N/A", "#000000"));

            statusgeral.Add(new ComboBox(1, "Corrosão", "#FF0000"));
            statusgeral.Add(new ComboBox(2, "Danificada", "#FF0000"));
            statusgeral.Add(new ComboBox(3, "Irregular", "#FF0000"));
            statusgeral.Add(new ComboBox(4, "Ok", "#008000"));

            nota.Add(new ComboBox(1, "35%", "#FF0000"));
            nota.Add(new ComboBox(2, "75%", "#FF9933"));
            nota.Add(new ComboBox(3, "100%", "#008000"));

            tipoIper.Add(new ComboBox(1, "Asfáltica", "#000000"));
            tipoIper.Add(new ComboBox(2, "Rígida", "#000000"));
            tipoIper.Add(new ComboBox(3, "Flexivel", "#000000"));
            tipoIper.Add(new ComboBox(4, "Polimérica", "#000000"));

            estruturaIper.Add(new ComboBox(1, "Corrosão", "#FF0000"));
            estruturaIper.Add(new ComboBox(2, "Ok", "#008000"));
            estruturaIper.Add(new ComboBox(3, "Irregular", "#FF0000"));
            estruturaIper.Add(new ComboBox(4, "Pontos aparente", "#FF0000"));


            statusIper.Add(new ComboBox(1, "Ok", "#008000"));
            statusIper.Add(new ComboBox(2, "Irregular", "#FF0000"));
            statusIper.Add(new ComboBox(3, "Soltando", "#FF0000"));
            statusIper.Add(new ComboBox(4, "Com bolhas", "#FF0000"));
            statusIper.Add(new ComboBox(5, "Com fissuras", "#FF0000"));
            statusIper.Add(new ComboBox(6, "Sem proteção", "#FF0000"));

            aguaLimp.Add(new ComboBox(1, "Limpa", "#008000"));
            aguaLimp.Add(new ComboBox(2, "Turva", "#FF0000"));
            aguaLimp.Add(new ComboBox(3, "Com partículas", "#FF0000"));

            boiaLimp.Add(new ComboBox(1, "Ok", "#008000"));
            boiaLimp.Add(new ComboBox(2, "Irregular", "#FF0000"));
            boiaLimp.Add(new ComboBox(3, "Não Tem", "#FF0000"));
            boiaLimp.Add(new ComboBox(4, "Elétrica irregular", "#FF0000"));

            statusLimp.Add(new ComboBox(1, "Ok", "#008000"));
            statusLimp.Add(new ComboBox(2, "Irregular", "#FF0000"));
            statusLimp.Add(new ComboBox(3, "Critíco", "#FF0000"));

            nivelRisco.Add(new ComboBox(1, "BAIXO", "#008000"));
            nivelRisco.Add(new ComboBox(2, "MÉDIO", "#FF9933"));
            nivelRisco.Add(new ComboBox(3, "ALTO", "#FF0000"));

            //Picker Simples
            PickerApontamentos.ItemsSource           = apontamentos;
            PickerApontamentos.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerExecutado.ItemsSource           = simples;
            PickerExecutado.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerPlanejado.ItemsSource           = simples;
            PickerPlanejado.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerAuditado.ItemsSource           = simples;
            PickerAuditado.SelectedIndexChanged += this.PickerSimpleChanged;

            //Pickers Especificos

            PickerTipo.ItemsSource           = tipo;
            PickerTipo.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerNomenclatura.ItemsSource       = nomeclatura;
            PickerAuditado.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerFechamento.ItemsSource           = nomeclatura;
            PickerFechamento.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerHermetico.ItemsSource           = nomeclatura;
            PickerHermetico.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerStatusGeral.ItemsSource           = statusgeral;
            PickerStatusGeral.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerNotaPortinhola.ItemsSource           = nota;
            PickerNotaPortinhola.SelectedIndexChanged += this.PickerNotaChanged;

            PickerNotaIper.ItemsSource           = nota;
            PickerNotaIper.SelectedIndexChanged += this.PickerNotaChanged;

            PickerStatusGeralIper.ItemsSource           = statusIper;
            PickerStatusGeralIper.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerEstruturaIper.ItemsSource           = estruturaIper;
            PickerEstruturaIper.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerTipoIper.ItemsSource           = tipoIper;
            PickerTipoIper.SelectedIndexChanged += this.PickerSimpleChanged;


            PickerAguaLimp.ItemsSource           = aguaLimp;
            PickerAguaLimp.SelectedIndexChanged += this.PickerSimpleChanged;


            PickerBoiaLimp.ItemsSource           = boiaLimp;
            PickerBoiaLimp.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerStatusGeralLimp.ItemsSource           = statusLimp;
            PickerStatusGeralLimp.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerNotaLimp.ItemsSource           = nota;
            PickerNotaLimp.SelectedIndexChanged += this.PickerNotaChanged;


            PickerNivelRisco.ItemsSource           = nivelRisco;
            PickerNivelRisco.SelectedIndexChanged += this.PickerSimpleChanged;

            this.CarregaDoBanco();
            this.CalculaNotaFinal();
        }
示例#4
0
        public CarroselSubItems(Puma.ModelosBanco.Subitemsetor subItemSetorSelected, Puma.Banco.AcessoBanco conexao)
        {
            InitializeComponent();
            this.subItemSetor = subItemSetorSelected;
            this.database     = conexao;
            this.Title        = subItemSetorSelected.Nome;
            listItemSubItem   = database.GetListItemsSubItem(subItemSetorSelected);
            switch (subItemSetorSelected.Idsetor)
            {
            case 1:
                switch (subItemSetorSelected.Id)
                {
                case 1:
                    Children.Add(new InstaEletQuadrosEltricos());
                    break;

                case 2:
                    Children.Add(new InstaEletGeradorEnergia());
                    break;

                case 3:
                    Children.Add(new InstaEletCabinePrimaria());
                    break;

                case 4:
                    Children.Add(new InstaEletParaRaio());
                    break;

                case 5:
                    Children.Add(new InstaEletCabeamento());
                    break;

                case 6:
                    Children.Add(new InstaEletEletrodutos());
                    break;
                }
                break;

            case 2:
                switch (subItemSetorSelected.Id)
                {
                case 1:
                    Children.Add(new HvacChiller());
                    break;

                case 2:
                    Children.Add(new HvacTorreResfriamento());
                    break;

                case 3:
                    Children.Add(new HvacBombas());
                    break;

                case 4:
                    Children.Add(new HvacTubAguaGelada());
                    break;

                case 5:
                    Children.Add(new HvacTubGasRefri());
                    break;

                case 6:
                    Children.Add(new HvacIsolamentoTub());
                    break;

                case 7:
                    Children.Add(new HvacIsolamentoTub());
                    break;

                case 8:
                    Children.Add(new HvacEvaporadora());
                    break;

                case 9:
                    Children.Add(new HvacVentilacao());
                    break;
                }
                break;

            case 3:
                switch (subItemSetorSelected.Id)
                {
                case 1:
                    if (listItemSubItem.Count != 0)
                    {
                        for (var i = 0; i < listItemSubItem.Count; i++)
                        {
                            //hidra = new HidraBarrilhete(this, listItemSubItem[i], database);
                            Children.Add(new Reservatorios(this, listItemSubItem[i], database));
                        }
                    }
                    else
                    {
                        Puma.ModelosBanco.ItemSubItem subItem = new Puma.ModelosBanco.ItemSubItem();
                        subItem.RelatoriosId = subItemSetorSelected.Idrelatorio;
                        subItem.Idsetor      = subItemSetorSelected.Idsetor;
                        subItem.Idsubitem    = subItemSetorSelected.Id;
                        subItem.Contador     = 1;
                        database.CreateItemSubItem(subItem);

                        Puma.ModelosBanco.Subitemsetor subSetor = new Puma.ModelosBanco.Subitemsetor();
                        subSetor = database.GetSubItemSetor(subItem.RelatoriosId, subItem.Idsetor, subItem.Idsubitem);
                        if (subSetor != null)
                        {
                            subSetor.Quantidade = subItem.Contador;
                            database.UpdateeSubItemSetor(subSetor);
                        }

                        Children.Add(new Reservatorios(this, subItem, database));
                    }
                    break;

                case 2:
                    //HidraBarrilhete hidra = null;
                    if (listItemSubItem.Count != 0)
                    {
                        for (var i = 0; i < listItemSubItem.Count; i++)
                        {
                            //hidra = new HidraBarrilhete(this, listItemSubItem[i], database);
                            Children.Add(new HidraBarrilhete(this, listItemSubItem[i], database));
                        }
                    }
                    else
                    {
                        Puma.ModelosBanco.ItemSubItem subItem = new Puma.ModelosBanco.ItemSubItem();
                        subItem.RelatoriosId = subItemSetorSelected.Idrelatorio;
                        subItem.Idsetor      = subItemSetorSelected.Idsetor;
                        subItem.Idsubitem    = subItemSetorSelected.Id;
                        subItem.Contador     = 1;
                        database.CreateItemSubItem(subItem);
                        Puma.ModelosBanco.Subitemsetor subSetor = new Puma.ModelosBanco.Subitemsetor();
                        subSetor = database.GetSubItemSetor(subItem.RelatoriosId, subItem.Idsetor, subItem.Idsubitem);
                        if (subSetor != null)
                        {
                            subSetor.Quantidade = subItem.Contador;
                            database.UpdateeSubItemSetor(subSetor);
                        }

                        Children.Add(new HidraBarrilhete(this, subItem, database));
                    }
                    break;

                case 3:
                    if (listItemSubItem.Count != 0)
                    {
                        for (var i = 0; i < listItemSubItem.Count; i++)
                        {
                            //hidra = new HidraBarrilhete(this, listItemSubItem[i], database);
                            Children.Add(new HidraGeradorAguaQuente(this, listItemSubItem[i], database));
                        }
                    }
                    else
                    {
                        Puma.ModelosBanco.ItemSubItem subItem = new Puma.ModelosBanco.ItemSubItem();
                        subItem.RelatoriosId = subItemSetorSelected.Idrelatorio;
                        subItem.Idsetor      = subItemSetorSelected.Idsetor;
                        subItem.Idsubitem    = subItemSetorSelected.Id;
                        subItem.Contador     = 1;
                        database.CreateItemSubItem(subItem);
                        Puma.ModelosBanco.Subitemsetor subSetor = new Puma.ModelosBanco.Subitemsetor();
                        subSetor = database.GetSubItemSetor(subItem.RelatoriosId, subItem.Idsetor, subItem.Idsubitem);
                        if (subSetor != null)
                        {
                            subSetor.Quantidade = subItem.Contador;
                            database.UpdateeSubItemSetor(subSetor);
                        }
                        Children.Add(new HidraGeradorAguaQuente(this, subItem, database));
                    }
                    break;

                case 4:
                    if (listItemSubItem.Count != 0)
                    {
                        for (var i = 0; i < listItemSubItem.Count; i++)
                        {
                            //hidra = new HidraBarrilhete(this, listItemSubItem[i], database);
                            Children.Add(new HidraRede(this, listItemSubItem[i], database));
                        }
                    }
                    else
                    {
                        Puma.ModelosBanco.ItemSubItem subItem = new Puma.ModelosBanco.ItemSubItem();
                        subItem.RelatoriosId = subItemSetorSelected.Idrelatorio;
                        subItem.Idsetor      = subItemSetorSelected.Idsetor;
                        subItem.Idsubitem    = subItemSetorSelected.Id;
                        subItem.Contador     = 1;
                        database.CreateItemSubItem(subItem);
                        Puma.ModelosBanco.Subitemsetor subSetor = new Puma.ModelosBanco.Subitemsetor();
                        subSetor = database.GetSubItemSetor(subItem.RelatoriosId, subItem.Idsetor, subItem.Idsubitem);
                        if (subSetor != null)
                        {
                            subSetor.Quantidade = subItem.Contador;
                            database.UpdateeSubItemSetor(subSetor);
                        }
                        Children.Add(new HidraRede(this, subItem, database));
                    }
                    break;

                case 5:
                    if (listItemSubItem.Count != 0)
                    {
                        for (var i = 0; i < listItemSubItem.Count; i++)
                        {
                            //hidra = new HidraBarrilhete(this, listItemSubItem[i], database);
                            Children.Add(new HidraBombas(this, listItemSubItem[i], database));
                        }
                    }
                    else
                    {
                        Puma.ModelosBanco.ItemSubItem subItem = new Puma.ModelosBanco.ItemSubItem();
                        subItem.RelatoriosId = subItemSetorSelected.Idrelatorio;
                        subItem.Idsetor      = subItemSetorSelected.Idsetor;
                        subItem.Idsubitem    = subItemSetorSelected.Id;
                        subItem.Contador     = 1;
                        database.CreateItemSubItem(subItem);
                        Puma.ModelosBanco.Subitemsetor subSetor = new Puma.ModelosBanco.Subitemsetor();
                        subSetor = database.GetSubItemSetor(subItem.RelatoriosId, subItem.Idsetor, subItem.Idsubitem);
                        if (subSetor != null)
                        {
                            subSetor.Quantidade = subItem.Contador;
                            database.UpdateeSubItemSetor(subSetor);
                        }
                        Children.Add(new HidraBombas(this, subItem, database));
                    }
                    break;

                case 6:
                    if (listItemSubItem.Count != 0)
                    {
                        for (var i = 0; i < listItemSubItem.Count; i++)
                        {
                            //hidra = new HidraBarrilhete(this, listItemSubItem[i], database);
                            Children.Add(new HidraRedeGas(this, listItemSubItem[i], database));
                        }
                    }
                    else
                    {
                        Puma.ModelosBanco.ItemSubItem subItem = new Puma.ModelosBanco.ItemSubItem();
                        subItem.RelatoriosId = subItemSetorSelected.Idrelatorio;
                        subItem.Idsetor      = subItemSetorSelected.Idsetor;
                        subItem.Idsubitem    = subItemSetorSelected.Id;
                        subItem.Contador     = 1;
                        database.CreateItemSubItem(subItem);
                        Puma.ModelosBanco.Subitemsetor subSetor = new Puma.ModelosBanco.Subitemsetor();
                        subSetor = database.GetSubItemSetor(subItem.RelatoriosId, subItem.Idsetor, subItem.Idsubitem);
                        if (subSetor != null)
                        {
                            subSetor.Quantidade = subItem.Contador;
                            database.UpdateeSubItemSetor(subSetor);
                        }
                        Children.Add(new HidraRedeGas(this, subItem, database));
                    }
                    break;

                case 7:
                    Children.Add(new HidraEtaReuso());
                    break;

                case 8:
                    Children.Add(new HidraEtaEsgoto());
                    break;
                }
                break;

            case 4:
                switch (subItemSetorSelected.Id)
                {
                case 1:
                    //this.Title = "Salas Administrativas";
                    Children.Add(new EdificacoesSalasAdministrativas());
                    break;

                case 2:
                    //this.Title = "Salas técnicas";
                    Children.Add(new EdificacoesSalasTecnicas());
                    break;

                case 3:
                    //this.Title = "Fachada";
                    Children.Add(new EdificacoesFachada());
                    break;

                case 4:
                    //this.Title = "Áreas externas";
                    Children.Add(new EdificacoesAreasExternas());
                    break;

                case 5:
                    //this.Title = "Cobertura";
                    Children.Add(new EdificacoesCobertura());
                    break;

                case 6:
                    //this.Title = "Estacionamentos";
                    Children.Add(new EdificacoesEstacionamentos());
                    break;

                case 7:
                    //this.Title = "Áreas operacionais";
                    Children.Add(new EdificacoesAreasOperacionais());
                    break;

                case 8:
                    //this.Title = "Sanitários";
                    Children.Add(new EdificacoesSanitarios());
                    break;

                case 9:
                    //this.Title = "Piscina";
                    Children.Add(new EdificacoesPiscina());
                    break;

                case 10:
                    //this.Title = "Cozinha";
                    Children.Add(new EdificacoesCozinha());
                    break;

                case 11:
                    //this.Title = "Apartamento Hotel";
                    Children.Add(new EdificacoesApartamentoHote());
                    break;

                case 12:
                    //this.Title = "Banheiros";
                    Children.Add(new EdificacoesBanheiro());
                    break;
                }

                break;

            case 5:
                switch (subItemSetorSelected.Id)
                {
                case 1:
                    //this.Title = "Rede de Sprinklers";
                    Children.Add(new EdificacoesSalasAdministrativas());
                    break;

                case 2:
                    //this.Title = "Rede de hidrante";
                    Children.Add(new EdificacoesSalasTecnicas());
                    break;

                case 3:
                    //this.Title = "Central de Alarme";
                    Children.Add(new EdificacoesFachada());
                    break;

                case 4:
                    //this.Title = "Iluminação de emergência";
                    Children.Add(new EdificacoesAreasExternas());
                    break;

                case 5:
                    //this.Title = "Sinalização de emergência";
                    Children.Add(new EdificacoesCobertura());
                    break;

                case 6:
                    //this.Title = "Escadas de emergência";
                    Children.Add(new EdificacoesEstacionamentos());
                    break;

                case 7:
                    //this.Title = "Extintores";
                    Children.Add(new EdificacoesAreasOperacionais());
                    break;
                }
                break;

            case 6:
                switch (subItemSetorSelected.Id)
                {
                case 1:
                    //this.Title = "Casa de Máquinas";
                    Children.Add(new ElevadoresMaquina());
                    break;

                case 2:
                    //this.Title = "Cabine dos elevadores";
                    Children.Add(new ElevadoresCabineElevadores());
                    break;
                }
                break;

            case 7:
                switch (subItemSetorSelected.Id)
                {
                case 1:
                    //this.Title = "Ar Condicionado - PMOC";
                    Children.Add(new RelatorioArCondicionado());
                    break;

                case 2:
                    //this.Title = "Elevadores";
                    Children.Add(new RelatoriosElevadores());
                    break;

                case 3:
                    //this.Title = "Cabine Primária";
                    Children.Add(new RelatoriosCabinePrimaria());
                    break;

                case 4:
                    //this.Title = "Limpeza de caixa de água";
                    Children.Add(new RelatoriosLimpezaCaixa());
                    break;

                case 5:
                    //this.Title = "Sistema Combate a incêndio";
                    Children.Add(new RelatoriosCombateInc());
                    break;

                case 6:
                    //this.Title = "Desintetização";
                    Children.Add(new RelatorioDetetizacao());
                    break;

                case 7:
                    //this.Title = "Para raio";
                    Children.Add(new RelatorioParaRaio());
                    break;

                case 8:
                    //this.Title = "Geradora de água quente";
                    Children.Add(new RelatorioGeradorAguaQuente());
                    break;

                case 9:
                    //this.Title = "Laudo da NR 13";
                    Children.Add(new RelatorioLaudoNR13());
                    break;
                }
                break;
            }
        }
        public HidraBarrilhete(CarroselSubItems carousel, Puma.ModelosBanco.ItemSubItem itemSubItem, Puma.Banco.AcessoBanco conexao)
        {
            this.database    = conexao;
            this.itemSubItem = itemSubItem;
            this.carousel    = carousel;
            InitializeComponent();

            simples.Add(new ComboBox(1, "Sim", "#008000"));
            simples.Add(new ComboBox(2, "Não", "#FF0000"));
            simples.Add(new ComboBox(3, "N/A", "#000000"));

            apontamentos.Add(new ComboBox(1, "Sim", "#FF0000"));
            apontamentos.Add(new ComboBox(2, "Não", "#008000"));
            apontamentos.Add(new ComboBox(3, "N/A", "#000000"));

            nomeclatura.Add(new ComboBox(1, "Caixa inferior", "#000000"));
            nomeclatura.Add(new ComboBox(2, "Caixa Superior", "#000000"));
            nomeclatura.Add(new ComboBox(3, "Caixa Reuso", "#000000"));

            nota.Add(new ComboBox(1, "35%", "#FF0000"));
            nota.Add(new ComboBox(2, "75%", "#FF9933"));
            nota.Add(new ComboBox(3, "100%", "#008000"));

            nivelRisco.Add(new ComboBox(1, "BAIXO", "#008000"));
            nivelRisco.Add(new ComboBox(2, "MÉDIO", "#FF9933"));
            nivelRisco.Add(new ComboBox(3, "ALTO", "#FF0000"));

            bomba_rolamentos.Add(new ComboBox(1, "Com ruídos", "#FF0000"));
            bomba_rolamentos.Add(new ComboBox(2, "Com vibrações", "#FF0000"));
            bomba_rolamentos.Add(new ComboBox(3, "Ok", "#008000"));
            bomba_rolamentos.Add(new ComboBox(4, "Irregular", "#FF0000"));

            bomba_acoplamentos.Add(new ComboBox(1, "Ok", "#008000"));
            bomba_acoplamentos.Add(new ComboBox(2, "Irregular", "#FF0000"));
            bomba_acoplamentos.Add(new ComboBox(3, "Alinhado", "#008000"));
            bomba_acoplamentos.Add(new ComboBox(4, "Não Alinhado", "#FF0000"));
            bomba_acoplamentos.Add(new ComboBox(5, "Gaxeta irregular", "#FF0000"));

            bomba_selomecanico.Add(new ComboBox(1, "Ok", "#008000"));
            bomba_selomecanico.Add(new ComboBox(2, "Irregular", "#FF0000"));
            bomba_selomecanico.Add(new ComboBox(3, "Vazando", "#FF0000"));

            bomba_aquecimento.Add(new ComboBox(1, "Sim", "#FF0000"));
            bomba_aquecimento.Add(new ComboBox(2, "Não", "#008000"));

            bomba_pintura.Add(new ComboBox(1, "Ok", "#008000"));
            bomba_pintura.Add(new ComboBox(2, "Oxidada", "#FF0000"));
            bomba_pintura.Add(new ComboBox(3, "Irregular", "#FF0000"));

            bomba_statusgeral.Add(new ComboBox(1, "Ok", "#008000"));
            bomba_statusgeral.Add(new ComboBox(2, "irregular", "#FF0000"));
            bomba_statusgeral.Add(new ComboBox(3, "Crítica", "#FF0000"));


            bfe_fixacao.Add(new ComboBox(1, "Ok", "#008000"));
            bfe_fixacao.Add(new ComboBox(2, "Irregular", "#FF0000"));
            bfe_fixacao.Add(new ComboBox(3, "Não tem", "#FF0000"));

            bfe_vibrastop.Add(new ComboBox(1, "Ok", "#008000"));
            bfe_vibrastop.Add(new ComboBox(2, "Irregular", "#FF0000"));
            bfe_vibrastop.Add(new ComboBox(3, "Não tem", "#FF0000"));

            bfe_insteltrica.Add(new ComboBox(1, "Ok", "#008000"));
            bfe_insteltrica.Add(new ComboBox(2, "Irregular", "#FF0000"));

            bfe_statusgeral.Add(new ComboBox(1, "Ok", "#008000"));
            bfe_statusgeral.Add(new ComboBox(2, "Solto", "#FF0000"));
            bfe_statusgeral.Add(new ComboBox(3, "Com corrosão", "#000000"));
            bfe_statusgeral.Add(new ComboBox(4, "NA", "#008000"));
            bfe_statusgeral.Add(new ComboBox(5, "Irregular", "#FF0000"));

            tub_material.Add(new ComboBox(1, "Ferro", "#000000"));
            tub_material.Add(new ComboBox(2, "Aço Carbono", "#000000"));
            tub_material.Add(new ComboBox(3, "PVC marron", "#000000"));
            tub_material.Add(new ComboBox(4, "CPVC Branco", "#000000"));
            tub_material.Add(new ComboBox(5, "Ferro Fundido", "#000000"));
            tub_material.Add(new ComboBox(6, "Mangueira Pex", "#000000"));
            tub_material.Add(new ComboBox(7, "PVC Branco", "#000000"));
            tub_material.Add(new ComboBox(8, "Cobre", "#000000"));
            tub_material.Add(new ComboBox(9, "PPR", "#000000"));
            tub_material.Add(new ComboBox(10, "Aço fundido", "#000000"));
            tub_material.Add(new ComboBox(11, "Concreto", "#000000"));

            tub_acabemento.Add(new ComboBox(1, "Isolada", "#008000"));
            tub_acabemento.Add(new ComboBox(2, "Sem pintura", "#FF0000"));
            tub_acabemento.Add(new ComboBox(3, "Sem isolação", "#FF0000"));
            tub_acabemento.Add(new ComboBox(4, "Pintura Ok", "#008000"));
            tub_acabemento.Add(new ComboBox(5, "Ok", "#008000"));
            tub_acabemento.Add(new ComboBox(6, "Envelopada", "#008000"));

            tub_vazamento.Add(new ComboBox(1, "Sim", "#FF0000"));
            tub_vazamento.Add(new ComboBox(2, "Não", "#008000"));
            tub_vazamento.Add(new ComboBox(3, "Irregular", "#FF0000"));


            tub_fixacao.Add(new ComboBox(1, "Ok", "#008000"));
            tub_fixacao.Add(new ComboBox(2, "Irregular", "#FF0000"));
            tub_fixacao.Add(new ComboBox(3, "Vazando", "#FF0000"));
            tub_fixacao.Add(new ComboBox(4, "Corrosão", "#FF0000"));
            tub_fixacao.Add(new ComboBox(5, "Sem Canopla", "#FF0000"));
            tub_fixacao.Add(new ComboBox(6, "Travado", "#FF0000"));

            reg_instalacoes.Add(new ComboBox(1, "Ok", "#008000"));
            reg_instalacoes.Add(new ComboBox(2, "Irregular", "#FF0000"));
            reg_instalacoes.Add(new ComboBox(3, "Sem identificação", "#FF0000"));

            reg_acabamentos.Add(new ComboBox(1, "Ok", "#008000"));
            reg_acabamentos.Add(new ComboBox(2, "Irregular", "#FF0000"));
            reg_acabamentos.Add(new ComboBox(3, "Sem identificação", "#FF0000"));

            reg_fixacao.Add(new ComboBox(1, "Ok", "#008000"));
            reg_fixacao.Add(new ComboBox(2, "Irregular", "#FF0000"));

            //PickerApontamentos.ItemsSource = simples;
            //PickerApontamentos.SelectedIndexChanged += this.PickerSimplesApontamentosChanged;

            PickerNomenclatura.ItemsSource           = nomeclatura;
            PickerNomenclatura.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerAuditado.ItemsSource           = simples;
            PickerAuditado.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerPlanejado.ItemsSource           = simples;
            PickerPlanejado.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerExecutado.ItemsSource           = simples;
            PickerExecutado.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerApontamentos.ItemsSource           = apontamentos;
            PickerApontamentos.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerRolamentos.ItemsSource           = bomba_rolamentos;
            PickerRolamentos.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerAcoplamento.ItemsSource           = bomba_acoplamentos;
            PickerAcoplamento.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerSeloMecanico.ItemsSource           = bomba_selomecanico;
            PickerSeloMecanico.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerBombaAquecimento.ItemsSource           = bomba_aquecimento;
            PickerBombaAquecimento.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerBombaPintura.ItemsSource           = bomba_pintura;
            PickerBombaPintura.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerBombaStatusGeral.ItemsSource           = bomba_statusgeral;
            PickerBombaStatusGeral.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerNotaBomba.ItemsSource           = nota;
            PickerNotaBomba.SelectedIndexChanged += this.PickerNotaChanged;

            PickerBfeFixacao.ItemsSource           = bfe_fixacao;
            PickerBfeFixacao.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerBfeVibStop.ItemsSource           = bfe_vibrastop;
            PickerBfeVibStop.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerBfeInstaEletrica.ItemsSource           = bfe_insteltrica;
            PickerBfeInstaEletrica.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerBfeStatusGeral.ItemsSource           = bfe_statusgeral;
            PickerBfeStatusGeral.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerNotaBfe.ItemsSource           = nota;
            PickerNotaBfe.SelectedIndexChanged += this.PickerNotaChanged;

            PickerTubMaterial.ItemsSource           = tub_material;
            PickerTubMaterial.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerTubAcabamento.ItemsSource           = tub_acabemento;
            PickerTubAcabamento.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerTubVazamento.ItemsSource           = tub_vazamento;
            PickerTubVazamento.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerTubFixacao.ItemsSource           = tub_fixacao;
            PickerTubFixacao.SelectedIndexChanged += this.PickerSimpleChanged;

            PickerNotaTub.ItemsSource           = nota;
            PickerNotaTub.SelectedIndexChanged += this.PickerNotaChanged;

            PickerRegInstalacao.ItemsSource           = reg_instalacoes;
            PickerRegInstalacao.SelectedIndexChanged += PickerSimpleChanged;

            PickerRegAcabamento.ItemsSource           = reg_acabamentos;
            PickerRegAcabamento.SelectedIndexChanged += PickerSimpleChanged;

            PickerRegFixacao.ItemsSource           = reg_fixacao;
            PickerRegFixacao.SelectedIndexChanged += PickerSimpleChanged;

            PickerNotaReg.ItemsSource           = nota;
            PickerNotaReg.SelectedIndexChanged += PickerNotaChanged;

            PickerNivelRisco.ItemsSource           = nivelRisco;
            PickerNivelRisco.SelectedIndexChanged += this.PickerSimpleChanged;

            this.CarregaDoBanco();
        }