public DataSet Listar(string parteNome) { try { SQL = "SELECT * FROM tbProduto"; if (parteNome.Length != 0) { if (BLL.FuncoesGerais.IsNumeric(parteNome)) { _CodigoProduto = Convert.ToInt32(parteNome); SQL = "SELECT * FROM tbProduto WHERE CodigoProduto =" + _CodigoProduto; } else { SQL = SQL + " WHERE NomeProduto LIKE '%" + parteNome + "%'"; //avisado sobre comportamento } } return(c.RetornarDataSet(SQL)); } catch (Exception ex) { throw ex; } }
public DataSet ListarAtivos() { try { instrucaoSql = "SELECT * FROM tbCupom WHERE StatusCupom=1"; return(c.RetornarDataSet(instrucaoSql)); } catch (Exception ex) { throw ex; } }
public DataSet Listar(string parteNome, byte tipostatus) { try { instrucaoSql = "SELECT * FROM tbFuncionario"; if (parteNome.Length != 0) { instrucaoSql = instrucaoSql + " WHERE NomeFuncionario LIKE '%" + parteNome + "%'"; //avisado sobre comportamento } return(c.RetornarDataSet(instrucaoSql)); } catch (Exception ex) { throw ex; } }
public DataSet Listar(string parteNome, byte TipoStatus) { try { instrucaoSql = "SELECT codigoNivel, nomeNivel, StatusNivel FROM tbNivelAcesso"; if (parteNome.Length != 0) { instrucaoSql = instrucaoSql + " WHERE nomeNivel LIKE '%" + parteNome + "%'"; } return(c.RetornarDataSet(instrucaoSql)); } catch (Exception ex) { throw ex; } }
public DataSet Listar(string parteNome, byte tipostatus) { try { instrucaoSql = " SELECT CodigoUsuario,NomeUsuario,SenhaUsuario,CodigoNivelAcesso,NomeNivelAcesso,StatusUsuario FROM tbUsuario INNER JOIN tbNivel ON tbUsuario.CodigoNivelAcesso = tbNivel.CodigoNivel"; if (parteNome.Length != 0) { instrucaoSql = instrucaoSql + " WHERE NomeUsuario LIKE '%" + parteNome + "%'"; //avisado sobre comportamento } return(c.RetornarDataSet(instrucaoSql)); } catch (Exception ex) { throw ex; } }
public DataSet ListarVendas(string parteNome) { try { instrucaoSql = " SELECT tbVenda.CodigoVenda,tbVenda.ValorTotal,tbVenda.DataVenda, Cliente.CodigoCliente, Cliente.NomeCliente As Nome_cliente FROM tbCliente as Cliente INNER JOIN tbVenda ON tbVenda.CodigoCliente = Cliente.CodigoCliente Order by CodigoVenda"; if (parteNome.Length != 0) { instrucaoSql = instrucaoSql + " WHERE Cliente.Nome LIKE '%" + parteNome + "%'"; //avisado sobre comportamento } return(c.RetornarDataSet(instrucaoSql)); } catch (Exception ex) { throw ex; } }
public DataSet Listar(string parteNomeFuncionario, byte TipoStatusFuncionario) { try { instrucaoSql = "SELECT *FROM tbFuncionario"; if (parteNomeFuncionario.Length != 0) { instrucaoSql = instrucaoSql + " WHERE NomeFuncionario LIKE '%" + parteNomeFuncionario + "%'"; } return(c.RetornarDataSet(instrucaoSql)); } catch (Exception ex) { throw ex; } }
public DataSet ExibirEstoque() { instrucaoSql = "Select tbProduto.CodigoProduto,NomeProduto,tbEstoque.QuantidadeAtual as Quantidade_Atual from tbProduto INNER JOIN tbEstoque ON tbProduto.CodigoProduto = tbEstoque.CodigoProduto Order by tbProduto.CodigoProduto"; return(c.RetornarDataSet(instrucaoSql)); }
public DataSet Listar(string texto) { SQL = "SELECT CategoriaID, Descricao FROM TbCategoria ORDER BY Descricao"; if (texto.Length != 0) // texto == null || texto == "" { SQL = "SELECT CategoriaID, DESCRICAO FROM TBCATEGORIA WHERE DESCRICAO LIKE '%" + texto + "%' ORDER BY DESCRICAO"; } return(c.RetornarDataSet(SQL)); }
public DataSet Listar() { try { instrucaoSql = "SELECT * FROM tbFaleConosco"; return(c.RetornarDataSet(instrucaoSql)); } catch (Exception ex) { throw ex; } }
public DataSet ListarContas(byte tipostatus, DateTime datainicial, DateTime datafinal) { try { if (tipostatus == 0) //não pagas { instrucaoSql = "SELECT l.DataVencimento, t.DescricaoTitulo, l.ValorTitulo, l.StatusPagTitulo, l.DataPagamento, l.ValorPagamento, l.Codigotitulo, l.CodigoLancamento FROM tbTipoTitulo as t INNER JOIN tbLancamento as l ON t.CodigoTitulo=l.CodigoTitulo WHERE l.StatusPagTitulo = 0 AND (DataVencimento BETWEEN '" + datainicial + "' and '" + datafinal + "') ORDER by l.DataVencimento, t.DescricaoTitulo"; } else if (tipostatus == 1) //pagas { instrucaoSql = "SELECT l.DataVencimento, t.DescricaoTitulo, l.ValorTitulo, l.StatusPagTitulo, l.DataPagamento, l.ValorPagamento, l.Codigotitulo, l.CodigoLancamento FROM tbTipoTitulo as t INNER JOIN tbLancamento as l ON t.CodigoTitulo=l.CodigoTitulo WHERE l.StatusPagTitulo = 1 AND (DataVencimento BETWEEN '" + datainicial + "' and '" + datafinal + "') ORDER by l.DataVencimento, t.DescricaoTitulo"; } else //tudo { instrucaoSql = "SELECT l.DataVencimento, t.DescricaoTitulo, l.ValorTitulo, l.StatusPagTitulo, l.DataPagamento, l.ValorPagamento, l.Codigotitulo, l.CodigoLancamento FROM tbTipoTitulo as t INNER JOIN tbLancamento as l ON t.CodigoTitulo=l.CodigoTitulo WHERE (DataVencimento BETWEEN '" + datainicial + "' and '" + datafinal + "') ORDER by l.DataVencimento, t.DescricaoTitulo"; } return(c.RetornarDataSet(instrucaoSql)); } catch (Exception ex) { throw ex; } }
public DataSet Listar(string parteNomeUsuario, byte tipoStatus) { try { instrucaoSql = "SELECT CodigoTitulo, DescricaoTitulo, StatusTitulo FROM tbTipoTitulo"; if (parteNomeUsuario.Length != 0) { instrucaoSql = instrucaoSql + " WHERE DescricaoTitulo LIKE '%" + parteNomeUsuario + "%'"; } return(c.RetornarDataSet(instrucaoSql)); } catch (Exception ex) { throw ex; } }