資源簡介
asp.net網上書店系統 asp.net網上書店系統

代碼片段和文件信息
using?System;
//References?to?PetShop?specific?libraries
//PetShop?busines?entity?library
using?BookShop.Model;
//PetShop?DAL?interfaces
using?BookShop.IDAL;
namespace?BookShop.BLL?{
///?
///?A?business?Component?used?to?manage?accounts
///?The?BookShop.Model.Account?is?used?in?most?methods?
///?and?is?used?to?store?serializable?information?about?an?account
///?
public?class?Account?{
///?
///?Method?to?login?into?the?system.?The?user?must?supply?a?username?and?password
///?
///?Unique?identifier?for?a?user
///?Password?for?a?user
///?If?the?login?is?successful?it?returns?information?abount?the?account
public?AccountInfo?SignIn(string?userId?string?password)?{
//?Validate?input
if?((userId.Trim()?==?string.Empty)?||?(password.Trim()?==?string.Empty))
return?null;
//?Get?an?instance?of?the?account?DAL?using?the?DALFactory
IAccount?dal?=?BookShop.DALFactory.Account.Create();
//?Try?to?sign?in?with?the?given?credentials
AccountInfo?account?=?dal.SignIn(userId?password);
//?Return?the?account
return?account;
}
///?
///?Returns?the?address?information?for?a?specific?user
///?
///?Unique?identifier?for?an?account/customer
///?Returns?the?address?information?for?the?user
public?AddressInfo?GetAddress(string?userId)?{
//?Validate?input
if?(userId.Trim()?==?string.Empty)
return?null;
//?Get?an?instance?of?the?account?DAL?using?the?DALFactory
IAccount?dal?=?BookShop.DALFactory.Account.Create();
//?Return?the?address?information?for?the?given?userId?from?the?DAL
return?dal.GetAddress(userId);?
}
///?
///?A?method?to?insert?a?new?Account
///?
///?An?account?entity?with?information?about?the?new?account
public?void?Insert(AccountInfo?account)?{
//?Validate?input
if?(account.UserId.Trim()?==?string.Empty)
return;
//?Get?an?instance?of?the?account?DAL?using?the?DALFactory
IAccount?dal?=?BookShop.DALFactory.Account.Create();
//?Call?the?DAL?to?insert?the?account
dal.Insert(account);
}
///?
///?A?method?to?update?an?existing?account
///?
///?An?account?entity?with?information?about?the?account?to?be?updated
public?void?Update(AccountInfo?account)?{
//?Validate?input
if?(account.UserId.Trim()?==?string.Empty)
return;
//?Get?an?instance?of?the?account?DAL?using?the?DALFactory
IAccount?dal?=?BookShop.DALFactory.Account.Create();
//?Send?the?udpated?account?information?to?the?DAL
dal.Update(account);
}
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2883??2004-11-09?15:30??SHOP\CodeResource\BLL\Account.cs
?????文件????????288??2004-11-09?15:30??SHOP\CodeResource\BLL\AssemblyInfo.cs
?????文件???????5778??2004-11-09?15:15??SHOP\CodeResource\BLL\BLL.csproj
?????文件???????1805??2004-12-06?20:08??SHOP\CodeResource\BLL\BLL.csproj.user
?????文件???????3571??2004-11-09?15:30??SHOP\CodeResource\BLL\Cart.cs
?????文件???????1331??2004-11-09?15:30??SHOP\CodeResource\BLL\Inventory.cs
?????文件???????1532??2004-11-09?15:29??SHOP\CodeResource\BLL\Item.cs
????..A..H.?????22280??2004-12-06?20:08??SHOP\CodeResource\BLL\obj\Debug\BLL.projdata
????..A..H.?????30088??2004-12-06?20:08??SHOP\CodeResource\BLL\obj\Release\BLL.projdata
?????文件??????20480??2004-11-23?22:20??SHOP\CodeResource\BLL\obj\Release\BookShop.BLL.dll
?????文件??????20480??2004-11-09?15:10??SHOP\CodeResource\BLL\obj\Release\PetShop.BLL.dll
?????文件???????2509??2004-11-09?15:29??SHOP\CodeResource\BLL\OrderInsert.cs
?????文件???????1043??2004-11-09?15:29??SHOP\CodeResource\BLL\OrderRead.cs
?????文件???????1625??2004-11-09?15:29??SHOP\CodeResource\BLL\Product.cs
?????文件????????863??2004-11-09?15:29??SHOP\CodeResource\BLL\Profile.cs
?????文件?????999936??2004-11-09?20:58??SHOP\CodeResource\BookShop\dbBookShopOrders
?????文件??????19456??2004-11-09?20:48??SHOP\CodeResource\BookShop.ncb
?????文件???????6405??2004-12-06?19:58??SHOP\CodeResource\BookShop.sln
?????文件????????596??2002-11-17?18:55??SHOP\CodeResource\BookShop.snk
????..A..H.?????14848??2004-12-06?20:08??SHOP\CodeResource\BookShop.suo
?????文件????????340??2004-12-06?20:08??SHOP\CodeResource\BookShop_Model.tgs
?????文件?????????36??2004-12-06?20:08??SHOP\CodeResource\BookShop_Model.tgw
?????文件????????652??2004-11-09?15:30??SHOP\CodeResource\DALFactory\Account.cs
?????文件????????123??2004-11-09?15:29??SHOP\CodeResource\DALFactory\AssemblyInfo.cs
?????文件??????16384??2004-11-23?22:20??SHOP\CodeResource\DALFactory\bin\Release\BookShop.DAL.dll
?????文件??????16384??2004-11-23?22:20??SHOP\CodeResource\DALFactory\bin\Release\BookShop.IDAL.dll
?????文件??????24576??2004-11-23?22:20??SHOP\CodeResource\DALFactory\bin\Release\BookShop.Model.dll
?????文件??????16384??2004-11-09?15:10??SHOP\CodeResource\DALFactory\bin\Release\PetShop.DAL.dll
?????文件??????16384??2004-11-09?15:10??SHOP\CodeResource\DALFactory\bin\Release\PetShop.IDAL.dll
?????文件???????5258??2004-11-09?15:15??SHOP\CodeResource\DALFactory\DALFactory.csproj
............此處省略378個文件信息
- 上一篇:數據結構(C#語言描述-陳廣
- 下一篇:asp.net 簡單購物車模塊
評論
共有 條評論