public void Excluir(Orgao orgao) { var strQuery = string.Format("DELETE FROM tblorgao WHERE idorgao={0}", orgao.OrgaoId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(Restricao restr) { var strQuery = string.Format("DELETE FROM tblrestricao WHERE idrestr={0}", restr.RestricaoId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(Processo processo) { var strQuery = string.Format("DELETE FROM tblprocesso WHERE idprocesso={0}", processo.ProcessoId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(TPadrao tpadrao) { var strQuery = string.Format("DELETE FROM tbltpadrao WHERE tpadraoid={0}", tpadrao.TPadraoId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(Especie especie) { var strQuery = "DELETE FROM tblespecie WHERE idespecie = " + especie.EspecieId; using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(Setor setor) { var strQuery = string.Format("DELETE FROM tblsetor WHERE idsetor={0}", setor.SetorId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(Agente agente) { var strQuery = string.Format("DELETE FROM tblagente WHERE idagente={0}", agente.AgenteId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(Pessoa pessoa) { var strQuery = string.Format("DELETE FROM tblpessoa WHERE idpessoa={0}", pessoa.PessoaId.ToString()); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(Responsavel resp) { var strQuery = "DELETE FROM tblresponsavel WHERE idresp=" + resp.RespId.ToString(); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
private void Inserir(Processo processo) { var strQuery = ""; int id; var lid = new List <Processo>(); lid = ListAll(); if (lid.Count > 0) { id = lid[lid.Count - 1].ProcessoId + 1; } else { id = 1; } strQuery += "INSERT INTO tblprocesso(idprocesso, numero, ano, obra, idapenso, " + "idnatureza, idespecie, idprocurador, objeto, volume, ajuste, " + "valorglobal, idsetor, idarmario, idconcedente, idconvpubl, " + "idconvpriv, parcela, idrelator, obs, situacao, idagente, inventariado, inventariante) "; strQuery += string.Format("VALUES ({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, " + "'{8}', {9}, '{10}', {11}, {12}, {13}, {14}, {15}, {16}, '{17}', " + "{18}, '{19}', {20}, {21}, '{22}', '{23}')", id, processo.Numero, processo.Ano, processo.Obra, processo.ApensoId, processo.NaturezaId, processo.EspecieId, processo.ProcuradorId, processo.Objeto, processo.Volume, processo.Ajuste, processo.ValorGlobal, processo.SetorId, processo.ArmarioId, processo.ConcedenteId, processo.ConvPublId, processo.ConvPrivId, processo.Parcela, processo.RelatorId, processo.Obs, processo.Situacao, processo.AgenteId, processo.Inventariado, processo.Inventariante); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(Usuario usuario) { var strQuery = string.Format("DELETE FROM tblusuario WHERE idusuario={0}", usuario.UsuarioId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(Natureza natureza) { var strQuery = "DELETE FROM tblnatureza WHERE idnatureza = " + natureza.NaturezaId; using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(GrupoRestr gr) { var strQuery = string.Format("DELETE FROM tblgruporestr WHERE idgrestr={0}", gr.GrupoRestrId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(int idnot) { var strQuery = "DELETE FROM tblnotrestr WHERE notificacaoid=" + idnot; using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(Armario armario) { var strQuery = string.Format("DELETE FROM tblarmario WHERE idarmario={0}", armario.ArmarioId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(Relator relator) { var strQuery = string.Format("DELETE FROM tblrelator WHERE idrelator={0}", relator.RelatorId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(Notificacao not) { var strQuery = string.Format("DELETE FROM tblnotificacao WHERE notificacaoid={0}", not.NotificacaoId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(Procurador procurador) { var strQuery = string.Format("DELETE FROM tblprocurador WHERE idprocurador={0}", procurador.ProcuradorId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
private void Alterar(Natureza natureza) { var strQuery = "UPDATE tblnatureza SET natureza = '" + natureza.natureza + "' WHERE idnatureza=" + natureza.NaturezaId.ToString(); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
private void Alterar(Especie especie) { var strQuery = "UPDATE tblespecie SET especie='" + especie.especie + "' WHERE idespecie=" + especie.EspecieId.ToString();; using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Excluir(HistResp hr) { var strQuery = string.Format("DELETE FROM tblhistresp WHERE idresp={0} AND " + "data='{1}' AND documento='{2}'", hr.RespId, hr.Data, hr.Documento); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
private void Alterar(Setor setor) { var strQuery = ""; strQuery += "UPDATE tblsetor SET "; strQuery += string.Format("sigla='{0}', descricao='{1}', responsavel='{2}' ", setor.Sigla, setor.Descricao, setor.Responsavel); strQuery += "WHERE idsetor=" + setor.SetorId.ToString(); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
private void Alterar(TPadrao tpadrao) { var strQuery = ""; strQuery += "UPDATE tbltpadrao SET "; strQuery += string.Format("tipo='{0}', texto='{1}'", tpadrao.Tipo, tpadrao.Texto); strQuery += "WHERE tpadraoid=" + tpadrao.TPadraoId.ToString(); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
private void Alterar(Relator relator) { var strQuery = ""; strQuery += "UPDATE tblrelator SET "; strQuery += string.Format("nome='{0}', matricula='{1}', nomeguerra='{2}', consaud='{3}', lotacao='{4}', status={3} ", relator.Nome, relator.Matricula, relator.NomeGuerra, relator.ConsAud, relator.Lotacao, relator.Status.ToString()); strQuery += "WHERE idrelator=" + relator.RelatorId.ToString(); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
private void Alterar(Armario armario) { var strQuery = ""; strQuery += "UPDATE tblarmario SET "; strQuery += string.Format("codigo='{0}', descricao='{1}' ", armario.Codigo, armario.Descricao); strQuery += string.Format("WHERE idarmario={0} ", armario.ArmarioId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
private void Alterar(GrupoRestr gr) { var strQuery = ""; strQuery += "UPDATE tblgruporestr SET "; strQuery += string.Format("grupo='{0}', obs='{1}', codigo='{2}', ordem={3} ", gr.Grupo, gr.Obs, gr.Codigo, gr.Ordem); strQuery += string.Format("WHERE idgrestr={0} ", gr.GrupoRestrId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
private void Alterar(Usuario usuario) { var strQuery = ""; strQuery += "UPDATE tblusuario SET "; strQuery += string.Format("nome='{0}', login='******', senha='{2}' ", usuario.Nome, usuario.Login, usuario.Senha); strQuery += "WHERE idusuario=" + usuario.UsuarioId.ToString(); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
private void Alterar(Restricao restr) { var strQuery = ""; strQuery += "UPDATE tblrestricao SET "; strQuery += string.Format("idgrestr={0}, codigo='{1}', descricao='{2}', legexec={3} ", restr.GRestrId, restr.Codigo, restr.Descricao, restr.Legexec); strQuery += string.Format("WHERE idrestr={0} ", restr.RestricaoId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
private void Alterar(Agente agente) { var strQuery = ""; strQuery += "UPDATE tblagente SET "; strQuery += string.Format("nome='{0}', nomecompleto='{1}', matricula='{2}', cargo='{3}' ", agente.Nome, agente.NomeCompleto, agente.Matricula, agente.Cargo); strQuery += string.Format("WHERE idagente={0} ", agente.AgenteId); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }
public void Inserir(HistResp histresp) { var strQuery = ""; strQuery += "INSERT INTO tblhistresp(idresp, datan, documento, situacao, data) "; strQuery += string.Format("VALUES ({0}, {1}, '{2}', {3}, '{4}')", histresp.RespId.ToString(), histresp.Datan.ToString(), histresp.Documento, histresp.Situacao.ToString(), histresp.Data.ToString()); using (cnx = new ConexaoBD()) cnx.CommNom(strQuery); }