Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating 3-tier Simple App. Step 2
Message
From
04/04/2007 08:52:52
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
03/04/2007 12:09:59
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01210974
Message ID:
01211932
Views:
17
>I also group everything within folders (in VS2005 you can add solution folders ... I don't remember how it's done in VS2003 off the top of my head, but I'm sure it's similar).

I'm not sure that this is possible in 2003, is it? I looked in the menu structure, and I sure can't figure out how to do it. I can add folders within a project, but not on the solution level.


>>Hi Bonnie,
>>
>>I copied your original message to me below (from a different thread) just for clarity for of someone else if they want to follow:
>>
>>I would like to ask you a question on how to incorporate a typed dataset into the example of this 3-tier simple app.
>>
>>1. In your sample code below you refer to MyDataSet in CustomerBiz class. Would this be a typed dataset of the customer table?
>>2. Do you create a separate project for each typed dataset, for each table of your application?
>>
>>Thank you in advance for any help.
>>
>>Dmitry
>>
>>************ This is a copy of another message ***************
>>
>>So, to start, your form would be similar to this (to get your data when the form first opens):
>>
>>using MyCompany.MyApp.Business.MyBiz;
>>
>>namespace MyCompany.MyApp.WinUI.MyUI
>>{
>>  public class MyForm : MyBaseForm
>>  {
>>    private long          CustomerKey;
>>    private MyDataSet     dsData;
>>    private CustomerBiz   oBiz;
>>
>>    public MyForm(long key)
>>    {
>>      this.CustomerKey = key;
>>      InitializeComponent();
>>      this.FillData();
>>    }
>>
>>    public void FillData()
>>    {
>>      // To simplify, I'm directly calling a Biz class.
>>      // In reality, I use a Web Service here instead
>>      // which in turn calls the Biz class.
>>
>>      oBiz = new CustomerBiz();
>>      dsData = oBiz.GetCustomer(this.CustomerKey);
>>    }
>>  }
>>}
>>
>>Now in your MyBiz project, you'd have a Biz class:
>>
>>using MyCompany.MyApp.DataAccess.MyDataAccess
>>
>>namespace MyCompany.MyApp.Business.MyBiz
>>{
>>  public class CustomerBiz
>>  {
>>    private MyDataSet dsData;
>>
>>    public MyDataSet GetCustomer(long CustomerKey)
>>    {
>>      CustomerAccess oDA = new CustomerAccess();
>>      this.dsData = oDA.GetCustomer(CustomerKey);
>>
>>      // if you have other Biz things to do to this customer
>>      // do it here before returning the DataSet
>>
>>      return this.dsData;
>>    }
>>  }
>>}
>>
>>And, lastly, in your MyDataAccess project, you'd have this class:
>>
>>namespace MyCompany.MyApp.DataAccess.MyDataAccess
>>{
>>  public class CustomerAccess
>>  {
>>    public MyDataSet GetCustomer(long CustomerKey)
>>    {
>>      // Here's where you'd put all the SqlCommand and DataAdapter stuff
>>      // and fill your DataSet.
>>
>>      return dsData;
>>    }
>>  }
>>}
>>
>>Now, that's the "simple" version, just to get the concept. Let's take it a step further:
Very fitting: http://xkcd.com/386/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform