profile.cs
来自「ASP.net网站开发四“酷”全书:新闻、论坛、电子商城、博客_源码」· CS 代码 · 共 34 行
CS
34 行
using System;
//References to PetShop specific libraries
//PetShop DAL interfaces
using BookShop.IDAL;
namespace BookShop.BLL{
/// <summary>
/// A business compoment to manage user profiles
/// </summary>
public class Profile{
/// <summary>
/// A method to get the banner location from the
/// data store give a favourite category
/// </summary>
/// <param name="favCategory">A user's favourite category</param>
/// <returns>The location of the Banner Image</returns>
public string GetBannerPath(string favCategory) {
// Validate input
if (favCategory.Trim() == string.Empty)
return null;
// Get an instance of the Profile DAL using the DALFactory
IProfile dal = BookShop.DALFactory.Profile.Create();
// Return the data from the DAL
return dal.GetBannerPath(favCategory);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?