Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 13th, 2009, 12:38 AM
ocn ocn is offline
Authorized User
 
Join Date: Jun 2009
Posts: 15
Thanks: 5
Thanked 0 Times in 0 Posts
Default LoadScreenFromObject - Urgent help, please!

I need some help with LoadScreenFromObject() method. I am available to save data from the controls to database. However, I can't retrieve data from the database and map the data to the controls. Below are the codes for the two methods.
Code:
 protected override void LoadObjectFromScreen(tblUserEO baseEO)
    {
        baseEO.UserName = txtUserName.Text;
        baseEO.UserPassword = txtPassword.Text;
        baseEO.UserType = Convert.ToInt32(txtUserType.Text);
        baseEO.IsActive = ckbIsActive.Checked;
       
    }

    protected override void LoadScreenFromObject(tblUserEO baseEO)
    {
        txtUserName.Text = baseEO.UserName;
        txtPassword.Text = baseEO.UserPassword;
        txtUserType.Text = Convert.ToString(baseEO.UserType);
        ckbIsActive.Checked = baseEO.IsActive;
        ViewState[VIEW_STATE_KEY_USER] = baseEO;
    }
I debugged the codes, and the return values of baseEO.UserName, baseEO.UserPassword, and baseEO.UserType from LoadScreenFromObject() are null. Am I am missing from something?

Another question:

I would like to retrieve UserName and Password from the tblUser table. What would be the good way to do so? Do I have to write internal methods to select those values in tblUserEO class?

I truly appreciate if you can give me some suggestions.
 
Old November 15th, 2009, 07:49 PM
ocn ocn is offline
Authorized User
 
Join Date: Jun 2009
Posts: 15
Thanks: 5
Thanked 0 Times in 0 Posts
Default

I was able to resolve my issues.
Thanks!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help please URGENT!!! JasonCamara C# 0 October 21st, 2006 12:54 PM
urgent goback Java Databases 1 June 23rd, 2006 08:38 AM
Urgent ! Please Help... ck XML 1 May 17th, 2006 06:17 AM
Please help its urgent!!! pramos.21d C# 1 April 27th, 2006 07:29 AM
Need Urgent Help! busher XML 15 December 1st, 2004 07:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.