コード例 #1
0
 public frmRelatorios(DataTable pSource, eStatusForm tipo)
 {
     InitializeComponent();
     ReportDataSource report = new ReportDataSource();
     report.Name = "DataSet1";
     report.Value = pSource;
     rpwViewer.LocalReport.DataSources.Add(report);
     statusForm = tipo;
     switch (statusForm)
     {
         case eStatusForm.alunos:
             rpwViewer.LocalReport.ReportEmbeddedResource = "matriculasControl.rptListaAlunos.rdlc";
             break;
         case eStatusForm.disciplinas:
             rpwViewer.LocalReport.ReportEmbeddedResource = "matriculasControl.rptListaDisciplinas.rdlc";
             break;
         case eStatusForm.matriculas:
             rpwViewer.LocalReport.ReportEmbeddedResource = "matriculasControl.rptListaMatriculados.rdlc";
             break;
         case eStatusForm.semestres:
             break;
         default:
             break;
     }
     rpwViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
     rpwViewer.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;
     this.rpwViewer.RefreshReport();
 }
コード例 #2
0
        private void btnEditarMatricula_Click(object sender, EventArgs e)
        {
            carregarComboBox();
            dgvDisciplinas.DataSource = dd;
            cbxAluno.SelectedValue    = Convert.ToInt32(dm.Rows[dgvMatriculas.CurrentRow.Index]["alunos_id_aluno"].ToString());
            acaoMatricula("Editar Matrícula", true);

            //Seleciona a disciplina que já estava cadastrada
            idd = Convert.ToInt32(dm.Rows[dgvMatriculas.CurrentRow.Index]["disciplinas_id_disciplina"].ToString());
            foreach (DataGridViewRow dr in dgvDisciplinas.Rows)
            {
                if (Convert.ToInt32(dgvDisciplinas.Rows[dr.Index].Cells[1].Value.ToString()) == idd)
                {
                    dgvDisciplinas.Rows[dr.Index].Cells[0].Value = true;
                }
            }
            //seleciona o semestre que ja estava cadastrado
            cbxSemestre.SelectedValue = Convert.ToInt32(dm.Rows[dgvMatriculas.CurrentRow.Index]["semestres_id"].ToString());
            //guarda o id da matricula em edição
            codAnt = Convert.ToInt32(dm.Rows[dgvMatriculas.CurrentRow.Index]["id_matricula"].ToString());
            //carrega a data da matricula já cadastrada
            dtpDataDaMatricula.Text = dm.Rows[dgvMatriculas.CurrentRow.Index]["data_matricula"].ToString();
            statusForm = eStatusForm.update;
            cbxAluno.Focus();
        }
コード例 #3
0
        public frmRelatorios(DataTable pSource, eStatusForm tipo)
        {
            InitializeComponent();
            ReportDataSource report = new ReportDataSource();

            report.Name  = "DataSet1";
            report.Value = pSource;
            rpwViewer.LocalReport.DataSources.Add(report);
            statusForm = tipo;
            switch (statusForm)
            {
            case eStatusForm.alunos:
                rpwViewer.LocalReport.ReportEmbeddedResource = "matriculasControl.rptListaAlunos.rdlc";
                break;

            case eStatusForm.disciplinas:
                rpwViewer.LocalReport.ReportEmbeddedResource = "matriculasControl.rptListaDisciplinas.rdlc";
                break;

            case eStatusForm.matriculas:
                rpwViewer.LocalReport.ReportEmbeddedResource = "matriculasControl.rptListaMatriculados.rdlc";
                break;

            case eStatusForm.semestres:
                break;

            default:
                break;
            }
            rpwViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
            rpwViewer.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;
            this.rpwViewer.RefreshReport();
        }
コード例 #4
0
 private void btnEditarSemestre_Click(object sender, EventArgs e)
 {
     txtNome.Text = ds.Rows[dgvSemestres.CurrentRow.Index]["descricao"].ToString();
     codAnt       = Convert.ToInt32(ds.Rows[dgvSemestres.CurrentRow.Index]["id"].ToString());
     statusForm   = eStatusForm.update;
     acaoSemestre("Editar Semestre", true);
     txtNome.Focus();
 }
コード例 #5
0
 private void btnNovaMatricula_Click(object sender, EventArgs e)
 {
     carregarComboBox();
     statusForm = eStatusForm.insert;
     acaoMatricula("Matricular Aluno", true);
     dgvDisciplinas.DataSource = dd;
     cbxAluno.Focus();
 }
コード例 #6
0
 private void btnEditarDisciplina_Click(object sender, EventArgs e)
 {
     txtNome.Text = dd.Rows[dgvDisciplinas.CurrentRow.Index]["ddescricao"].ToString();
     codAnt       = Convert.ToInt32(dd.Rows[dgvDisciplinas.CurrentRow.Index]["id_disciplina"].ToString());
     statusForm   = eStatusForm.update;
     acaoDisciplina("Editar Disciplina", true);
     txtNome.Focus();
 }
コード例 #7
0
 private void btnEditarAluno_Click(object sender, EventArgs e)
 {
     txtNome.Text     = dt.Rows[dgvAlunos.CurrentRow.Index]["nome"].ToString();
     dtpDataNasc.Text = dt.Rows[dgvAlunos.CurrentRow.Index]["data_nasc"].ToString();
     codAnt           = Convert.ToInt32(dt.Rows[dgvAlunos.CurrentRow.Index]["id_aluno"].ToString());
     statusForm       = eStatusForm.update;
     acaoAluno("Editar Aluno", true);
     txtNome.Focus();
 }
