Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            CasoSelecionado form = new CasoSelecionado();
            CasoNovo        caso = CasoNovo.getInstance();

            caso.limpa();
        }
        private void btn_avançar_Click(object sender, EventArgs e)
        {
            DaoCaso dao = new DaoCaso();

            Caso novoCaso = new Caso();

            novoCaso.caso = Convert.ToInt32(GridViewCasoscomSimilaridade.SelectedCells[0].Value.ToString());

            novoCaso = dao.search(novoCaso);

            CasoNovo casoSel = CasoNovo.getInstance();

            casoSel._id             = novoCaso._id;
            casoSel.area_damaged    = novoCaso.area_damaged;
            casoSel.canker_lesion   = novoCaso.canker_lesion;
            casoSel.caso            = novoCaso.caso;
            casoSel.crop_hist       = novoCaso.crop_hist;
            casoSel.date            = novoCaso.date;
            casoSel.doenca          = novoCaso.doenca;
            casoSel.external_decay  = novoCaso.external_decay;
            casoSel.fruiting_bodies = novoCaso.fruiting_bodies;
            casoSel.fruit_pods      = novoCaso.fruit_pods;
            casoSel.fruit_spots     = novoCaso.fruit_spots;
            casoSel.germination     = novoCaso.germination;
            casoSel.hail            = novoCaso.hail;
            casoSel.int_discolor    = novoCaso.int_discolor;
            casoSel.leafspots_halo  = novoCaso.leafspots_halo;
            casoSel.leafspots_marg  = novoCaso.leafspots_marg;
            casoSel.leafspot_size   = novoCaso.leafspot_size;
            casoSel.leaf_malf       = novoCaso.leaf_malf;
            casoSel.leaf_mild       = novoCaso.leaf_mild;
            casoSel.leaf_shread     = novoCaso.leaf_shread;
            casoSel.leaves          = novoCaso.leaves;
            casoSel.lodging         = novoCaso.lodging;
            casoSel.mold_growth     = novoCaso.mold_growth;
            casoSel.mycelium        = novoCaso.mycelium;
            casoSel.plant_growth    = novoCaso.plant_growth;
            casoSel.plant_stand     = novoCaso.plant_stand;
            casoSel.precip          = novoCaso.precip;
            casoSel.roots           = novoCaso.precip;
            casoSel.roots           = novoCaso.roots;
            casoSel.sclerotia       = novoCaso.sclerotia;
            casoSel.seed            = novoCaso.seed;
            casoSel.seed_discolor   = novoCaso.seed_discolor;
            casoSel.seed_size       = novoCaso.seed_size;
            casoSel.seed_tmt        = novoCaso.seed_tmt;
            casoSel.severity        = novoCaso.severity;
            casoSel.shriveling      = novoCaso.shriveling;
            casoSel.stem            = novoCaso.stem;
            casoSel.stem_cankers    = novoCaso.stem_cankers;
            casoSel.temp            = casoSel.temp;

            this.Hide();
            TelaFinal final = new TelaFinal();

            final.Show();
        }
Example #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            CNovoCaso controller = new CNovoCaso();

            CasoNovo      casoN = CasoNovo.getInstance();
            CasoSingleton caso  = CasoSingleton.getInstance();

            caso.doenca = doenca_textbox.Text;

            controller.gravaNovoCaso(caso);

            casoN.limpa();
            caso.limpa();

            this.Hide();
            Main main = new Main();

            main.Show();
        }
