private InvProcesso One(string strQuery) { using (cnx = new ConexaoBD()) { var dt = cnx.Datatable(strQuery); return(One(dt, 0)); } }
private HistResp One(string strQuery) { using (cnx = new ConexaoBD()) { var dt = cnx.Datatable(strQuery); return(One(dt, 0)); } }
private Notificacao One(string strQuery) { using (cnx = new ConexaoBD()) { var dt = cnx.Datatable(strQuery); return(One(dt, 0)); } }
public List <RespProc> Lista(int idproc) { var lista = new List <RespProc>(); using (cnx = new ConexaoBD()) { var strQuery = "SELECT * FROM tblresponsavel WHERE idprocesso = " + idproc.ToString(); var dt = new DataTable(); var dtr = new DataTable(); dtr = cnx.Datatable(strQuery); for (int x = 0; x < dtr.Rows.Count; x++) { var registro = new RespProc(); registro.ProcessoId = int.Parse(dtr.Rows[x]["idprocesso"].ToString()); registro.PessoaId = int.Parse(dtr.Rows[x]["idpessoa"].ToString()); registro.Convenente = dtr.Rows[x]["convenente"].ToString(); strQuery = "SELECT * FROM tblpessoa WHERE idpessoa=" + dtr.Rows[x]["idpessoa"].ToString(); dt = cnx.Datatable(strQuery); registro.Nome = dt.Rows[0]["nome"].ToString(); registro.CPF = dt.Rows[0]["cpf"].ToString(); registro.Endereco = dt.Rows[0]["endereco"].ToString(); registro.Complemento = dt.Rows[0]["complemento"].ToString(); registro.Bairro = dt.Rows[0]["bairro"].ToString(); registro.CEP = dt.Rows[0]["cep"].ToString(); registro.Cidade = dt.Rows[0]["cidade"].ToString(); registro.UF = dt.Rows[0]["uf"].ToString(); lista.Add(registro); } } return(lista); }
private List <Pessoa> ListStandart(string strQuery) { var lista = new List <Pessoa>(); using (cnx = new ConexaoBD()) { var dt = cnx.Datatable(strQuery); for (int i = 0; i < dt.Rows.Count; i++) { lista.Add(One(dt, i)); } } return(lista); }
private List <HistResp> Lista(string strQuery) { var lista = new List <HistResp>(); using (cnx = new ConexaoBD()) { var dt = cnx.Datatable(strQuery); var registro = new Especie(); for (int i = 0; i < dt.Rows.Count; i++) { lista.Add(One(dt, i)); } } return(lista); }