public void Export() { IItempropertyService itempropertyService = UnityHelper.UnityResolve <IItempropertyService>(); QueryEntity qe = InitQueryEntity(); qe.IsGetAll = true; var data = itempropertyService.GetItempropertyByQueryList(qe); Export2Excel("Itemproperty.xls", data); }
public string GetAllItemproperty() { IItempropertyService tmpService = UnityHelper.UnityResolve <IItempropertyService>(); var data = tmpService.GetItempropertyByQueryList(InitQueryEntity()); Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter(); timeConverter.DateTimeFormat = ConstUtils.CONST_SHOW_DATE_FORMAT; var tmpdata = JsonConvert.SerializeObject(data.Tables[2], timeConverter); var result = "{\"total\":" + data.Tables[1].Rows[0]["TotalRecordsCount"].ToString() + ",\"rows\":" + tmpdata + " }"; return(result); }