using MyCompany.Business.MyBiz; namespace MyCompany.WinUI.MyUI { public class MyForm : MyBaseForm { private long CustomerKey; private MyDataSet dsData; private MyBizCustomer 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 MyBizCustomer(); dsData = oBiz.GetCustomer(this.CustomerKey); } } }Now in your MyBiz project, you'd have a Biz class:
using MyCompany.DataAccess.MyDataAccess namespace MyCompany.Business.MyBiz { public class MyBizCustomer { private MyDataSet dsData; public MyDataSet GetCustomer(long CustomerKey) { MyDataAccessCustomer oDA = new MyDataAccessCustomer(); 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.DataAccess.MyDataAccess { public class MyDataAccessCustomer { public MyDataSet GetCustomer(long CustomerKey) { // Here's where you'd put all the SqlCommand and DataAdapter stuff // and fill your DataSet. return dsData; } } }~~Bonnir