producttypedal.cs

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

CS
31
字号
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using System.Data;
using System.Data.SqlClient;

namespace DAL.Goods
{
    public class ProductTypeDal
    {
        //char producttype_id, string producttype_name, string producttype_brand, int producttype_s1, int producttype_s2, int producttype_s3, int producttype_s4, int producttype_s5, int producttype_s6, int producttype_s7, string producttype_color
        public List<Model.Goods.ProductTypeModel> SelectProductTypeColor()
        {
            string commandtext = "ProductColor_Select";
            DataSet ds = new DataSet();
            SqlHelper.FillDataSet(SqlHelper.conStr, CommandType.StoredProcedure, commandtext, ds, new string[] { }, null);
            List<Model.Goods.ProductTypeModel> li = new List<Model.Goods.ProductTypeModel>();
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                Model.Goods.ProductTypeModel inf = new Model.Goods.ProductTypeModel();
                inf.producttype_color = dr["ProductType_color"].ToString();
                li.Add(inf);
            }
            return li;
        }

    }
}

⌨️ 快捷键说明

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