示例#1
0
        void cb_DropDownOpened(object sender, EventArgs e)
        {
            AvailableAreas.Clear();
            var opt = (Shapefiles.AreaType)Enum.Parse(typeof(Shapefiles.AreaType), ((UIActionControl.ActionContent.Children[0] as StackPanel).Children[0] as ComboBox).Text);
            var cf  = Shapefiles.Manager.Instance.GetAreasByLevel(opt).OrderBy(x => x.Name).ToList();

            foreach (var c in cf)
            {
                AvailableAreas.Add(c.Name);
            }
        }
示例#2
0
        public void LoadAvailableAreasForHome(int homeid)
        {
            AvailableAreas.Clear();
            client = new SQSAdminServiceClient();
            client.Endpoint.Address = new System.ServiceModel.EndpointAddress(CommonVariables.WcfEndpoint);
            DataSet ds = client.SQSAdmin_Generic_GetAvailabeAreasByHome(homeid);

            client.Close();
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                CommonResource.Area b = new CommonResource.Area();
                b.AreaID   = int.Parse(dr["areaid"].ToString());
                b.AreaName = dr["areaname"].ToString();
                AvailableAreas.Add(b);
            }
        }
示例#3
0
        public void LoadAvailableAreasForProduct(string productid, string keyword, string callfrom)
        {
            CommonResource.Area s;
            AvailableAreas.Clear();
            client = new SQSAdminServiceClient();
            client.Endpoint.Address = new System.ServiceModel.EndpointAddress(CommonVariables.WcfEndpoint);
            DataSet ds = client.SQSAdmin_RelatedArea_LoadAvailableAreasForProduct(productid, keyword, callfrom);

            client.Close();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                s          = new CommonResource.Area();
                s.AreaID   = int.Parse(dr["areaid"].ToString());
                s.AreaName = dr["areaname"].ToString();
                AvailableAreas.Add(s);
            }
        }