⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bitemtype.cs

📁 酒店在线订餐管理系统
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using Model;
using ImpDDal;
using IDDal;
/*******菜肴种类的业务逻辑层**********
 * 提供菜肴种类的增加,删除,修改,查询
 * 设计者:魏莹
 * 设计时间:5月30日
 * ***********************************/
namespace Business
{
    /// <summary>
    /// 菜肴种类操作的类
    /// </summary>
    public class BItemType
    {
        ItemTypeDal<ItemType> itemTypeOp = new ImpItemType();

        /// <summary>
        /// 增加一个菜肴种类
        /// </summary>
        /// <param name="itemtype">菜肴种类对象</param>
        /// <returns>1表示增加成功,0增加失败</returns>
        public int AddItemType(ItemType itemtype)
        {
            try
            {
                return itemTypeOp.AddItemType(itemtype);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }

        /// <summary>
        /// 修改一个菜肴种类
        /// </summary>
        /// <param name="itemtype">菜肴种类对象</param>
        /// <returns>1表示修改成功,0修改失败</returns>
        public int ModifyItemType(ItemType itemtype)
        {
            try
            {
                return itemTypeOp.EditItemType(itemtype);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }

        /// <summary>
        /// 删除一个种类
        /// </summary>
        /// <param name="itemtype">菜肴种类对象</param>
        /// <returns>1表示删除成功,0删除失败</returns>
        public int DeleteItemType(ItemType itemtype)
        {
            try
            {
                return itemTypeOp.DelteItemType(itemtype);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }

        /// <summary>
        /// 返回菜肴种类列表
        /// </summary>
        /// <returns>菜肴种类集合</returns>
        public IList<ItemType> GetItemTypes()
        {
            try
            {
                return itemTypeOp.ItemTypes();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -