Ejemplo n.º 1
0
        public void Logined(int i)
        {
            string postData = @"{'loginTheme':'defaultTheme','password':'******','secPassword':'','service':'','username':'******','uuid':'e69e32dc-d56a-4956-a9a9-f61b897d3606','verifyCode':''}";

            cookieContainers.Add(i, WebClientExt.GetCooKie(ConfigurationSettings.AppSettings["LoginUrl"], postData));

            members[i].LoginState = "登陆成功";
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 县市数据绑定
        /// </summary>
        /// <param name="href"></param>
        private void CountyDataBind(string href)
        {
            string url = ConfigurationSettings.AppSettings["city"] + href + ".html";

            List <ProCityCounty> countys = new List <ProCityCounty>();

            string[] data = WebClientExt.GetHtmlData(url).Replace("||", "|").Split('|');
            foreach (var d in data)
            {
                ProCityCounty county = new ProCityCounty();
                county.Name = Regex.Replace(d, @"[^\u4e00-\u9fa5]", "").ToString();
                county.Href = Regex.Replace(d, @"\D", "").ToString();
                countys.Add(county);
            }
            CbCounty.DataSource    = countys;
            CbCounty.DisplayMember = "Name";
            CbCounty.ValueMember   = "Href";
        }