public string GetSystemWidgets() { AjaxResponse ajaxResponse = new AjaxResponse(); try { WidgetService widgetService = new WidgetService(); var widgets = widgetService.GetSystemWidgetList(); ajaxResponse.Data = widgets; ajaxResponse.Success = true; } catch (Exception ex) { //获取widget列表失败 ajaxResponse.Success = false; ajaxResponse.Message = ex.Message; } return(ajaxResponse.ToJson()); }
public string GetSystemWidgets() { AjaxResponse ajaxResponse = new AjaxResponse(); try { WidgetService widgetService = new WidgetService(); var widgets = widgetService.GetSystemWidgetList(); ajaxResponse.Data = widgets; ajaxResponse.Success = true; } catch (Exception ex) { //获取widget列表失败 ajaxResponse.Success = false; ajaxResponse.Message = ex.Message; } //rr = ajaxResponse.ToJson() ; //rr.Replace("null", "\"\""); //rr ="{\"Name\":\"default\",\"Label\":\"部件列表信息\",\"Description\":\"部件列表信息\"}"; return(ajaxResponse.ToJson()); }