public string Item() { MSystemLog entity = new MSystemLog(); entity.SetData(Request.Form); entity.TrimEmptyProperty(); string id = Request.Form["__id"]; IResult result = SystemLogService.Instance.Save(id, entity); return(result.ToString()); }
/// <summary> /// 查询列表数据 /// </summary> /// <param name="nvc">参数集合</param> /// <returns></returns> public SystemLogListModel Query(NameValueCollection nvc) { SystemLogListModel model = new SystemLogListModel(); MSystemLog entity = new MSystemLog(); model.PageSize = CommFun.ToInt(nvc["ps"], SettingHelper.Instance.GetInt("PageSize", 10)).Value; model.PageIndex = CommFun.ToInt(nvc["pi"], SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1; entity.SetData(nvc, false); entity.TrimEmptyProperty(); entity.AddData(":PS", model.PageSize); entity.AddData(":PI", model.PageIndex); model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getCount", entity), 0).GetValueOrDefault(); if (model.TotalCount > 0) { model.List = handler.GetDataListByTemplate("getList", entity); } return(model); }