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(); }
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(); }
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(); }
private void btnNovaMatricula_Click(object sender, EventArgs e) { carregarComboBox(); statusForm = eStatusForm.insert; acaoMatricula("Matricular Aluno", true); dgvDisciplinas.DataSource = dd; cbxAluno.Focus(); }
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(); }
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(); }
public frmAlunosCadastro(eStatusForm pForm) { InitializeComponent(); carregarDataGrid(); statusForm = pForm; }
private void btnNovoAluno_Click(object sender, EventArgs e) { acaoAluno("Cadastrar Aluno", true); statusForm = eStatusForm.inserir; txtNome.Focus(); }
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(); }
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(); }
private void btnInserirDisciplina_Click(object sender, EventArgs e) { statusForm = eStatusForm.insert; acaoDisciplina("Cadastrar Disciplina", true); txtNome.Focus(); }
private void btnInserirSemestre_Click(object sender, EventArgs e) { statusForm = eStatusForm.insert; acaoSemestre("Cadastrar Semestre", true); txtNome.Focus(); }