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

📄 productselectdal.cs

📁 c#三层架构项目开发的全过程
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using Model;
namespace DAL.Goods
{
    public class ProductSelectDal
    {
        #region 商品表查询
        public List<Model.Goods.ProductModel> GetProduct()
        {
            string getpro = "Product_select";
            DataSet ds = new DataSet();
            SqlHelper.FillDataSet(SqlHelper.conStr, CommandType.StoredProcedure, getpro, ds, new string[] {  }, null);
            List<Model.Goods.ProductModel> list = new List<Model.Goods.ProductModel>();
            foreach (DataRow  item in ds.Tables[0].Rows)
            {
                Model.Goods.ProductModel pro = new Model.Goods.ProductModel();
                pro.product_id = item["product_id"].ToString();
                pro.brand_id = (int)item["brand_id"];
                pro.product_saleprice = (decimal)item["product_saleprice"];
                pro.Product_costprice = (decimal)item["Product_CostPrice"];
                pro.Product_tradeprice = (decimal)item["Product_TradePrice"];
                pro.product_name = item["product_name"].ToString();
                list.Add(pro);

            }
            return list;
        }
        #endregion
    }
}

⌨️ 快捷键说明

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