Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Design Question Business Logic
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Design Question Business Logic
Miscellaneous
Thread ID:
00951532
Message ID:
00951532
Views:
50
Okay, I have a form that has a search capability for three fields

Customer First Name, Customer Last Name, Customer ID

The data resides in SQl Server

I am using a Like command with % on Each side of the text passed across.

How would you write the method to use build a SQL including all or one of the fields.

Would you pass across all fields and then in the business logic determine which method to call,
or would you build an if structure to concat a series of strings to dynamically make the where clause.

Would it be a series of methods with different parameters

public DataSet GetCustomers()
public DataSet GetCustomers(string custid)
public DataSet GetCustomers(string custID, string firstname)
public DataSet GetCustomers(string custid, string firstname, string lastname)

I can't create nay more because the pattern would not be unique, the other members would be "string, string" so C# would complain.

Or would I create
GetCustomers_ID()
GetCustomers_ID_Lastname()
GetCustomers_ID_firstname()
GetCustomers_lastname()
GetCustomers_firstname()
GetCustomers_lastname_firstname()

Ideas!!!!!!
Shawn Dorion
Geo Sektor Dot Com
Website: http://www.geosektor.com

Web Hosting Plans
Visit : http://WebHosting.Applications4u.com/
Next
Reply
Map
View

Click here to load this message in the networking platform