private void GetPersons(string value) { WebAPIHelper dt = new WebAPIHelper(); dt.GetDataCompleted += (s, args) => { list = args.DataResult as MapElementPaging; _listWindow.ItemCount = list.Total; CreateItems(columnList, list.Items); }; _results["ReservedField1"] = value; int pageIndex = this._listWindow.PageIndex + 1; string url = "api/MapElement/Query?pageSize=10¤tPage=" + pageIndex; dt.GetDataAsync <MapElementPaging>(url, _results); }
private void GetMonitors(string value) { MessageBox.Show("GetMonitors" + this.listWindow.PageIndex); WebAPIHelper dt = new WebAPIHelper(); dt.GetDataCompleted += (s, args) => { list = args.DataResult as MapElementPaging; listWindow.DataSource = list.Items; listWindow.ItemCount = list.Total; }; _results["ReservedField1"] = value; int pageIndex = this.listWindow.PageIndex + 1; string url = "api/MapElement/Query?pageSize=10¤tPage=" + pageIndex; dt.GetDataAsync <MapElementPaging>(url, _results); }
private void GetRound(double radius, string categoriesID, MapElement entity, string value) { WebAPIHelper dt = new WebAPIHelper(); dt.GetDataCompleted += (s, args) => { MapElementPaging list = args.DataResult as MapElementPaging; listWindow.DataSource = list.Items; listWindow.ItemCount = list.Total; }; Dictionary <string, object> dic = new Dictionary <string, object>(); dic.Add("MapElementCategoryIDArr", categoriesID); dic.Add("ReservedField1", value); int pageIndex = this.listWindow.PageIndex + 1; string url = String.Format(@"api/MapElementCoord/GetNearList?pageSize=10¤tPage={0}&x={1}&y={2}&radius={3}", pageIndex, (double)entity.X, (double)entity.Y, radius); dt.GetDataAsync <MapElementPaging>(url, dic); }
public void CreateMonitorListWindow() { TZMonitor.Width = 230; TZMonitor.Height = 450; TextBlock t = CreateHeadTextBlock("名称", new Thickness(4, 0, 0, 0)); TextBlock t1 = CreateHeadTextBlock("类型", new Thickness(121, 0, 0, 0)); listWindow.ELWListHeader.Children.Add(t); listWindow.ELWListHeader.Children.Add(t1); listWindow.WatermarkContent = "请输入名称"; listWindow.ListDataTemplate = listDataTemplate; WebAPIHelper dt = new WebAPIHelper(); dt.GetDataCompleted += (s, args) => { list = args.DataResult as MapElementPaging; listWindow.DataSource = list.Items; listWindow.ItemCount = list.Total; }; Dictionary <string, object> dic = new Dictionary <string, object>(); //dic.Add("MapElementCategoryIDArr", 1); // dic.Add("ReservedField1", ""); int pageIndex = listWindow.PageIndex + 1; string url = String.Format(@"api/MapElement/Query?pageSize=10¤tPage={0}", pageIndex); dt.GetDataAsync <MapElementPaging>(url); listWindow.PositionAllButtonClick += listWindow_PositionAllButtonClick; listWindow.ELWSearcherButtonClick += listWindow_ELWSearcherButtonClick; listWindow.PagerIndexChanged += listWindow_PagerIndexChanged; }