public JsonResult Editar(Ecommerce_Linha model, List<Ecommerce_Linha_Idioma> Ecommerce_Linha_Idiomas) { foreach (var item in Ecommerce_Linha_Idiomas) { model.Ecommerce_Linha_Idioma.Add(item); } new LinhaService().UpdateObject(model); return Json(new JsonRequestResult { ResultType = JsonRequestResultType.Success, Message = Constants._msgUpdateSuccess, ReturnUrl = Url.Content("~/Admin/Linha/") }, JsonRequestBehavior.AllowGet); }
public ActionResult Novo() { ViewBag.Parents = GetLineSelectListItem(new LinhaService().GetAll(), null); ViewBag.Idiomas = new IdiomaService().GetAll(); var conteudo = new Ecommerce_Linha() { IsAtivo = true }; return View(conteudo); }
public ActionResult Novo(Ecommerce_Linha model, List<Ecommerce_Linha_Idioma> Ecommerce_Linha_Idiomas) { foreach (var item in Ecommerce_Linha_Idiomas) { model.Ecommerce_Linha_Idioma.Add(item); } model.DataInclusao = DateTime.Now; new LinhaService().InsertObject(model); return Json(new JsonRequestResult { ResultType = JsonRequestResultType.Success, Message = Constants._msgCreateSuccess, ReturnUrl = Url.Content("~/Admin/Linha/") }); }
/// <summary> /// Create a new Ecommerce_Linha object. /// </summary> /// <param name="idLinha">Initial value of the IdLinha property.</param> /// <param name="nome">Initial value of the Nome property.</param> /// <param name="dataInclusao">Initial value of the DataInclusao property.</param> /// <param name="isAtivo">Initial value of the IsAtivo property.</param> public static Ecommerce_Linha CreateEcommerce_Linha(global::System.Int32 idLinha, global::System.String nome, global::System.DateTime dataInclusao, global::System.Boolean isAtivo) { Ecommerce_Linha ecommerce_Linha = new Ecommerce_Linha(); ecommerce_Linha.IdLinha = idLinha; ecommerce_Linha.Nome = nome; ecommerce_Linha.DataInclusao = dataInclusao; ecommerce_Linha.IsAtivo = isAtivo; return ecommerce_Linha; }
/// <summary> /// Deprecated Method for adding a new object to the Ecommerce_Linha EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToEcommerce_Linha(Ecommerce_Linha ecommerce_Linha) { base.AddObject("Ecommerce_Linha", ecommerce_Linha); }