コード例 #8
0
 public frmAlunosCadastro(eStatusForm pForm)
 {
     InitializeComponent();
     carregarDataGrid();
     statusForm = pForm;
 }
コード例 #9
0
 private void btnNovoAluno_Click(object sender, EventArgs e)
 {
     acaoAluno("Cadastrar Aluno", true);
     statusForm = eStatusForm.inserir;
     txtNome.Focus();
 }
コード例 #10
0
 private void btnEditarAluno_Click(object sender, EventArgs e)
 {
     txtNome.Text = dt.Rows[dgvAlunos.CurrentRow.Index]["nome"].ToString();
     dtpDataNasc.Text = dt.Rows[dgvAlunos.CurrentRow.Index]["data_nasc"].ToString();
     codAnt =Convert.ToInt32(dt.Rows[dgvAlunos.CurrentRow.Index]["id_aluno"].ToString());
     statusForm = eStatusForm.update;
     acaoAluno("Editar Aluno", true);
     txtNome.Focus();
 }
コード例 #11
0
 private void btnEditarDisciplina_Click(object sender, EventArgs e)
 {
     txtNome.Text= dd.Rows[dgvDisciplinas.CurrentRow.Index]["ddescricao"].ToString();
     codAnt =Convert.ToInt32(dd.Rows[dgvDisciplinas.CurrentRow.Index]["id_disciplina"].ToString());
     statusForm = eStatusForm.update;
     acaoDisciplina("Editar Disciplina", true);
     txtNome.Focus();
 }
コード例 #12
0
 private void btnInserirDisciplina_Click(object sender, EventArgs e)
 {
     statusForm = eStatusForm.insert;
     acaoDisciplina("Cadastrar Disciplina", true);
     txtNome.Focus();
 }
コード例 #13
0
 private void btnInserirDisciplina_Click(object sender, EventArgs e)
 {
     statusForm = eStatusForm.insert;
     acaoDisciplina("Cadastrar Disciplina", true);
     txtNome.Focus();
 }
コード例 #14
0
 private void btnEditarSemestre_Click(object sender, EventArgs e)
 {
     txtNome.Text = ds.Rows[dgvSemestres.CurrentRow.Index]["descricao"].ToString();
     codAnt = Convert.ToInt32(ds.Rows[dgvSemestres.CurrentRow.Index]["id"].ToString());
     statusForm = eStatusForm.update;
     acaoSemestre("Editar Semestre", true);
     txtNome.Focus();
 }
コード例 #15
0
 private void btnNovaMatricula_Click(object sender, EventArgs e)
 {
     carregarComboBox();
     statusForm = eStatusForm.insert;
     acaoMatricula("Matricular Aluno", true);
     dgvDisciplinas.DataSource = dd;
     cbxAluno.Focus();
 }
コード例 #16
0
 public frmAlunosCadastro(eStatusForm pForm)
 {
     InitializeComponent();
     carregarDataGrid();
     statusForm = pForm;
 }
コード例 #17
0
 private void btnNovoAluno_Click(object sender, EventArgs e)
 {
     acaoAluno("Cadastrar Aluno", true);
     statusForm = eStatusForm.inserir;
     txtNome.Focus();
 }
コード例 #18
0
 private void btnInserirSemestre_Click(object sender, EventArgs e)
 {
     statusForm = eStatusForm.insert;
     acaoSemestre("Cadastrar Semestre", true);
     txtNome.Focus();
 }
コード例 #19
0
        private void btnEditarMatricula_Click(object sender, EventArgs e)
        {
            carregarComboBox();
            dgvDisciplinas.DataSource = dd;
            cbxAluno.SelectedValue = Convert.ToInt32(dm.Rows[dgvMatriculas.CurrentRow.Index]["alunos_id_aluno"].ToString());
            acaoMatricula("Editar Matrícula", true);

            //Seleciona a disciplina que já estava cadastrada
            idd = Convert.ToInt32(dm.Rows[dgvMatriculas.CurrentRow.Index]["disciplinas_id_disciplina"].ToString());
            foreach (DataGridViewRow dr in dgvDisciplinas.Rows)
            {
                if (Convert.ToInt32(dgvDisciplinas.Rows[dr.Index].Cells[1].Value.ToString()) == idd)
                {
                    dgvDisciplinas.Rows[dr.Index].Cells[0].Value = true;
                }
            }
            //seleciona o semestre que ja estava cadastrado
            cbxSemestre.SelectedValue = Convert.ToInt32(dm.Rows[dgvMatriculas.CurrentRow.Index]["semestres_id"].ToString());
            //guarda o id da matricula em edição
            codAnt = Convert.ToInt32(dm.Rows[dgvMatriculas.CurrentRow.Index]["id_matricula"].ToString());
            //carrega a data da matricula já cadastrada
            dtpDataDaMatricula.Text = dm.Rows[dgvMatriculas.CurrentRow.Index]["data_matricula"].ToString();
            statusForm = eStatusForm.update;
            cbxAluno.Focus();
        }
コード例 #20
0
 private void btnInserirSemestre_Click(object sender, EventArgs e)
 {
     statusForm = eStatusForm.insert;
     acaoSemestre("Cadastrar Semestre", true);
     txtNome.Focus();
 }