在modules/accountmodule.ascx中的SaveCustomer()里面的
 customerRow[CustomerData.PKID_FIELD]= Customer.Tables[CustomerData.CUSTOMERS_TABLE].Rows[0][CustomerData.PKID_FIELD];
其中的Customer是ModuleBase.cs中的public DataSet Customer{}中的,请问在哪里给Customer赋了值呢?找细看了下在logon.asp.cs中找到了LogonButton_Click()中有一句.可这句是在用户登陆成功后才起作用的,试问还有哪里给Customer赋了值呢?

解决方案 »

  1.   

    在这个项目中,与之对应的几个CS,都有一个DATASET.建一个类时生成了一个DATASET;它是把一个类都保存在SESSION中了,你的问题没细看,但情形都差不多注意它每个页面的几个用户控件
      

  2.   

    在logon.aspx中的LogonButton_Click事件中有.
    对应的代码是:
    With New CustomerSystem()
        Dim sha1 As SHA1 = SHA1.Create()
        Dim password As byte() = sha1.ComputeHash(Encoding.Unicode.GetBytes(LogonPasswordTextBox.Text))
        custData = .GetCustomerByEmail(LogonEmailTextBox.Text, password)
    End With
                
    If Not custData Is Nothing Then  
        MyBase.Customer = custData     (在这里给modulebase中的Customer属性复值)
        MyBase.ShoppingCart.Customer = custData
        FormsAuthentication.RedirectFromLoginPage("*",false)
    Else
        MismatchLabel.Visible = True
    End If