55 lines
1.5 KiB
C#
55 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using WalkingTec.Mvvm.Core;
|
|
using WalkingTec.Mvvm.Core.Extensions;
|
|
using HHWMS.Web;
|
|
using HHWMS.Web.Models;
|
|
|
|
namespace HHWMS.Web
|
|
{
|
|
public partial class InventoryVM : BaseCRUDVM<Inventory>
|
|
{
|
|
public List<ComboSelectListItem> ZoneCodes { get; set; }
|
|
public List<ComboSelectListItem> InventoryTaskStatus { get; set; }
|
|
|
|
public InventoryVM()
|
|
{
|
|
}
|
|
|
|
protected override void InitVM()
|
|
{
|
|
var CurrentCulture = Wtm.CurrentCulture;
|
|
var dictDatas = DC.Set<SysDictData>().ToList();
|
|
ZoneCodes = dictDatas.Where(x => x.DictType == "ZoneCode").Select(x => new ComboSelectListItem
|
|
{
|
|
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
|
|
Value = x.DictValue
|
|
}).ToList();
|
|
|
|
InventoryTaskStatus = dictDatas.Where(x => x.DictType == "InventoryTaskStatus").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();
|
|
}
|
|
}
|
|
}
|