Beispiel #1
0
        private void CarregarFormAdicionarQuestao()
        {
            var show = new fmrAdicionarQuestionario3AdicionarQuestao(questionarioConstrutor);

            show.MdiParent = ActiveForm;
            show.Dock      = DockStyle.Fill;
            show.Show();
            Close();
        }
Beispiel #2
0
        void grd_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            bool ehBotaoEditar  = e.ColumnIndex == 1 && e.RowIndex >= 0;
            bool ehBotaoExcluir = e.ColumnIndex == 2 && e.RowIndex >= 0;

            string nomeDaPergunta = GetNomeDaPerguntaDaCell(e);

            if (ehBotaoEditar)
            {
                var questaoSelecionada = questoes.FirstOrDefault(x => x.Pergunta == nomeDaPergunta);

                var show = new fmrAdicionarQuestionario3AdicionarQuestao(questionarioConstrutor, questaoSelecionada);
                show.MdiParent = ActiveForm;
                show.Dock      = DockStyle.Fill;
                show.Show();
                Close();
            }
            if (ehBotaoExcluir)
            {
                RemoverQuestao(e, nomeDaPergunta);
            }
        }