Esempio n. 1
0
 public int deleteAlunos(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Delete from Alunos where alu_mat = '" + info.alu_mat + "'";
     return db.ExeNonQuery(cmd);
 }
Esempio n. 2
0
 public int deleteCursos(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Delete from Cursos where cur_sgl = '" + info.cur_sgl + "'";
     return db.ExeNonQuery(cmd);
 }
Esempio n. 3
0
 public int deleteEstado(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Delete from Estados where ufe_sgl = '" + info.ufe_sgl + "'";
     return db.ExeNonQuery(cmd);
 }
Esempio n. 4
0
 public int deleteDepartamentos(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Delete from Departamentos where dep_sgl = '" + info.dep_sgl + "'";
     return db.ExeNonQuery(cmd);
 }
Esempio n. 5
0
 public int deleteDisciplinas(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Delete from Disciplinas where dis_cod = " + info.dis_cod;
     return db.ExeNonQuery(cmd);
 }
Esempio n. 6
0
 public bool Alu_IsRelated(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select * from Matriculas where mat_alu_cod = '" + info.alu_mat + "'";
     DataTable result = db.ExeReader(cmd);
     if (result.Rows.Count > 0)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Esempio n. 7
0
 public bool Cur_IsRelated(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select * from Disciplinas where dis_cur_sgl = '" + info.cur_sgl + "'";
     DataTable result = db.ExeReader(cmd);
     if (result.Rows.Count > 0)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Esempio n. 8
0
 public int updateDisciplinas(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Update Disciplinas set dis_sgl = '" + info.dis_sgl + "', dis_nom ='" + info.dis_nom + "', dis_crg_hor ='" + info.dis_crg_hor + "', dis_cur_sgl ='" + info.dis_cur_sgl + "' where dis_cod = " + info.dis_cod;
     return db.ExeNonQuery(cmd);
 }
Esempio n. 9
0
 public int updateDepartamentos(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Update Departamentos set dep_nom = '" + info.dep_nom + "' where dep_sgl = '" + info.dep_sgl + "'";
     return db.ExeNonQuery(cmd);
 }
Esempio n. 10
0
 public int updateCursos(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Update Cursos set cur_nom = '" + info.cur_nom + "', cur_dep_sgl ='" + info.cur_dep_sgl + "' where cur_sgl = '" + info.cur_sgl + "'";
     return db.ExeNonQuery(cmd);
 }
Esempio n. 11
0
 public int updateAlunos(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Update Alunos set alu_nom = '" + info.alu_nom +
                       "', alu_ing ='" + info.alu_ing +
                       "', alu_dta_nas ='" + info.alu_dta_nas +
                       "', alu_cpf ='" + info.alu_cpf +
                       "', alu_sexo ='" + info.alu_sexo +
                       "', alu_email ='" + info.alu_email +
                       "', alu_end_cep ='" + info.alu_end_cep +
                       "', alu_end_log ='" + info.alu_end_log +
                       "', alu_end ='" + info.alu_end +
                       "', alu_end_nro ='" + info.alu_end_nro +
                       "', alu_end_cpl ='" + info.alu_end_cpl +
                       "', alu_end_bai ='" + info.alu_end_bai +
                       "', alu_end_cid ='" + info.alu_end_cid +
                       "', alu_end_ufe ='" + info.alu_end_ufe +
                       "', alu_cur_sgl ='" + info.alu_cur_sgl +
                       "' where alu_mat = '" + info.alu_mat + "'";
     return db.ExeNonQuery(cmd);
 }
Esempio n. 12
0
 public DataTable selectDisciplinasByCur(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select dis_nom from Disciplinas where dis_cur_sgl = '" + info.dis_cur_sgl + "' Order by dis_nom asc";
     return db.ExeReader(cmd);
 }
Esempio n. 13
0
 public DataTable selectAlunosCurByMat(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select alu_cur_sgl from Alunos where alu_mat = '" + info.alu_mat + "' Order by alu_nom asc";
     return db.ExeReader(cmd);
 }
Esempio n. 14
0
 public int updateMatriculas(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Update Matriculas set mat_avl_001 = '" + info.mat_avl_001 +
                       "', mat_avl_002 = '" + info.mat_avl_002 +
                       "', mat_trb_001 ='" + info.mat_trb_001 +
                       "', mat_med ='" + info.mat_med +
                       "', mat_con ='" + info.mat_con +
                       "', mat_fal ='" + info.mat_fal +
                       "' where mat_ano = '" + info.mat_ano +
                       "and mat_sem = '" + info.mat_sem +
                       "and mat_alu_cod = '" + info.mat_alu_cod +
                       "and mat_dis_cod = " + info.mat_dis_cod;
     return db.ExeNonQuery(cmd);
 }
Esempio n. 15
0
 public DataTable selectDepartamentosById(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select * from Departamentos where dep_sgl = '" + info.dep_sgl + "'";
     return db.ExeReader(cmd);
 }
Esempio n. 16
0
 public DataTable selectMatriculasByCurso(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select mat.* from Matriculas mat inner join Disciplinas disc on mat.mat_dis_cod = disc.dis_cod where disc.dis_cur_sgl = '" + info.dis_cur_sgl + "'";
     return db.ExeReader(cmd);
 }
Esempio n. 17
0
 public DataTable selectEstadoByNome(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select * from Estados where ufe_nom like '%" + info.ufe_nom + "%' order by ufe_sgl asc";
     return db.ExeReader(cmd);
 }
Esempio n. 18
0
 public DataTable selectEstadoById(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select * from Estados where ufe_sgl = '" + info.ufe_sgl + "'";
     return db.ExeReader(cmd);
 }
Esempio n. 19
0
 public DataTable selectDisciplinasIdByNome(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select dis_cod from Disciplinas where dis_nom like '%" + info.dis_nom + "%' order by dis_cod asc";
     return db.ExeReader(cmd);
 }
Esempio n. 20
0
 public DataTable selectDisciplinasById(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select * from Disciplinas where dis_cod = " + info.dis_cod;
     return db.ExeReader(cmd);
 }
Esempio n. 21
0
 public int updateEstado(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Update Estados set ufe_nom = '" + info.ufe_nom + "' where ufe_sgl = '" + info.ufe_sgl + "'";
     return db.ExeNonQuery(cmd);
 }
Esempio n. 22
0
 public DataTable selectAlunosByNome(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select * from Alunos where alu_nom like '%" + info.alu_nom + "%' order by alu_nom asc";
     return db.ExeReader(cmd);
 }
Esempio n. 23
0
 public DataTable selectCursosByNome(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select * from Cursos where cur_nom like '%" + info.cur_nom + "%' order by cur_sgl asc";
     return db.ExeReader(cmd);
 }
Esempio n. 24
0
 public DataTable selectMatriculasByNomAlunos(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select mat.* from Matriculas mat inner join Alunos alu on mat.mat_alu_cod = alu.alu_mat where alu.alu_nom = '" + info.alu_nom + "'";
     return db.ExeReader(cmd);
 }
Esempio n. 25
0
 public DataTable selectCursosById(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select * from Cursos where cur_sgl = '" + info.cur_sgl + "'";
     return db.ExeReader(cmd);
 }
Esempio n. 26
0
 public DataTable selectMatriculasDisByMat(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select mat.mat_dis_cod from Matriculas mat inner join Alunos alu on mat.mat_alu_cod = alu.alu_mat where alu.alu_mat = '" + info.alu_mat + "' and mat.mat_ano ="+ info.mat_ano +" and mat.mat_sem =" + info.mat_sem;
     return db.ExeReader(cmd);
 }
Esempio n. 27
0
 public DataTable selectMatriculasByDisc(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select * from Matriculas where mat_dis_cod = " + info.mat_dis_cod;
     return db.ExeReader(cmd);
 }
Esempio n. 28
0
 public DataTable selectDepartamentosByNome(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select * from Departamentos where dep_nom like '%" + info.dep_nom + "%' order by dep_sgl asc";
     return db.ExeReader(cmd);
 }
Esempio n. 29
0
 public int deleteMatriculas(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Delete from Matriculas where mat_ano = '" + info.mat_ano +
                       "and mat_sem = '" + info.mat_sem +
                       "and mat_alu_cod = '" + info.mat_alu_cod +
                       "and mat_dis_cod = " + info.mat_dis_cod;
     return db.ExeNonQuery(cmd);
 }
Esempio n. 30
0
 public DataTable selectMatriculasById(SqlVar info)
 {
     OleDbCommand cmd = new OleDbCommand();
     cmd.CommandType = CommandType.Text;
     cmd.CommandText = "Select * from Matriculas where mat_ano = '" + info.mat_ano +
                       "and mat_sem = '" + info.mat_sem +
                       "and mat_alu_cod = '" + info.mat_alu_cod +
                       "and mat_dis_cod = " + info.mat_dis_cod;
     return db.ExeReader(cmd);
 }