Example #1
0
        //private void Button_Click(object sender, RoutedEventArgs e)
        //{
        //    //Salvar no Banco a Tela do Sistema selecionado (via ID)
        //    //MessageBox.Show(selectedSistema.Nome);
        //    if (selectedSistema == null)
        //    {
        //        MessageBox.Show("Selecione um Sistema para Cadastrar a Tela");
        //    }
        //    else
        //    {
        //        Tela telaAdicionada = new Tela(nomeTelaBlock.Text, selectedSistema);
        //        telaAdicionada.Salvar();
        //        MessageBox.Show("Tela Adicionada: (" + selectedSistema.Nome + ") " + telaAdicionada.Id + ": " + telaAdicionada.Nome);
        //    }
        //    refresh();
        //}

        private void sistemasBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //refresh();//RefreSh Telas Somente
            if (selectedSistema != null)
            {
                telas = Tela_DAO.getAllTelas(selectedSistema);
                telasGrid.ItemsSource = telas;
            }
        }
Example #2
0
        public void loadData()
        {
            sistemas = Sistema_DAO.getAllSistemas();
            sistemasBox.ItemsSource = sistemas;

            if (selectedSistema != null)
            {
                telas = Tela_DAO.getAllTelas(selectedSistema);
                telasGrid.ItemsSource = telas;
            }
        }
Example #3
0
 public ActionResult TelasSistema(int sistemaId, int?id)
 {
     if (id.HasValue)
     {
         return(Content("Sistema ID=" + sistemaId.ToString() + "\n" + "IdTela=" + id.ToString() + "não implementado ainda"));
     }
     else
     {
         List <Sistema> sistemas = Sistema_DAO.getAllSistemas().ToList();
         List <Screen>  telas    = Tela_DAO.getAllTelas(sistemas.First(x => x.Id == sistemaId)).ToList();
         return(View(telas));
     }
 }
        public static Screen getTela(int Id, Sistema sistema)
        {
            ObservableCollection <Screen> telas = Tela_DAO.getAllTelas(sistema);
            Screen found = null;

            foreach (Screen tela in telas)
            {
                if (tela.Id == Id)
                {
                    found = tela;
                }
            }
            return(found);
        }
Example #5
0
        public PassoDoTeste(TestCase parent)
        {
            //if (parent.SistemaPai == null)
            //{
            //    MessageBox.Show("Passo do Teste: parent.SistemaPai == null");
            //}
            //else
            //{
            //    MessageBox.Show("sistema " + parent.SistemaPai.Nome);
            //}
            telasPossiveis = Tela_DAO.getAllTelas(parent.SistemaPai);

            //telasPossiveis = new ObservableCollection<Tela>(parent.SistemaPai.telas);
            resultado           = new AcaoDynResult();
            this.TestCaseParent = parent;
            List <Screen> telas = telasPossiveis.ToList();

            telas.OrderBy(tela => tela.Nome);
            telasPossiveis = new ObservableCollection <Screen>(telas);
        }