public string CheckUserLogin(string comp_no_, string user_id_, string pass_word_) { BaseLogin BLogin = new BaseLogin(comp_no_, user_id_, pass_word_, "1"); string ls_login = BLogin.checkUserLogin(); return(ls_login); }
public void PageBase_Load(object sender, System.EventArgs e) { /*生成Ajax*/ // Ajax.Utility.RegisterTypeForAjax(typeof(BasePage)); try { A007_KEY = GlobeAtt.A007_KEY; A30001_KEY = GlobeAtt.A30001_KEY; } catch { A007_KEY = ""; A30001_KEY = ""; } dialog = Request.QueryString["dialog"] == null ? "0" : Request.QueryString["dialog"].ToString();//不需要日期控件 if (A007_KEY == "") { string linkcode = Request.QueryString["linkcode"] == null ? "" : Request.QueryString["linkcode"].ToString(); if (linkcode.Length > 5) { if (linkcode.IndexOf("userid") == 0) { //自动登录 string user = linkcode.Replace("userid", ""); if (user != "" && user != null) { BaseLogin BLogin = new BaseLogin("0", user, "", "0"); string ls_login = BLogin.checkUserLogin(); if (ls_login.IndexOf("02") != 0) { Session["LINK_P_URL"] = Request.Url; } } else { Session["LINK_P_URL"] = Request.Url; } } else { /*解析UCODE 包含用户信息*/ string sql = "Select pkg_user.checklogin('" + linkcode + "') as c from dual"; DataTable dt_a306 = new DataTable(); dt_a306 = Fun.getDtBySql(sql); string a306_id = dt_a306.Rows[0][0].ToString(); if (a306_id != "" && a306_id != null) { Session["LINK_A306"] = a306_id; sql = "Select t.* from A306 t where a306_id='" + a306_id + "'"; DataTable dt_user = new DataTable(); dt_user = Fun.getDtBySql(sql); string user = dt_user.Rows[0]["rec_a007"].ToString(); if (user != "" && user != null) { BaseLogin BLogin = new BaseLogin("0", user, "", "0"); string ls_login = BLogin.checkUserLogin(); if (ls_login.IndexOf("02") != 0) { Session["LINK_P_URL"] = Request.Url; } } else { Session["LINK_P_URL"] = Request.Url; } } } } try { A007_KEY = GlobeAtt.A007_KEY; A30001_KEY = GlobeAtt.A30001_KEY; } catch { A007_KEY = ""; A30001_KEY = ""; } } if (A007_KEY == "" && Request.Path.ToUpper().IndexOf("LOGIN.ASPX") < 0) { Response.Write("<script>parent.parent.location.href='" + GlobeAtt.HTTP_URL + "\\login.aspx?code=0'</script>"); } }