Esempio n. 1
0
        // GET: Posts/Edit/5
        public async Task <IActionResult> EditBlog(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var post = await _context.Posts.SingleOrDefaultAsync(m => m.Id == id);

            if (post == null)
            {
                return(NotFound());
            }
            //ViewData["Body"] = (post.Body).Replace("<br/>", "\n");
            ViewData["CommunityId"] = new SelectList(_context.Set <Community>(), "Id", "Name", post.CommunityId);
            return(View(post));
        }
Esempio n. 2
0
 // GET: TicketReplies/Create
 public IActionResult Create(int tid)
 {
     ViewData["TicketId"] = new SelectList(_context.Set <Ticket>().Where(a => a.Id == tid).OrderByDescending(a => a.Id), "Id", "Subject");
     return(View());
 }