public IActionResult CreateOrEditArticle(int?id)
        {
            Article article = _articlesRepository.GetArticle(id);

            if (article == null)
            {
                article = new Article();
            }

            ViewBag.Authors         = _selectListRepository.GetSelectListAuthors();
            ViewBag.ScienceJournals = _selectListRepository.GetSelectListScienceJournals(article.ScienceJournalId);
            ViewBag.Years           = _selectListRepository.GetSelectListYears(article.YearId);
            ViewBag.NirSpecials     = _selectListRepository.GetSelectListNirSpecials();
            ViewBag.NirTemas        = _selectListRepository.GetSelectListNirTemas();

            return(View(article));
        }
Пример #2
0
        // GET: Patents/CreateOrEditPatent
        public IActionResult CreateOrEdit(int?id)
        {
            Patent patent = _patentRepository.GetPatent(id);

            if (patent == null)
            {
                return(NotFound());
            }

            ViewBag.Authors     = _selectListRepository.GetSelectListAuthors();
            ViewBag.Years       = _selectListRepository.GetSelectListYears();
            ViewBag.PatentVids  = _selectListRepository.GetSelectListPatentVids();
            ViewBag.NirSpecials = _selectListRepository.GetSelectListNirSpecials();
            ViewBag.NirTemas    = _selectListRepository.GetSelectListNirTemas();

            return(View(patent));
        }
        // GET: Monografs/CreateOrEdit
        public IActionResult CreateOrEdit(int?id)
        {
            Monograf monograf = _monografRepository.GetMonograf(id);

            if (monograf == null)
            {
                return(NotFound());
            }

            ViewBag.Authors     = _selectListRepository.GetSelectListAuthors();
            ViewBag.Years       = _selectListRepository.GetSelectListYears(monograf.YearId);
            ViewBag.NirSpecials = _selectListRepository.GetSelectListNirSpecials();
            ViewBag.NirTemas    = _selectListRepository.GetSelectListNirTemas();


            //ViewData["FileModelId"] = new SelectList(_context.Files, "Id", "Name");
            //ViewData["RowStatusId"] = new SelectList(_context.RowStatuses, "RowStatusId", "RowStatusName");
            //ViewData["YearId"] = new SelectList(_context.Years, "YearId", "YearName");

            return(View(monograf));
        }
Пример #4
0
        public IActionResult CreateOrEditArticle(int?id)
        {
            Article article = _userProfileRepository.GetArticle(id, User.Identity.Name);

            if (article == null)
            {
                return(NotFound());
            }

            ViewBag.Authors         = _selectListRepository.GetSelectListAuthors();
            ViewBag.ScienceJournals = _selectListRepository.GetSelectListScienceJournals(article.ScienceJournalId);
            ViewBag.Years           = _selectListRepository.GetSelectListYears(article.YearId);
            ViewBag.NirSpecials     = _selectListRepository.GetSelectListNirSpecials();
            ViewBag.NirTemas        = _selectListRepository.GetSelectListNirTemas();

            return(View(article));
        }