You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Aucma.Scada/Aucma.Scada.UI/viewModel/InventoryInfo/ShellInventoryViewModel.cs

116 lines
2.7 KiB
C#

using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using System.Collections.Generic;
using System.Windows;
namespace Aucma.Scada.UI.viewModel.InventoryInfo
{
public class ShellInventoryViewModel : ViewModelBase
{
public List<SpaceDto> Shapes { get; set; } = new List<SpaceDto>();
public ShellInventoryViewModel()
{
UpdateCommand = new RelayCommand<object>(obj => update(obj));
for (int i = 1; i <= 9; i++)
{
Shapes.Add(new SpaceDto()
{
spaceCode = i + "#",
spaceStock = i,
onTheWay = i,
totalAmount = i+i,
materialType = "",
inStoreFlag = 1,
outStoreFlag = 2,
unusualFlag = 2,
isFlag = 1,
onlyOne = 1,
spaceType = 1
});
}
}
#region 事件定义
/// <summary>
/// 界面跳转按钮事件
/// </summary>
public RelayCommand<object> UpdateCommand { get; set; }
#endregion
private void update(object obj)
{
string info = obj as string;
MessageBox.Show("编号:" + info);
}
}
/// <summary>
/// 货道信息
/// </summary>
public class SpaceDto
{
/// <summary>
/// 货道编号
/// </summary>
public string spaceCode { get; set; }
/// <summary>
/// 在库数量
/// </summary>
public int spaceStock { get; set; }
/// <summary>
/// 货道类型
/// </summary>
public int spaceType { get; set; }
/// <summary>
/// 在途数量
/// </summary>
public int onTheWay { get; set; }
/// <summary>
/// 合计数量
/// </summary>
public int totalAmount { get; set; }
/// <summary>
/// 物料型号
/// </summary>
public string materialType { get; set; }
/// <summary>
/// 入库状态
/// </summary>
public int inStoreFlag { get; set; }
/// <summary>
/// 出库状态
/// </summary>
public int outStoreFlag { get; set; }
/// <summary>
/// 异常状态
/// </summary>
public int unusualFlag { get; set; }
/// <summary>
/// 禁用状态
/// </summary>
public int isFlag { get; set; }
/// <summary>
/// 出一个
/// </summary>
public int onlyOne { get; set; }
}
}