public async Task <IActionResult> Restructuring([Required] string id) { var subordinateSubdivision = await _services.GetSubordinateSubdivisionsForMvc(id); ViewBag.MainSubdivision = await _dropDownList.GetMainSubdivision(); ViewBag.SubordinateSubdivision = new SelectList(subordinateSubdivision, "Key", "Value"); return(View()); }
//------------------------------------------------------------------------------------------------------------------------------------------ private async Task FillingDropDownLists() { ViewBag.MainSubdivision = await _dropDownList.GetMainSubdivision(); ViewBag.Position = await _dropDownList.GetPosition(); ViewBag.Privilegies = await _dropDownList.GetPrivilegies(); ViewBag.Hobby = await _dropDownList.GetHobby(); ViewBag.Dormitory = await _dropDownList.GetDormitory(); ViewBag.Departmental = await _dropDownList.GetDepartmental(); ViewBag.Accommodation = new List <ArrayList> { new ArrayList { "dormitory", 0, "Гуртожиток" }, new ArrayList { "departmental", 1, "Вiдомче житло" }, new ArrayList { "from-university", 2, "Житло надане унiверситетом" } }; ViewBag.TypeBirthDate = new List <ArrayList> { new ArrayList { "employeeBirthDate", 0, "Член профспілки" }, new ArrayList { "childrenBirthDate", 1, "Дiти" }, new ArrayList { "grandChildrenBirthDate", 2, "Онуки" } }; ViewBag.TypeHobby = new List <ArrayList> { new ArrayList { "employeeHobby", 0, "Член профспілки" }, new ArrayList { "childrenHobby", 1, "Дiти" }, new ArrayList { "grandChildrenHobby", 2, "Онуки" } }; }
//------------------------------------------------------------------------------------------------------------------------------------------ private async Task FillingDropDownLists() { await FillingStudyDropDownLists(); ViewBag.MainSubdivision = await _dropDownList.GetMainSubdivision(); ViewBag.Position = await _dropDownList.GetPosition(); ViewBag.Dormitory = await _dropDownList.GetDormitory(); ViewBag.Departmental = await _dropDownList.GetDepartmental(); await FillingScientificDropDownLists(); ViewBag.SocialActivity = await _dropDownList.GetSocialActivity(); ViewBag.Privilegies = await _dropDownList.GetPrivilegies(); }