protected void Page_Load(object sender, EventArgs e) { UserSchoolInfo = null; if (!IsPostBack) { BindSelSchool(); if (Request.QueryString["WXID"] != null) { BindStuData(Request.QueryString["WXID"]); } } if (Request.QueryString["WXID"] == null) { divcontent.Style.Add("display", "block"); divstuInfo.Style.Add("display", "none"); divSuccess.Style.Add("display", "none"); return; } cmd = Request.Form["subCmd"]; //通过页面验证,执行登录操作 if (cmd == "Login") { WeiXinUsers user = new WeiXinUsers(); UserInfo users = new UserInfo(); string schoolId = selSchool.Items[selSchool.SelectedIndex].Value; if (schoolId == "-1") { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = "请选择学校"; } users.LoginId = txt_LoginID.Value; users.Password = txt_Password.Value; if (loginHandle(users, schoolId)) { user.WeixinID = Request.QueryString["WXID"]; user.CardNo = txt_LoginID.Value; user.SchoolInfo = new AMS_School { Id = Convert.ToInt32(schoolId) }; spanWarmInfo.Visible = true; spanWarmInfo.InnerText = WeiXinProxy.BindUserInfo(user); AMS_School school = AMS_SchoolProxy.GetSchoolById(int.Parse(schoolId)); CookiesManager.SetCookies(user.CardNo, txt_Password.Value, schoolId); } } }
/// <summary> /// 获取单个图书馆信息 /// </summary> /// <param name="schoolId"></param> /// <returns></returns> public AMS_School GetSingleSchoolInfoByID(string schoolId) { return(AMS_SchoolProxy.GetSchoolById(int.Parse(schoolId))); }
/// <summary> /// 获取全部的学校 /// </summary> /// <returns></returns> public List <AMS_School> GetWeCharSchoolList() { return(AMS_SchoolProxy.GetAllSchool()); }