62,041
社区成员
发帖
与我相关
我的任务
分享
if (context.Request.QueryString["type"] != null)//登陆
{
KyLaw.BLL.KY_USER user = new KyLaw.BLL.KY_USER();
string name=context.Request.QueryString["name"].ToString();
string pwd=context.Request.QueryString["pwd"].ToString();
if (user.GetDengLu(name,pwd).Tables[0].Rows.Count > 0)//成功登陆
{
context.Session["UserName"] = model.USER_NAME;
context.Session["UserType"] = model.USER_TYPE;
context.Response.ContentType = "text/plain";
context.Response.Write("1");
}
else//登陆失败
{
context.Response.ContentType = "text/plain";
context.Response.Write("0");
}
}
if (context.Request.QueryString["close"] != null)//退出
{
context.Session.Clear();
context.Response.ContentType = "text/plain";
context.Response.Write("1");
}
if (!IsPostBack)
{}