productselectbll.cs

来自「c#三层架构项目开发的全过程」· CS 代码 · 共 40 行

CS
40
字号
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DAL;
using Model;
namespace BLL.Goods
{
  public class ProductSelectBll
    {
        #region 商品表查询,BLL层构造函数
      DAL.Goods.ProductSelectDal ProductSelectShow;
        public ProductSelectBll()
        {
            ProductSelectShow = new DAL.Goods.ProductSelectDal();
        }
        #endregion

        #region 商品表查询
        public List<Model.Goods.ProductModel> GetProduct()
        {
            return ProductSelectShow.GetProduct();
        }
        #endregion

        #region 商品删除
        public int ProductDelete(string product_id)
        {
            string com = "DeleteProduct";
            SqlParameter id = new SqlParameter("@Product_id", SqlDbType.VarChar, 10);
            id.Value = product_id;

            return SqlHelper.ExecuteNonQuery(SqlHelper.conStr, CommandType.StoredProcedure, com, new SqlParameter[] { id });
        }
        #endregion
    }
}

⌨️ 快捷键说明

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