Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        myBusinessLayer = new clsBusinessLayer(Server.MapPath("~/App_Data/"));

        //create dataset
        dsUser dsUserDetails;

        //pass lastname text to findcustomer method and return results to dataset
        dsUserDetails = myBusinessLayer.fillAccountDetails();

        if (dsUserDetails != null)
        {
            txtUsername.Text     = dsUserDetails.tblUsers[0].Username;
            txtCity.Text         = dsUserDetails.tblUsers[0].City;
            txtState.Text        = dsUserDetails.tblUsers[0].State;
            txtFavLang.Text      = dsUserDetails.tblUsers[0].Favorite_Language;
            txtLeastFav.Text     = dsUserDetails.tblUsers[0].Least_Favorite_Language;
            txtLastProgDate.Text = dsUserDetails.tblUsers[0].Last_Program_Date.ToString();
        }

        else
        {
            lblUserFeedback.Text = Session["feedback"].ToString();
        }
    }