Foxtable(狐表)用户栏目专家坐堂 → 这个代码错在哪里了么?请前辈们指点一下


  共有2667人关注过本帖平板打印复制链接

主题:这个代码错在哪里了么?请前辈们指点一下

帅哥哟,离线,有人找我吗?
jinzhengbe
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:五尾狐 帖子:1062 积分:9781 威望:0 精华:0 注册:2012/3/13 5:23:00
这个代码错在哪里了么?请前辈们指点一下  发帖心情 Post By:2014/8/12 9:34:00 [只看该作者]

Dim UserName As String = e.Form.Controls("UserName").Value
Dim cmd As New SQLCommand
Dim dt As DataTable
Dim dr As DataRow


cmd.C
If UserName = ""  Then
    Messagebox.show("请选择用户!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
cmd.CommandText = "Select * From {newmoo_User} Where [userName] = '" & UserName & "'"
dt = cmd.ExecuteReader
If dt.DataRows.Count = 0 Then
    Messagebox.show("此用户不存在!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
dr = dt.DataRows(0)
If System.Web.Security.FormsAuthentication.HashpasswordForStoringInConfigFile(e.Form.Controls("password").Value, "MD5") = dr("password").Trim() Then 
      _UserName = username
    _UserGroup = dr("Group") 
    e.Form.Close
Else
    Messagebox.show("密码错误!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If

  Dim dr1 As DataRow 
    dr1 = DataTables("users").Find("id= " & "'" )
    If dr1 IsNot Nothing '如果找到, 则设置各列内容
        dr("业务员")= dr1("username")
 Else    
  
End If
 
 
 
DataTables("订单").LoadFilter = "业务员 = '" & _UserName & "'"
DataTables("订单").Load()

 回到顶部