Example #4
0
        private void TelaFinal_Load(object sender, EventArgs e)
        {
            CasoNovo      casoN = CasoNovo.getInstance();
            CasoSingleton caso  = CasoSingleton.getInstance();

            ListViewItem lvi = new ListViewItem("area_damaged");

            lvi.SubItems.Add(caso.area_damaged);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("canker_lesion");
            lvi.SubItems.Add(caso.canker_lesion);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("crop_hist");
            lvi.SubItems.Add(caso.crop_hist);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("date");
            lvi.SubItems.Add(caso.date);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("external_decay");
            lvi.SubItems.Add(caso.external_decay);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("fruiting_bodies");
            lvi.SubItems.Add(caso.fruiting_bodies);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("fruit_pods");
            lvi.SubItems.Add(caso.fruit_pods);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("fruit_spots");
            lvi.SubItems.Add(caso.fruit_spots);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("germination");
            lvi.SubItems.Add(caso.germination);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("hail");
            lvi.SubItems.Add(caso.hail);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("int_discolor");
            lvi.SubItems.Add(caso.int_discolor);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("leafspots_halo");
            lvi.SubItems.Add(caso.leafspots_halo);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("leafspots_marg");
            lvi.SubItems.Add(caso.leafspots_marg);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("leafspot_size");
            lvi.SubItems.Add(caso.leafspot_size);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("leaf_malf");
            lvi.SubItems.Add(caso.leaf_malf);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("leaf_mild");
            lvi.SubItems.Add(caso.leaf_mild);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("leaf_shread");
            lvi.SubItems.Add(caso.leaf_shread);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("leaves");
            lvi.SubItems.Add(caso.leaves);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("lodging");
            lvi.SubItems.Add(caso.lodging);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("mold_growth");
            lvi.SubItems.Add(caso.mold_growth);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("mycelium");
            lvi.SubItems.Add(caso.mycelium);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("plant_growth");
            lvi.SubItems.Add(caso.plant_growth);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("plant_stand");
            lvi.SubItems.Add(caso.plant_stand);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("precip");
            lvi.SubItems.Add(caso.precip);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("roots");
            lvi.SubItems.Add(caso.roots);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("sclerotia");
            lvi.SubItems.Add(caso.sclerotia);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("seed");
            lvi.SubItems.Add(caso.seed);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("seed_discolor");
            lvi.SubItems.Add(caso.seed_discolor);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("seed_size");
            lvi.SubItems.Add(caso.seed_size);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("seed_tmt");
            lvi.SubItems.Add(caso.seed_tmt);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("severity");
            lvi.SubItems.Add(caso.severity);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("shriveling");
            lvi.SubItems.Add(caso.shriveling);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("stem");
            lvi.SubItems.Add(caso.stem);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("stem_cankers");
            lvi.SubItems.Add(caso.stem_cankers);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("temp");
            lvi.SubItems.Add(caso.temp);
            listNovoCaso.Items.Add(lvi);

            //segunda lista

            lvi = new ListViewItem("area_damaged");
            lvi.SubItems.Add(casoN.area_damaged);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("canker_lesion");
            lvi.SubItems.Add(casoN.canker_lesion);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("crop_hist");
            lvi.SubItems.Add(casoN.crop_hist);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("date");
            lvi.SubItems.Add(casoN.date);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("external_decay");
            lvi.SubItems.Add(casoN.external_decay);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("fruiting_bodies");
            lvi.SubItems.Add(casoN.fruiting_bodies);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("fruit_pods");
            lvi.SubItems.Add(casoN.fruit_pods);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("fruit_spots");
            lvi.SubItems.Add(casoN.fruit_spots);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("germination");
            lvi.SubItems.Add(casoN.germination);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("hail");
            lvi.SubItems.Add(caso.hail);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("int_discolor");
            lvi.SubItems.Add(casoN.int_discolor);
            listSelecionado.Items.Add(lvi);


            lvi = new ListViewItem("leafspots_halo");
            lvi.SubItems.Add(casoN.leafspots_halo);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("leafspots_marg");
            lvi.SubItems.Add(caso.leafspots_marg);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("leafspot_size");
            lvi.SubItems.Add(caso.leafspot_size);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("leaf_malf");
            lvi.SubItems.Add(caso.leaf_malf);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("leaf_mild");
            lvi.SubItems.Add(casoN.leaf_mild);
            listSelecionado.Items.Add(lvi);


            lvi = new ListViewItem("leaf_shread");
            lvi.SubItems.Add(casoN.leaf_shread);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("leaves");
            lvi.SubItems.Add(casoN.leaves);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("lodging");
            lvi.SubItems.Add(casoN.lodging);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("mold_growth");
            lvi.SubItems.Add(caso.mold_growth);
            listNovoCaso.Items.Add(lvi);

            lvi = new ListViewItem("mycelium");
            lvi.SubItems.Add(caso.mycelium);
            listNovoCaso.Items.Add(lvi);


            lvi = new ListViewItem("plant_growth");
            lvi.SubItems.Add(casoN.plant_growth);
            listSelecionado.Items.Add(lvi);


            lvi = new ListViewItem("plant_stand");
            lvi.SubItems.Add(casoN.plant_stand);
            listSelecionado.Items.Add(lvi);


            lvi = new ListViewItem("precip");
            lvi.SubItems.Add(casoN.precip);
            listSelecionado.Items.Add(lvi);


            lvi = new ListViewItem("roots");
            lvi.SubItems.Add(casoN.roots);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("sclerotia");
            lvi.SubItems.Add(casoN.sclerotia);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("seed");
            lvi.SubItems.Add(casoN.seed);
            listSelecionado.Items.Add(lvi);


            lvi = new ListViewItem("seed_discolor");
            lvi.SubItems.Add(casoN.seed_discolor);
            listSelecionado.Items.Add(lvi);


            lvi = new ListViewItem("seed_size");
            lvi.SubItems.Add(casoN.seed_size);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("seed_tmt");
            lvi.SubItems.Add(casoN.seed_tmt);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("severity");
            lvi.SubItems.Add(casoN.severity);
            listSelecionado.Items.Add(lvi);


            lvi = new ListViewItem("shriveling");
            lvi.SubItems.Add(casoN.shriveling);
            listSelecionado.Items.Add(lvi);


            lvi = new ListViewItem("stem");
            lvi.SubItems.Add(casoN.stem);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("stem_cankers");
            lvi.SubItems.Add(casoN.stem_cankers);
            listSelecionado.Items.Add(lvi);

            lvi = new ListViewItem("temp");
            lvi.SubItems.Add(casoN.temp);
            listSelecionado.Items.Add(lvi);

            doenca_textbox.Text = casoN.doenca;
        }