public List<Obras> PesquisarBL() { /*criar as regras de negocio*/ ObrasDA obrasDA = new ObrasDA(); return obrasDA.PesquisarDA(); }
private List<ItensEstoque> CarregarObjItemEstoque(SqlDataReader dr) { List<ItensEstoque> itensEstoque = new List<ItensEstoque>(); while (dr.Read()) { ItensEstoque itEst = new ItensEstoque(); itEst.Id = int.Parse(dr["ID"].ToString()); itEst.Status = bool.Parse(dr["STATUS"].ToString()); itEst.ControlaEstoque = bool.Parse(dr["CONTROLAESTOQUE"].ToString()); itEst.QtdMinima = utils.ComparaIntComZero(dr["QTDMINIMA"].ToString()); itEst.ObraId = utils.ComparaIntComZero(dr["OBRAID"].ToString()); itEst.VlrCusto = utils.ComparaDecimalComZero(dr["VLRCUSTO"].ToString()); itEst.VlrVenda = utils.ComparaDecimalComZero(dr["VLRVENDA"].ToString()); itEst.Data = Convert.ToDateTime(dr["DATA"].ToString()); ObrasDA obDA = new ObrasDA(); DataSet dsOb = obDA.PesquisarDA(itEst.ObraId); Obras obras = new Obras(); if (dsOb.Tables[0].Rows.Count != 0) { obras.Id = (Int32)dsOb.Tables[0].Rows[0]["id"]; obras.Codigo = (Int32)dsOb.Tables[0].Rows[0]["codigo"]; obras.Titulo = (string)dsOb.Tables[0].Rows[0]["titulo"]; itEst.Obra = obras; } MovimentosEstoqueDA movEsDA = new MovimentosEstoqueDA(); itEst.QtdEstoque = movEsDA.PesquisarTotalMovimentosDA(itEst.Id, ""); itensEstoque.Add(itEst); } return itensEstoque; }
public List<Obras> PesquisarBL(string campo, string valor) { ObrasDA obrasDA = new ObrasDA(); return obrasDA.PesquisarDA(campo, valor); }
public DataSet PesquisarBL(int obra_id) { ObrasDA ObrasDA = new ObrasDA(); return ObrasDA.PesquisarDA(obra_id); }