예제 #1
0
        public async Task <IActionResult> Edit(int id, [Bind("id,organization,account,service_key,short_description,long_description,service_display_name,service_url,language,created_at,updated_at")] Result3 result3)
        {
            if (id != result3.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(result3);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Result3Exists(result3.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(result3));
        }
예제 #2
0
        public async Task <IActionResult> Edit(int id, [Bind("id,tag_text,tag_type,social_media_count,mobile_app_count,gallery_count")] Tags tags)
        {
            if (id != tags.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tags);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TagsExists(tags.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tags));
        }
예제 #3
0
        public async Task <IActionResult> Edit(int id, [Bind("id,name,info_url,mobile_app_count,social_media_count,gallery_count")] Result result)
        {
            if (id != result.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(result);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ResultExists(result.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(result));
        }