Beispiel #1
0
        public IActionResult UpdateReferences(int id)
        {
            var reference = referencesServices.GetAllReferencesService().Where(r => r.ReferenceId == id).FirstOrDefault();

            if (reference.ReferenceLogo == null)
            {
                reference.ReferenceLogo = "resimyok.png ";
            }
            var categories = referenceCategoriesServices.GetAlReferenceCategoriesService().ToList();
            AllReferencesDTO allReferencesDTO = new AllReferencesDTO();

            allReferencesDTO.referencessDTO         = reference;
            allReferencesDTO.referenceCategoriesDTO = categories;
            allReferencesDTO.selectedIndex          = reference.ReferenceCategoryId;

            return(View(allReferencesDTO));
        }
Beispiel #2
0
        public IActionResult Index()
        {
            var referencecategory = referenceCategoriesServices.GetAlReferenceCategoriesService().ToList();

            return(View(referencecategory));
        }