private void PopularLabelBlogs() { int id_blogs = 0; int id_post = Convert.ToInt32(Session["post"]); PostDAO postDAO = new PostDAO(); var lista = postDAO.ObterTextoPorPost(id_post); lista.ForEach(item => id_blogs = item.id_blog); BlogDAO blogDAO = new BlogDAO(); var list = blogDAO.ObterBlogPorId(id_blogs); lblTemaBlog.Text = list.tema_blog; var lis = blogDAO.ObterBlogPorId(id_blogs); lblNomeBlog.Text = lis.nome_blog; blogDAO.Dispose(); postDAO.Dispose(); }
private void PopularLabelTemaPost() { BlogDAO blogDAO = new BlogDAO(); try { var list = blogDAO.ObterBlogPorId(Convert.ToInt32(ddlListaBlogs.SelectedItem.Value)); lblTemaBlog.Text = list.tema_blog; } catch (Exception) { } blogDAO.Dispose(); }