private async void Btn_Search1_Click(object sender, RoutedEventArgs e) { String str1 = cb_Main.SelectedValue == null ? "" : cb_Main.SelectedValue.ToString(); String str2 = cb_Serv1.SelectedValue == null ?"": cb_Serv1.SelectedValue.ToString(); String str3 = cb_Serv2.SelectedValue == null ? "" : cb_Serv2.SelectedValue.ToString(); AreaDataModel item = itemList.Where(a => a.Step1 == str1 && a.Step2 == str2 && a.Step3 == str3).FirstOrDefault(); if (item != null) { String buf = await Request_Weather(item.X, item.Y); //ParseWeatherJson(buf); //umc_MapControl.SetLocation(Convert.ToDouble(item.Lng), Convert.ToDouble(item.Lat)); //String path = "ms-appx:///Assets/img1"; //umc_MapControl.SetPOI(Convert.ToDouble(item.Lng), Convert.ToDouble(item.Lat), "노원구", path, path, null); //for (int i = 0; i < itemList.Count(); i++) //{ List <ResponsData> itemLists = ParseWeatherJson(buf); if (itemLists != null && itemLists.Count() > 0) { String sky = itemLists.Where(a => a.Category == "SKY").Select(a => a.ObsrValue).FirstOrDefault(); String pty = itemLists.Where(a => a.Category == "PTY").Select(a => a.ObsrValue).FirstOrDefault(); String RN1 = itemLists.Where(a => a.Category == "RN1").Select(a => a.ObsrValue).FirstOrDefault(); String R06 = itemLists.Where(a => a.Category == "R06").Select(a => a.ObsrValue).FirstOrDefault(); String S06 = itemLists.Where(a => a.Category == "S06").Select(a => a.ObsrValue).FirstOrDefault(); String LGT = itemLists.Where(a => a.Category == "LGT").Select(a => a.ObsrValue).FirstOrDefault(); String UUU = itemLists.Where(a => a.Category == "UUU").Select(a => a.ObsrValue).FirstOrDefault(); String VVV = itemLists.Where(a => a.Category == "VVV").Select(a => a.ObsrValue).FirstOrDefault(); sky = String.IsNullOrEmpty(sky) == true ? "" : sky; pty = String.IsNullOrEmpty(pty) == true ? "" : pty; RN1 = String.IsNullOrEmpty(RN1) == true ? "" : RN1; R06 = String.IsNullOrEmpty(R06) == true ? "" : R06; S06 = String.IsNullOrEmpty(S06) == true ? "" : S06; LGT = String.IsNullOrEmpty(LGT) == true ? "" : LGT; UUU = String.IsNullOrEmpty(UUU) == true ? "" : UUU; VVV = String.IsNullOrEmpty(VVV) == true ? "" : VVV; umc_MapControl.SetPOI(Convert.ToDouble(item.Lng), Convert.ToDouble(item.Lat), "", sky, pty, RN1, S06, LGT, UUU, VVV); umc_MapControl.SetLocation(Convert.ToDouble(item.Lng), Convert.ToDouble(item.Lat)); // } //} } } }
//public void ResgistShowAreaProperty(Action<string> showAreaProperty) //{ // this.showAreaProperty = showAreaProperty; //} public void QueryAreaList(string wareInfo) { ViewDataManager.WAREAREAVIEWDATA.AreaListData.Clear(); WH_WareHouseModel house = bllWareHouse.GetModelByName(wareInfo); if (house == null) { return; } List <WH_AreaModel> areaList = bllArea.GetModels(house.WareHouse_ID); if (areaList == null) { return; } foreach (WH_AreaModel area in areaList) { if (area.Area_Type == "暂存区") { continue; //暂存区不显示 } AreaDataModel model = new AreaDataModel(); model.区域名称 = area.Area_Name; //model.区域启用状态 = area.Area_Flag; model.区域类型 = area.Area_Type; model.区域编号 = area.Area_ID; model.区域编码 = area.Area_Code; model.区域颜色 = area.Area_BackColor; //if(area.Area_Flag =="1") //{ // model.区域启用状态 = "是"; //} //else //{ // model.区域启用状态 = "否"; //} model.库房名称 = area.WareHouse_ID; ViewDataManager.WAREAREAVIEWDATA.AreaListData.Add(model); } }