?? bitemmsg.cs
字號:
using System;
using System.Collections.Generic;
using System.Text;
using Model;
using ImpDDal;
using IDDal;
/*********菜肴評論的業務邏輯層***********
* 關于菜肴評論的增加,查詢
* 類設計者:魏瑩
* 設計時間5月30日
***************************************/
namespace Business
{
/// <summary>
/// 菜肴評論操作的類
/// </summary>
public class BItemMsg
{
IItemMsg<ItemMsg> itemMsgOp = new ImpItemMsg();
/// <summary>
/// 增加一條菜肴評論
/// </summary>
/// <param name="itemMsg">評論對象</param>
/// <returns>1增加評論成功,0增加評論失敗</returns>
public int AddItemMsg(ItemMsg itemMsg)
{
try
{
return itemMsgOp.AddItemMsg(itemMsg);
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
/// <summary>
/// 查詢某個菜肴的所有評論
/// </summary>
/// <param name="itemId">菜肴ID</param>
/// <returns>評論集合</returns>
public IList<ItemMsg> GetItemMsg(long itemId)
{
try
{
return itemMsgOp.GetItemMsg(itemId);
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -