public ActionResult SetForm(string id) { WanWuYunDevice entity = re.FindEntity(id); if (entity == null) { return(Content("")); } string strJson = JsonConvert.SerializeObject(entity); return(Content(strJson)); }
public ActionResult SubmitForm(string id, WanWuYunDevice entity) { if (!string.IsNullOrEmpty(id)) { entity.ID = id; re.Update(entity); } else { entity.ID = CommonHelper.GetGuid; re.Insert(entity); } return(Content(new JsonMessage { Success = true, Code = "1", Message = "成功喽~~" }.ToString())); }