Example #1
0
        /// <summary>
        /// 绑定界面学校下拉列表
        /// </summary>
        private void BindSelSchool()
        {
            List <AMS_School> schoolList = new List <AMS_School>();

            try
            {
                schoolList = weiXinSercive.GetWeCharSchoolList();
            }
            catch
            {
                spanWarmInfo.Visible   = true;
                spanWarmInfo.InnerText = "获取学校信息失败。";
                Session.Clear();
                return;
                //Response.Redirect("ErrorPage.aspx");
            }
            ListItem item = new ListItem("-请选择学校-", "-1");

            selSchool.Items.Add(item);
            foreach (ListItem items in from t in schoolList where t.IsSeatBespeak select new ListItem(t.Name, t.Id.ToString()))
            {
                selSchool.Items.Add(items);
            }
        }