if (Session[ " verify " ].ToString() == tbyanzhen.Text.ToUpper()) { DataLinqDataContext ddc = new DataLinqDataContext(); var mber = from m in ddc.member where m.user_Name == tbuser.Text.Trim() && m.user_Isdel == 0 select m; if (mber.Count() > 0 ) { member mb = ddc.member.Single(p => p.user_Name == tbuser.Text.Trim() && p.user_Isdel == 0 ); if (mb.user_Password == Encrypts.Encrypt.DefaultMd5Encrypt(tbpassword.Text)) { Session[ " UserName " ] = tbuser.Text.ToUpper(); Session[ " Power " ] = mb.user_Power; // 日志 LogManage.InsertLog( " 登录,IP: " + Request.UserHostAddress.ToString()); if (mb.user_Power.ToString() == " 2 " ) Response.Redirect( " FMS/account/zpgl.aspx " ); else if (mb.user_Power.ToString() == " 1 " || mb.user_Power.ToString() == " 0 " ) Response.Redirect( " FMS/account/zpgl_admin.aspx " ); else { FMS.Member.MemberManage.MsgShowBox( this , " 你已被管理员禁用,请联系管理员 " ); } } else ScriptManager.RegisterClientScriptBlock( this , this .GetType(), " sucess " , " alert('密码错误') " , true ); } else { ScriptManager.RegisterClientScriptBlock( this , this .GetType(), " false " , " alert('用户名错误') " , true ); } } else FMS.Member.MemberManage.MsgShowBox( this , " 验证码错误 " );