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); }
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); }
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); }
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); }
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); }
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; } }
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; } }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }