Esempio n. 1
0
        private void carrega_tabela()
        {
            DataSet ds = Plano_EnsinoDAL.atualizaTabela();

            tabela.DataSource = ds;
            tabela.DataMember = ds.Tables[0].TableName;
        }
Esempio n. 2
0
        private void btSALVAR_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(tbANO.Text) || string.IsNullOrEmpty(tbSEMESTRE.Text) ||
                string.IsNullOrEmpty(tbINTEGRACAO.Text) || string.IsNullOrEmpty(tbAVALIACAO.Text) || string.IsNullOrEmpty(tbCONTEUDO_PROGRAMADO.Text) ||
                string.IsNullOrEmpty(tbCRONOGRAMA.Text) || string.IsNullOrEmpty(tbRECUPERACAO.Text) || string.IsNullOrEmpty(tbMETODOLOGIA.Text)
                /*|| string.IsNullOrEmpty(tbNOME.Text) || string.IsNullOrEmpty(tbPROFESSORES.Text)*/)
            {
                MessageBox.Show(" Verifique campos em Branco !", "Falha ao Inserir !", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                string nome      = string.Concat(cbCOMP_CURRICULAR.Text, " - ", tbPROFESSORES.Text, " - ", tbANO.Text);
                int    resultado = 0;
                resultado = Plano_EnsinoDAL.Inserir(Convert.ToInt32(tbANO.Text), Convert.ToInt16(tbSEMESTRE.Text),
                                                    Convert.ToString(cbCOLEGIADO.Text), tbINTEGRACAO.Text, tbAVALIACAO.Text, tbREF_APROFUNDAMENTO.Text, tbCONTEUDO_PROGRAMADO.Text, tbCRONOGRAMA.Text,
                                                    tbRECUPERACAO.Text, tbMETODOLOGIA.Text, Convert.ToInt16(cbCOMP_CURRICULAR.SelectedValue), nome, tbPROFESSORES.Text);

                if (resultado == 1)
                {
                    MessageBox.Show("Registro Inserido com Sucesso !", " Aviso de Inserção ", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                }
                else
                {
                    MessageBox.Show("Falha ao Inserir o Registro !", " Aviso de Inserção", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }

            this.carrega_tabela();
        }
Esempio n. 3
0
        private void atualizaPesquisa()
        {
            DataSet ds = Plano_EnsinoDAL.Pesquisar(tbPesqNOME.Text, tbPesqPROF.Text, tbPesqANO.Text);

            tabela.DataSource = ds;
            tabela.DataMember = ds.Tables[0].TableName;
        }
Esempio n. 4
0
        private void btEXCLUIR_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Tem certeza que deseja excluír esse Registro ?", "Aviso de Exclusão", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
            {
                if (string.IsNullOrEmpty(tbID.Text))
                {
                    MessageBox.Show(" Verifique campos em Branco !", "Falha ao Excluír !", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
                else
                {
                    int resultado = 0;
                    resultado = Plano_EnsinoDAL.Excluir(Convert.ToInt16(tbID.Text));

                    if (resultado == 1)
                    {
                        MessageBox.Show("Registro Excluído com Sucesso !", "Aviso de Exclusão", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    }
                    else
                    {
                        MessageBox.Show("Falha ao Excluir o Registro !", "Aviso de Exclusão", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            this.carrega_tabela();
        }
Esempio n. 5
0
        private void btALTERAR_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Tem certeza que deseja Alterar esse Registro ?", "Aviso de Alteração", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
            {
                if (string.IsNullOrEmpty(tbID.Text) || string.IsNullOrEmpty(tbANO.Text) || string.IsNullOrEmpty(tbSEMESTRE.Text) || /*|| string.IsNullOrEmpty(tbCOLEGIADO.Text)*/
                    string.IsNullOrEmpty(tbINTEGRACAO.Text) || string.IsNullOrEmpty(tbAVALIACAO.Text) || string.IsNullOrEmpty(tbCONTEUDO_PROGRAMADO.Text) ||
                    string.IsNullOrEmpty(tbCRONOGRAMA.Text) || string.IsNullOrEmpty(tbRECUPERACAO.Text) || string.IsNullOrEmpty(tbMETODOLOGIA.Text)
                    /*|| string.IsNullOrEmpty(tbNOME.Text) || string.IsNullOrEmpty(tbPROFESSORES.Text)*/)
                {
                    MessageBox.Show(" Verifique campos em Branco !", "Falha ao Alterar !", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
                else
                {
                    string nome      = string.Concat(Convert.ToString(cbCOMP_CURRICULAR.Text), tbPROFESSORES.Text, tbANO.Text);
                    int    resultado = 0;
                    resultado = Plano_EnsinoDAL.Alterar(Convert.ToInt32(tbID.Text), Convert.ToInt32(tbANO.Text), Convert.ToInt16(tbSEMESTRE.Text),
                                                        Convert.ToString(cbCOLEGIADO.Text), tbINTEGRACAO.Text, tbAVALIACAO.Text, tbREF_APROFUNDAMENTO.Text, tbCONTEUDO_PROGRAMADO.Text, tbCRONOGRAMA.Text,
                                                        tbRECUPERACAO.Text, tbMETODOLOGIA.Text, Convert.ToInt16(cbCOMP_CURRICULAR.SelectedValue), nome, tbPROFESSORES.Text);

                    if (resultado == 1)
                    {
                        MessageBox.Show("Registro Alterado com Sucesso !", "Aviso de Alteração", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    }
                    else
                    {
                        MessageBox.Show("Falha ao Alterar o Registro !", "Aviso de Alteração", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            this.carrega_tabela();
        }
Esempio n. 6
0
        private void loadComboBox()
        {
            /*DataTable dtTabelas = Comp_CurricularDAL.atualiza_combo();
             *
             * //carrega as informacoes no combo
             * comboCurso.DataSource = dtTabelas;
             * comboCurso.DisplayMember = "nome";
             * comboCurso.ValueMember = "IdCurso";
             *
             * DataTable dtTabelas_Comp = Plano_EnsinoDAL.atualiza_combo();
             *
             * //carrega as informacoes no combo
             * comboComp.DataSource = dtTabelas_Comp;
             * comboComp.DisplayMember = "nome";
             * comboComp.ValueMember = "IdComponenteCurricular";
             *
             * DataTable dtTabelas_Prof = ProfessorDAL.atualiza_combo();
             *
             * //carrega as informacoes no combo
             * comboProf.DataSource = dtTabelas_Prof;
             * comboProf.DisplayMember = "nome";
             * comboProf.ValueMember = "IdProfessor";  */

            DataTable dtTabelas_Plano = Plano_EnsinoDAL.atualiza_combo_Plano();

            //carrega as informacoes no combo
            comboPlano.DataSource    = dtTabelas_Plano;
            comboPlano.DisplayMember = "nome";
            comboPlano.ValueMember   = "IdPlanoEnsino";
        }
Esempio n. 7
0
        private void carrega_combo()
        {
            DataTable dtTabelas = Plano_EnsinoDAL.atualiza_combo();

            //carrega as informacoes no combo
            cbCOMP_CURRICULAR.DataSource    = dtTabelas;
            cbCOMP_CURRICULAR.DisplayMember = "nome";
            cbCOMP_CURRICULAR.ValueMember   = "IdComponenteCurricular";
        }