Пример #1
0
        public async Task <List <GoodCellModel> > SearchGoodsNameGoodCells(GoodsSelectorName goodsSelectorName)
        {
            var parameters         = _parametersCreator.GetGoodsParametersByName(goodsSelectorName).ToArray();
            var goodsDbInformation = await _context.GetGoodsDbInformation("GetGoodsByName", parameters);

            return(goodsDbInformation.GoodCells);
        }
Пример #2
0
        public async Task <GoodsInformation <string> > SearchGoodsNameInformation(GoodsSelectorName goodsSelectorName)
        {
            var parameters         = _parametersCreator.GetGoodsParametersByName(goodsSelectorName).ToArray();
            var goodsDbInformation = await _context.GetGoodsDbInformation("GetGoodsByName", parameters);

            var questions = _questionsGrouper.GroupGoods(goodsSelectorName, goodsDbInformation.DBQuestions);

            return(new GoodsInformation <string>(_parametersCreator.GetCount(parameters), goodsDbInformation.GoodCells, questions));
        }
Пример #3
0
 public GoodsNameInformationSearcherFactory(IGoodsInformationSearcher goodsInformationSearcher,
                                            IGoodCellsSearcher goodCellsSearcher,
                                            ICacheKeyCreator keyCreator,
                                            GoodsSelectorName goodsSelectorName)
 {
     _goodsInformationSearcher = goodsInformationSearcher;
     _goodCellsSearcher        = goodCellsSearcher;
     _keyCreator        = keyCreator;
     _goodsSelectorName = goodsSelectorName;
 }
        public List <SqlParameter> GetGoodsParametersByName(GoodsSelectorName goodsSelectorName)
        {
            List <SqlParameter> sqlParameters = new List <SqlParameter>();

            sqlParameters.AddRange(GetGoodsParameters(goodsSelectorName));
            if (goodsSelectorName.Name != null)
            {
                sqlParameters.Add(CreateNameParameter(goodsSelectorName.Name));
            }
            return(sqlParameters);
        }
Пример #5
0
 public async Task <GoodsInformation <string> > GetGoodsInformation([FromBody] GoodsSelectorName goodsSelectorName)
 {
     return(await _goodsInformationCreator.CreateGoodsInformation(goodsSelectorName, new GoodsNameInformationSearcherFactory(_goodsInformationSearcher, _goodCellsSearcher, _keyCreator, goodsSelectorName)));
 }