/// <summary>
        /// 绑定学校列表
        /// </summary>
        public void BindSchoolList()
        {
            string functionName = "BindSchoolList";

            try
            {
                List <AMS.Model.AMS_ProvinceSchoolInfo> List = AMS.ServiceProxy.IssuedInfoWindow.GetSchoolList();
                SchoolList.Clear();
                SchoolList.Add(new AMS.Model.AMS_School()
                {
                    Number = "-1", Name = "请选择"
                });
                foreach (AMS.Model.AMS_ProvinceSchoolInfo model in List)
                {
                    foreach (AMS.Model.AMS_School modelChild in model.Schools)
                    {
                        SchoolList.Add(modelChild);
                    }
                }
            }
            catch (AMS.Model.CustomerException ex)
            {
                ErrorMessage = string.Format("{0} 出自{1}.{2}", ex.Message, ex.ErrorSourcesClass, ex.ErrorSourcesFunction);
            }
            catch (Exception ex)
            {
                ErrorMessage = string.Format("{0} 出自{1}.{2}", ex.Message, CLASSNAME, functionName);
            }
        }
Пример #2
0
        /// <summary>
        /// 绑定学校列表
        /// </summary>
        public void BindSchool()
        {
            SchoolList.Clear();
            List <AdvertManage.Model.AMS_SchoolModel> schoolList = AdvertManage.BLL.AMS_SchoolBLL.GetAllSchoolInfo();

            SchoolList.Add(new AdvertManage.Model.AMS_SchoolModel()
            {
                Id = -1, Name = "请选择"
            });
            foreach (AdvertManage.Model.AMS_SchoolModel model in schoolList)
            {
                SchoolList.Add(model);
            }
        }