public string GetBespeakSeatSchoolList() { List <SeatManage.JsonModel.JM_SchoolModel> jm_schools = new List <SeatManage.JsonModel.JM_SchoolModel>(); if (myHeader.UserName.Equals(soapUserName) && SeatManage.SeatManageComm.MD5Algorithm.GetMD5Str32(myHeader.PassWord).Equals(soapPwd)) { List <AMS.Model.AMS_School> schoolList = new TcpClient_BespeakSeat.TcpClient_Login().GetAllSchoolFromLocal(); for (int i = 0; i < schoolList.Count; i++) { if (schoolList[i].IsSeatBespeak) { SeatManage.JsonModel.JM_SchoolModel jm_school = new SeatManage.JsonModel.JM_SchoolModel(); jm_school.SchoolId = schoolList[i].Id.ToString(); jm_school.SchoolName = schoolList[i].Name; jm_school.SchoolNum = schoolList[i].ConnectionString; jm_schools.Add(jm_school); } } return(SeatManage.SeatManageComm.JSONSerializer.Serialize(jm_schools)); } else { return(SeatManage.SeatManageComm.JSONSerializer.Serialize(new SeatManage.JsonModel.JM_HandleResult() { Result = false, Msg = "没有权限!" })); } }
/// <summary> /// 绑定界面学校下拉列表 /// </summary> private void BindSelSchool() { List <AMS.Model.AMS_School> schoolList = new TcpClient_BespeakSeat.TcpClient_Login().GetAllSchoolFromLocal(); ListItem item = new ListItem("-请选择学校-", "-1"); selSchool.Items.Add(item); for (int i = 0; i < schoolList.Count; i++) { if (schoolList[i].IsSeatBespeak) { ListItem items = new ListItem(schoolList[i].Name, schoolList[i].Id.ToString()); selSchool.Items.Add(items); } } }