Пример #1
0
        // GET: Entries by Search
        public async Task <IActionResult> Index(int id, string searchString)
        {
            Model.PhoneBook parentPhoneBook = await PhoneBookRequestService.GetPhoneBookAsync(id);

            if (parentPhoneBook != null)
            {
                ViewBag.PhoneBookId   = parentPhoneBook.Id;
                ViewBag.PhoneBookName = parentPhoneBook.Name;
            }

            return(View(await EntriesRequestService.SearchEntriesAsync(id, searchString)));
        }
Пример #2
0
        // GET: PhoneBooks/Edit/5
        public async Task <IActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var phoneBook = await PhoneBookRequestService.GetPhoneBookAsync(id);

            if (phoneBook == null)
            {
                return(NotFound());
            }
            return(View(phoneBook));
        }