Example #1
0
        // GET: StructSubvisions/Edit/5
        public async Task <IActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var structSubvision = await _context.StructSubvisions.SingleOrDefaultAsync(m => m.StructSubvisionId == id);

            if (structSubvision == null)
            {
                return(NotFound());
            }
            ViewData["StructSubvisionAdressId"]    = new SelectList(_context.Addresses, "AddressId", "GetAddress", structSubvision.StructSubvisionAdressId);
            ViewData["StructSubvisionEmails"]      = new SelectList(_context.Emails, "EmailId", "EmailValue", structSubvision.StructSubvisionEmailId);
            ViewData["StructSubvisionPostChiefId"] = new SelectList(_context.Posts, "PostId", "PostName", structSubvision.StructSubvisionPostChiefId);
            ViewData["StructSubvisionTypes"]       = new SelectList(_context.StructSubvisionTypes, "StructSubvisionTypeId", "StructSubvisionTypeName", structSubvision.StructSubvisionTypeId);
            ViewData["files"] = new SelectList((await GetFileDataTypePolojenOStructPodrazd()).FileToFileTypes, "FileModelId", "FileModel.Name");
            ViewBag.Users     = _selectListRepository.GetSelectListAppUsers();
            return(View(structSubvision));
        }
Example #2
0
 // GET: Students/Create
 public IActionResult Create()
 {
     ViewData["AppUserId"]      = _selectListRepository.GetSelectListAppUsers();
     ViewData["StudentGroupId"] = new SelectList(_context.StudentGroups.Include(g => g.EduKurs).OrderBy(g => g.StudentGroupName), "StudentGroupId", "StudentGroupName");
     return(View());
 }
Example #3
0
 // GET: Teachers/Create
 public IActionResult Create()
 {
     ViewData["AppUserId"] = _selectListRepository.GetSelectListAppUsers();
     return(View());
 }