private void SetCartInfos(ItemInfoViewModel item, List <ItemInfoViewModel> cartInfos = null)
        {
            if (cartInfos == null)
            {
                cartInfos = _context.Session.Get <List <ItemInfoViewModel> >(_sessionKeyCartName);

                if (cartInfos == null)
                {
                    cartInfos = new List <ItemInfoViewModel>();
                }
            }

            cartInfos.Add(item);

            _context.Session.Set <List <ItemInfoViewModel> >(_sessionKeyCartName, cartInfos);
        }
Exemple #2
0
        public IActionResult SetHerPermission(ItemInfoViewModel model)
        {
            AppSettings appSettings = heritageRepository.GetAppSettings(_config);

            ItemInfoViewModel model_  = new ItemInfoViewModel();
            HerItem           herItem = new HerItem()
            {
                LN_FN = "Grigor Grigoryan", country = "Armenia", province = "Ararat", city = "Artashat", isEditable = false, isOpend = true
            };
            List <HerItem> herItems = new List <HerItem>()
            {
                herItem
            };

            model_.herItems = herItems;
            //CardIds cardIds = heritageRepository.GetLevelsAsIntList(id);
            //HeritageViewModel model = heritageRepository.GetHerEditModelByLevels(cardIds);

            //model.user_id = 2;
            //model.lName = "albert";
            return(View("SetHerPermission", model_));
        }