using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ClassLibrary1
{
public class cStockInfo
{
private string tradecode = "";
private string fullname = "";
private string tradetype = "";
private string standard = "";
private string tradeunit= "";
private string produce = "";
private float qty = 0;
private float price = 0;
private float averageprice = 0;
private float saleprice = 0;
private float check = 0;
private float upperlimit = 0;
private float lowerlimit = 0;
}
public string TradeCode
{
get { return tradecode; }
set { tradecode = value; }
}
public string FullName
{
get { return fullname; }
set { fullname = value; }
}
public string TradeType
{
get { return tradetype; }
set { tradetype = value; }
}
public string Standard
{
get { return standard; }
set { standard = value; }
}
public string Unit
{
get { return tradeunit; }
set { tradeunit = value; }
}
public string Produce
{
get { return produce; }
set { produce = value; }
}
public float Qty
{
get { return qty; }
set { qty = value; }
}
public float Price
{
get { return price; }
set { price = value; }
}
public float Qty
{
get { return qty; }
set { qty = value; }
}
public float AveragePrice
{
get { return averageprice; }
set { averageprice = value; }
}
public float SalePrice
{
get { return saleprice; }
set { saleprice = value; }
}
public float Check
{
get { return check; }
set { check = value; }
}
public float Upperlimit
{
get { return upperlimit; }
set { upperlimit = value; }
}
public float Lowerlimit
{
get { return lowerlimit; }
set {lowerlimit = value; }
}
public void ShowInfo()
{
Console.WriteLine("--------------------------------------------------");
Console.WriteLine("显示商品信息");
Console.WriteLine("");
Console.WriteLine("商品编号:{0,-15}",TradeCode);
Console.WriteLine("单位全称:{0,-15}",FullName);
Console.WriteLine("商品型号:{0,-15",TradeType);
Console.WriteLine("");
Console.WriteLine("商品规格:{0,-15}", Standard);
Console.WriteLine("单位单位:{0,-15}", Unit);
Console.WriteLine("商品产地:{0,-15", Produce);
Console.WriteLine("库存数量:{0,-15}", Qty);
Console.WriteLine("");
Console.WriteLine("最后一次价格:{0,-15}", Price);
Console.WriteLine("加权平均价格:{0,-15}", AveragePrice);
Console.WriteLine("最后一次销价:{0,-15}", SalePrice);
Console.WriteLine("");
Console.WriteLine("盘点数量:{0,-15}", Check);
Console.WriteLine("库存报警上限:{0,-15}", Upperlimit);
Console.WriteLine("库存报警下限:{0,-15}", LowerLimit);
Console.WriteLine("");
Console.WriteLine("商品信息显示完毕");
Console.WriteLine("-----------------------------------------------------");
}
static void Main(String[] args)
{
Console.Title = "商品的库存信息显示";
Console.WriteLine("库存盘点信息如下:");
cStockInfo csi1 = new cStockInfo();
csi1.TradeCode = "TJRA001";
csi1.FullName = "空调";
csi1.TradeType = "TYPE-1";
csi1.Standard = "2匹";
csi1.Unit = "台";
csi1.Produce = "天津";
csi1.Qty = 200;
csi1.Price = 2000;
csi1.AveragePrice = 2500;
csi1.SalePrice = 3000;
csi1.Check = 200;
csi1.UpperLimit = 800;
csi1.LowerLimit = 200;
csi1.ShowInfo();
cStockInfo csi2 = new cStockInfo();
csi2.TradeCode = "TJRA002";
csi2.FullName = "空调";
csi2.TradeType = "TYPE-2";
csi2.Standard = "1.5匹";
csi2.Unit = "台";
csi2.Produce = "天津";
csi2.Qty = 300;
csi2.Price = 3000;
csi2.AveragePrice = 3500;
csi2.SalePrice = 4000;
csi2.Check = 290;
csi2.ShowInfo();
cStockInfo csi3 = new cStockInfo();
csi3.TradeCode = "TJRA003";
csi3.TradeType = "TYPE-3";
csi3.ShoeInfo();
Console.ReadLine();
}
}