54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using HHWMS.Web.Models;
|
|
using WalkingTec.Mvvm.Core;
|
|
|
|
namespace HHWMS.Web
|
|
{
|
|
public partial class ContainerVM : BaseCRUDVM<Container>
|
|
{
|
|
[Display(Name = "Container.Num", Description = "数量")]
|
|
public Int32 Num { get; set; }
|
|
|
|
public List<ComboSelectListItem> ContainerType { get; set; }
|
|
public List<ComboSelectListItem> ContainerStatus { get; set; }
|
|
|
|
public ContainerVM()
|
|
{
|
|
}
|
|
|
|
protected override void InitVM()
|
|
{
|
|
var CurrentCulture = Wtm.CurrentCulture;
|
|
var dictDatas = DC.Set<SysDictData>().ToList();
|
|
ContainerType = dictDatas.Where(x => x.DictType == "ContainerType").Select(x => new ComboSelectListItem
|
|
{
|
|
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
|
|
Value = x.DictValue
|
|
}).ToList();
|
|
ContainerStatus = dictDatas.Where(x => x.DictType == "ContainerStatus").Select(x => new ComboSelectListItem
|
|
{
|
|
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
|
|
Value = x.DictValue
|
|
}).ToList();
|
|
}
|
|
|
|
public override void DoAdd()
|
|
{
|
|
base.DoAdd();
|
|
}
|
|
|
|
public override void DoEdit(bool updateAllFields = false)
|
|
{
|
|
base.DoEdit(updateAllFields);
|
|
}
|
|
|
|
public override void DoDelete()
|
|
{
|
|
base.DoDelete();
|
|
}
|
|
}
|
|
}
|