コード例 #1
0
        //Cadastro do participante no banco
        protected void Save(object sender, DirectEventArgs e)
        {
            MA_PARTICIPANTE_APRENDER aprenderparticipante = new MA_PARTICIPANTE_APRENDER();

            aprenderparticipante.cod_participante = Int32.Parse(cod_participanteId.SelectedItem.Value);
            aprenderparticipante.cod_item         = Int32.Parse(cod_itemId.SelectedItem.Value);
            aprenderparticipante.cod_s_relacao    = Int32.Parse(cod_s_relacaoId.SelectedItem.Value);


            //Caso o form não possui código, será inserido um novo aprender de participante
            if (cod_p_aprenderId.Text == "")
            {
                this.GestorDeParticipanteAprender.InserirNovoAprendizadoDeParticipante(aprenderparticipante);
                ParticipanteAprenderWindowId.Close();
                LimpaForm();
            }
            //Caso contrário, o form será atualizado
            else
            {
                aprenderparticipante.cod_p_aprender = Int32.Parse(cod_p_aprenderId.Text);
                this.GestorDeParticipanteAprender.AtualizarAprendizadoDeParticipante(aprenderparticipante);
                ParticipanteAprenderWindowId.Close();
                LimpaForm();
            }
        }
コード例 #2
0
 //Inicializa a tela de cadastro de aprender de participante
 protected void Add(object sender, DirectEventArgs e)
 {
     ParticipanteAprenderWindowId.Show();
 }