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 { [Display(Name = "Container.Num", Description = "数量")] public Int32 Num { get; set; } public List ContainerType { get; set; } public List ContainerStatus { get; set; } public ContainerVM() { } protected override void InitVM() { var CurrentCulture = Wtm.CurrentCulture; var dictDatas = DC.Set().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(); } } }