Esempio n. 1
0
        public IActionResult RemovePhoto([FromBody] Heritage heritage)
        {
            AppSettings appSettings = heritageRepository.GetAppSettings(_config);
            string      folderPath  = _environment.WebRootPath;
            RetSimple   retVal      = new RetSimple {
                success = false, message = "There was problem to remove photo."
            };

            //string card_id = "";
            if (heritage?.hers != null && heritage?.hers.Count > 0)
            {
                retVal = heritageRepository.RemovePhoto((heritage.hers[0]).id, folderPath, appSettings.emptyPhoto);
            }

            return(new JsonResult(retVal));
        }
Esempio n. 2
0
        // GET: /<controller>/
        public IActionResult HerEdit(string id)
        {
            AppSettings appSettings = heritageRepository.GetAppSettings(_config);

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

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