/// <summary> /// 首页 /// </summary> /// <returns></returns> public ActionResult Add(InqueryModel model) { var result = new Dictionary <string, object>(); CodeHelper.AddCodeErrorCount(CodeName); if (IsShowCode && !CodeHelper.ValidateCode(model.Code, "InqueryCode")) { result.Add("Status", false); result.Add("Message", "codererror"); } else { var entity = new InqueryEntity { Mobile = model.Mobile, Linkman = model.Linkman, Content = model.Content, Site = new SiteEntity { Id = SiteId }, SaveType = SaveType.Add }; var rev = this.SaveEntity(entity); result.Add("Status", rev); } return(this.Jsonp(result)); }
public virtual ActionResult Remove(string[] id) { var result = new Dictionary <string, object>(); var rev = false; if (id != null) { var infos = new List <InqueryEntity>(); foreach (var i in id) { var info = new InqueryEntity { Id = i.Convert <long>(), SaveType = SaveType.Remove }; infos.Add(info); } rev = this.SaveEntities(infos); } result.Add("Status", rev); return(this.Jsonp(result)); }