Пример #1
0
		protected override void OnInit(EventArgs e)
		{
			base.OnInit(e);

			// 未登录时自动登录
			if (ApqSession.Employee.EmID <= 0)
			{
				string LoginName = Request.Cookies["ys-LoginName"] == null ? string.Empty : Request.Cookies["ys-LoginName"].Value;
				string SqlLoginPwd = Request.Cookies["ys-SqlLoginPwd"] == null ? string.Empty : Request.Cookies["ys-SqlLoginPwd"].Value;

				if (LoginName.Length > 1 && SqlLoginPwd.Length > 2)
				{
					try
					{
						Dinner.WS.WS2 ws = new Dinner.WS.WS2();
						LoginName = Apq.Web.ExtJS.state.DecodeValue(LoginName)[1];
						SqlLoginPwd = Apq.Web.ExtJS.state.DecodeValue(SqlLoginPwd)[1];
						ws.Login_LoginNameFromCookie(LoginName, SqlLoginPwd);
					}
					catch { }
				}
			}
		}
Пример #2
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            // 未登录时自动登录
            if (ApqSession.Employee.EmID <= 0)
            {
                string LoginName   = Request.Cookies["ys-LoginName"] == null ? string.Empty : Request.Cookies["ys-LoginName"].Value;
                string SqlLoginPwd = Request.Cookies["ys-SqlLoginPwd"] == null ? string.Empty : Request.Cookies["ys-SqlLoginPwd"].Value;

                if (LoginName.Length > 1 && SqlLoginPwd.Length > 2)
                {
                    try
                    {
                        Dinner.WS.WS2 ws = new Dinner.WS.WS2();
                        LoginName   = Apq.Web.ExtJS.state.DecodeValue(LoginName)[1];
                        SqlLoginPwd = Apq.Web.ExtJS.state.DecodeValue(SqlLoginPwd)[1];
                        ws.Login_LoginNameFromCookie(LoginName, SqlLoginPwd);
                    }
                    catch { }
                }
            }
        }