예제 #1
0
        //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);
        }
예제 #2
0
        //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);
        }
예제 #3
0
        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);
        }