public virtual JsonResult CreateEdit(TagViewModel tag) { var poco = _tagBusiness.Get(tag.Id); poco = tag.ToModel <Tag>(poco); var res = _tagBusiness.Update(poco); return(Json(res, JsonRequestBehavior.AllowGet)); }
/// <summary> /// 保存 /// </summary> /// <param name="theData">保存的数据</param> public ActionResult SaveData(Tag theData) { if (theData.Id == 0) { _tagBusiness.Insert(theData); } else { _tagBusiness.Update(theData); } return(Success()); }