public JsonResult Editar(Conteudo model, List<Conteudo_Idioma> Conteudo_Idiomas)
        {
            foreach (var item in Conteudo_Idiomas) { model.Conteudo_Idioma.Add(item); }

            new ConteudoService().UpdateObject(model);

            return Json(new JsonRequestResult { ResultType = JsonRequestResultType.Success, Message = Constants._msgUpdateSuccess, ReturnUrl = Url.Content("~/Admin/Conteudo/") }, JsonRequestBehavior.AllowGet);
        }
        public ActionResult Novo(Conteudo model, List<Conteudo_Idioma> Conteudo_Idiomas)
        {
            foreach (var item in Conteudo_Idiomas) { model.Conteudo_Idioma.Add(item); }

            model.DataInclusao = DateTime.Now;

            new ConteudoService().InsertObject(model);

            return Json(new JsonRequestResult { ResultType = JsonRequestResultType.Success, Message = Constants._msgCreateSuccess, ReturnUrl = Url.Content("~/Admin/Conteudo/") });
        }
        public ActionResult Novo()
        {
            var CC = new ConteudoCategoriaController();
            ViewBag.Conteudo = CC.GetContentCategoriesSelectListItem(new ConteudoCategoriaService().GetAll(), null);
            ViewBag.TipoConteudo = GetTypeContentSelectListItem(new ConteudoService().GetTypeContentSelectListItem(), null);
            ViewBag.Idiomas = new IdiomaService().GetAll();

            var conteudo = new Conteudo { IsAtivo = true, DataPublicacao = DateTime.Now };
            return View(conteudo);
        }
 /// <summary>
 /// Create a new Conteudo object.
 /// </summary>
 /// <param name="idConteudo">Initial value of the IdConteudo property.</param>
 /// <param name="idConteudoCategoria">Initial value of the IdConteudoCategoria property.</param>
 /// <param name="idTipoConteudo">Initial value of the IdTipoConteudo property.</param>
 /// <param name="nome">Initial value of the Nome property.</param>
 /// <param name="dataInclusao">Initial value of the DataInclusao property.</param>
 /// <param name="dataPublicacao">Initial value of the DataPublicacao property.</param>
 /// <param name="isAtivo">Initial value of the IsAtivo property.</param>
 public static Conteudo CreateConteudo(global::System.Int32 idConteudo, global::System.Int32 idConteudoCategoria, global::System.Int32 idTipoConteudo, global::System.String nome, global::System.DateTime dataInclusao, global::System.DateTime dataPublicacao, global::System.Boolean isAtivo)
 {
     Conteudo conteudo = new Conteudo();
     conteudo.IdConteudo = idConteudo;
     conteudo.IdConteudoCategoria = idConteudoCategoria;
     conteudo.IdTipoConteudo = idTipoConteudo;
     conteudo.Nome = nome;
     conteudo.DataInclusao = dataInclusao;
     conteudo.DataPublicacao = dataPublicacao;
     conteudo.IsAtivo = isAtivo;
     return conteudo;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Conteudo EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToConteudo(Conteudo conteudo)
 {
     base.AddObject("Conteudo", conteudo);
 }