54 lines
1.4 KiB
C#
54 lines
1.4 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;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Z.EntityFramework.Plus;
|
|
|
|
namespace HHWMS.Web
|
|
{
|
|
public partial class ShipmentHeaderVM : BaseCRUDVM<ShipmentHeader>
|
|
{
|
|
public ShipmentDetailListVM Details = new ShipmentDetailListVM();
|
|
public List<ComboSelectListItem> ShipTypes { get; set; }
|
|
|
|
public ShipmentHeaderVM()
|
|
{
|
|
}
|
|
|
|
protected override void InitVM()
|
|
{
|
|
Details.CopyContext(this);
|
|
Details.Searcher.HeaderId = Entity.ID;
|
|
|
|
var CurrentCulture = Wtm.CurrentCulture;
|
|
var dictDatas = DC.Set<SysDictData>().ToList();
|
|
ShipTypes = dictDatas.Where(x => x.DictType == "ShipType").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();
|
|
}
|
|
}
|
|
}
|