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

📄 productcontroller.cs

📁 很好的技术
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for ProductController
/// </summary>
public class ProductController
{
    List<ProductEntity> list = new List<ProductEntity>();
	public ProductController()
	{
		//
		// TODO: Add constructor logic here
		//
       
	}

    public void Add(ProductEntity product)
    {
        Console.WriteLine(product.UnitCode);
    }
    public List<ProductEntity> GetList()
    {
        List<ProductEntity> list = new List<ProductEntity>();
        ProductEntity p = new ProductEntity()
        {
            CountryCode = "1",
            CurrCode = "1",
            Price = 100,
            ProductCode = "abc",
            ProductName = "aaaaa",
            Qty = 90,
            UnitCode = "1"

        };
        ProductEntity p1 = new ProductEntity()
        {
            CountryCode = "2",
            CurrCode = "2",
            Price = 100,
            ProductCode = "abc",
            ProductName = "aaaaa",
            Qty = 90,
            UnitCode = "2"

        };
        list.Add(p);
        list.Add(p1);
        return list;
    }
}

⌨️ 快捷键说明

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