//Price Line File joined with Price Change Header File //Has records for RePrice and Markdowns (first and further) //we get relevant records based on RePriceorMarkdownCode public List <PDLPRCP> GetLinePriceFile(int styleNumber) { List <PDLPRCP> pdlprcp = null; try { string sql = QueryBuilder.MerretLinePriceFileQuery(styleNumber); DataTable dt = MerretDb.ExecuteQuery(nameof(PDLPRCP), sql); pdlprcp = MerretMapper.PDLPRCPFromDataTable(dt); } catch (Exception e) { var mde = new MerretDataException("MerretRepository::GetLinePriceFile exception", e); log.Error(mde); } return(pdlprcp); }
//Price Line File joined with Price Change Header File //Has records for RePrice and Markdowns (first and further) //we get relevant records based on RePriceorMarkdownCode public List <PDLPRCP> GetLinePriceFile(DateTime updateFrom) { List <PDLPRCP> pdlprcp = null; //TODO: REFACTOR THIS GUY AND THE OTHER GetLinePriceFile BELOW try { string sql = QueryBuilder.MerretLinePriceFileQuery(updateFrom); DataTable dt = MerretDb.ExecuteQuery(nameof(PDLPRCP), sql); pdlprcp = MerretMapper.PDLPRCPFromDataTable(dt); } catch (Exception e) { var mde = new MerretDataException("MerretRepository::GetLinePriceFile exception", e); log.Error(mde); } return(pdlprcp); }
public List <PDPRODP> GetProducts(int styleNumber, string colourCode = null, string sizeCode = null) { List <PDPRODP> products = null; try { string sql = QueryBuilder.MerretProductFileQuery(styleNumber, colourCode, sizeCode); DataTable dt = MerretDb.ExecuteQuery(nameof(PDPRODP), sql); products = MerretMapper.PDPRODPFromDataTable(dt); } catch (Exception e) { var mde = new MerretDataException("MerretRepository::GetProducts exception", e); log.Error(mde); } return(products); }