In this case, I think I might have a User object, that instead of calling UsersDB.AddUser, you just say User myUser = new User(); then set the attributes of user and call myUser.Save();
To grab an instance of a User you can just give an ID in the constructor: //this would grab the User instance for the user with ID = 2 User myUser = new User(2); If you have logic that needs to see all the Users in the system, you could have a Users class, that is a collection of User objects, that you could "foreach" through, or write extensions to the collection to be able to do things specific to your object (custom sorting, etc). --b Bryan Batchelder eBusiness Consultant ConnectWise, Inc. 813-935-7100 x 425 > -----Original Message----- > From: Stephen Patten [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 31, 2002 5:55 PM > To: [EMAIL PROTECTED] > Subject: [DOTNET] Best Practice for Passing Arguments > > > Hi All, > > Just wondering if there is a better way to pass arguments > around than the way I am right now(code posted at end of > messsage). This one happens to be all strings so I guess a > Array or ArrayList might suffice, but what if the values are > of different types? Any help would be appreciated. > > Thank you, > Stephen > > > ASPX Page Originally From IBuySpy Portal >>>>> > > > // Add the info to the database > UsersDB users = new ASPNetPortal.UsersDB(); > > if ((users.AddUser (UserIdentificationControl.UserAgencyValue, > UserIdentificationControl.UserBadgeID, > UserIdentificationControl.UserLastName, > UserIdentificationControl.UserFirstName, > UserIdentificationControl.UserTitle, > UserContactControl.UserAddress1, UserContactControl.UserAddress2, > UserContactControl.UserAddress3, UserContactControl.UserCity, > UserContactControl.UserStateValue, > UserContactControl.UserZip, > UserContactControl.UserOfficePhone, > UserContactControl.UserMobilePhone, > UserContactControl.UserOfficeFax, UserContactControl.UserPager, > UserEmailControl.UserEmailWork, UserEmailControl.UserEmailHome, > UserSOWControl.UserScopeValue, > UserFunctionalGroupControl.UserFGroupValue)) == "99") > > ....rest of code removed > > Database Component >>>>>> > > public string AddUser(String userAgencyID, String > badgeTaxID, > String lastName, String firstName, String jobTitle, > String address1, String address2, String address3, > String city, String stateID, String zipCode, > String officePhone, String officeFax, > String mobilePhone,String pagerNumber, > String emailWork,String emailHome, > String sow, String fgroup) > > ....rest of code removed > > You can read messages from the DOTNET archive, unsubscribe > from DOTNET, or subscribe to other DevelopMentor lists at > http://discuss.develop.com. > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.