protected void lkbtLogin_Click(object sender, System.EventArgs e)
专注于为中小企业提供成都网站建设、网站设计服务,电脑端+手机端+微信端的三站合一,更高效的管理,为中小企业芦溪免费做网站提供优质的服务。我们立足成都,凝聚了一批互联网行业人才,有力地推动了上千家企业的稳健成长,帮助中小企业通过网站建设实现规模扩充和转变。
{
if(txtVerifyNum.Text.Trim() != Session["SessionAppendNumber"歼大].ToString())
{
oprtb.AlertMsg("输入的验证氏散竖码错误",Page);
return;
}
DataSet ds = new DataSet();
string sql = "select UserID,Name,DepartID,CompanyID,";
sql = sql+"(select Name from Depart where ((DepartID=UserList.DepartID) and ( CompanyID=UserList.CompanyID))) as DepartName,";
sql = sql+"(select Name from Company where (CompanyID=UserList.CompanyID)) as CompanyName ";
sql = sql+"from UserList where UserID='" + txtUserID.Text.Trim() +"' and Password='" + Encrypt.EncryptPwd(txtPassword.Text.Trim(),"MD5") + "' and Cancellation = 0";
//string sql = "select * from UserList where UserID='" + txtUserID.Text.Trim() +"' and Password='" + Encrypt.EncryptPwd(txtPassword.Text.Trim(),"MD5") + "' and Cancellation = 0";
ds = oprtb.SelectTable(sql);
if (ds.Tables[0].Rows.Count = 0)
{
oprtb.AlertMsg("输入的用户名或密码错误",Page);
return;
}
else
{
string UHAddress = Request.UserHostAddress;
string currentTime = DateTime.Now.ToString("yyyyMMdd hhmmss");
//登陆成功
Session["UserID"] = ds.Tables[0].Rows[0]["UserID"].ToString();
Session["Name"] = ds.Tables[0].Rows[0]["Name"].ToString();
Session["DepartID"] = ds.Tables[0].Rows[0]["DepartID"掘郑].ToString();
Session["DepartName"] = ds.Tables[0].Rows[0]["DepartName"].ToString();
Session["CompanyID"] = ds.Tables[0].Rows[0]["CompanyID"].ToString();
Session["CompanyName"] = ds.Tables[0].Rows[0]["CompanyName"].ToString();
//设置用户的登陆时间
oprtb.SetStartTime(txtUserID.Text.Trim());
//设置用户的登陆标记
string s_mark = txtUserID.Text.Trim() + "_" + UHAddress + "_" + currentTime;
oprtb.SetLoginMark(s_mark,txtUserID.Text.Trim());
//保存登陆标记
Session["LoginMark"] = s_mark;
MCompany.SystemLog slstru = new YesErp.MCompany.SystemLog();
slstru.SystemLog_IP = UHAddress;
slstru.SystemLog_LogIn = System.DateTime.Now;
slstru.SystemLog_Name = ds.Tables[0].Rows[0]["Name"].ToString();//用户姓名
slstru.SystemLog_ID = Int32.Parse(ds.Tables[0].Rows[0]["UserID"].ToString());//用户ID
//写系统日志
oprtb.LoginSystemLog(slstru);
//oprtb.AlertMsg("登录成功",Page);
Session["LoginTime"] = System.DateTime.Now;
//判断并转到新的页面
oprtb.ChangeUrl("../index.aspx",Page);
}
}
闷谈Private Sub Button _Click(ByVal sender As System Object ByVal e As System EventArgs) Handles Button Click
If TextBox Text = Or TextBox Text = Then
Label Text = 请确认您的输入!
Return
End If
Dim sql As String = select * from pwd where stu_id=@stu_id and pwd=@pwd
Dim m As SqlCommand = New SqlCommand(sql conn)
m Parameters Add(蚂型碰租裂New SqlParameter( @stu_id SqlDbType Int ))
m Parameters( @stu_id ) Value = TextBox Text
m Parameters Add(New SqlParameter( @pwd SqlDbType Char ))
m Parameters( @pwd ) Value = TextBox Text
Dim dr As SqlDataReader
conn Open()
dr = m ExecuteReader
If dr Read Then
Session( stu_id ) = TextBox Text
dr Close()
m Cancel()
Dim sql_ As String = update stu_base set point=point+ where stu_id=@stu_id
m = New SqlCommand(sql_ conn)
m Parameters Add(New SqlParameter( @stu_id SqlDbType Int ))
m Parameters( @stu_id ) Value = Session( stu_id )
m ExecuteNonQuery()
m Cancel()
Response Redirect( detail aspx?stu_id= Session( stu_id ) )
Else
Label Text = 您还没有注册或账号密码错误
End If
End Sub
Private Sub Button _Click(ByVal sender As System Object ByVal e As System EventArgs) Handles Button Click
TextBox Text =
TextBox Text =
lishixinzhi/Article/program/net/201311/13960
你设计一个界面,让别人来写代码,可能吗?
另外根据你键歼的郑亮孙想法,VB.NET没法实现,需要用C++写DLL注入,还要破喊链解QQ的加密函数!
分开瞎闹写看看搜肢:世神世
Dim cl_Reader As OleDbDataReader
set cl_Reader =cl_Cmd.ExecuteReader