Ejemplo n.º 1
0
        public ActionResult Edit(Types model, int id = -1)
        {
            int count = id == -1 ? Dal.Insert(model) : Dal.Update(model);

            if (count == -1)
            {
                return(Content("操作失败"));
            }
            else
            {
                return(Redirect(@Url.Action("List") + Request.Url.Query));
            }
        }