private LIS_PRODUTOSPEDOTICACollection ProdutoRel(int IDPEDIDOOTICA) { LIS_PRODUTOSPEDOTICACollection LIS_PRODUTOSPEDIDOColl = new LIS_PRODUTOSPEDOTICACollection(); LIS_PRODUTOSPEDOTICAProvider LIS_PRODUTOSPEDIDOP = new LIS_PRODUTOSPEDOTICAProvider(); RowRelatorio.Clear(); RowRelatorio.Add(new RowsFiltro("IDPEDIDOOTICA", "System.Int32", "=", IDPEDIDOOTICA.ToString())); LIS_PRODUTOSPEDIDOColl = LIS_PRODUTOSPEDIDOP.ReadCollectionByParameter(RowRelatorio); return(LIS_PRODUTOSPEDIDOColl); }
private void QuantProduto(int IDPRODUTO) { LIS_PRODUTOSPEDOTICACollection LIS_PRODUTOSPEDIDOColl = new LIS_PRODUTOSPEDOTICACollection(); LIS_PRODUTOSPEDOTICAProvider LIS_PRODUTOSPEDIDOP = new LIS_PRODUTOSPEDOTICAProvider(); string DataInicial = Util.ConverStringDateSearch(msktDataInicial.Text); string DataFinal = Util.ConverStringDateSearch(msktDataFinal.Text); RowRelatorio.Clear(); RowRelatorio.Add(new RowsFiltro("DTEMISSAO", "System.DateTime", ">=", DataInicial)); RowRelatorio.Add(new RowsFiltro("DTEMISSAO", "System.DateTime", "<=", DataFinal)); RowRelatorio.Add(new RowsFiltro("IDPRODUTO", "System.Int32", "=", IDPRODUTO.ToString())); LIS_PRODUTOSPEDIDOColl = LIS_PRODUTOSPEDIDOP.ReadCollectionByParameter(RowRelatorio); foreach (var LIS_PRODUTOSPEDIDOTy in LIS_PRODUTOSPEDIDOColl) { QuantTotal += Convert.ToDecimal(LIS_PRODUTOSPEDIDOTy.QUANTIDADE); ValorTotal += Convert.ToDecimal(LIS_PRODUTOSPEDIDOTy.VALORTOTAL); } }