Exemplo n.º 1
0
        public void Export()
        {
            IMemberlevelService memberlevelService = UnityHelper.UnityResolve <IMemberlevelService>();
            QueryEntity         qe = InitQueryEntity();

            qe.IsGetAll = true;
            var data = memberlevelService.GetMemberlevelByQueryList(qe);

            Export2Excel("Memberlevel.xls", data);
        }
Exemplo n.º 2
0
        public string GetAllMemberlevel()
        {
            IMemberlevelService tmpService = UnityHelper.UnityResolve <IMemberlevelService>();
            var data = tmpService.GetMemberlevelByQueryList(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);
        }