68 lines
2.1 KiB
C#
68 lines
2.1 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.Models;
|
|
|
|
|
|
namespace HHWMS.Web.xwms.ViewModels.ReceiptHeader2VMs
|
|
{
|
|
public partial class ReceiptHeader2VM : BaseCRUDVM<ReceiptHeader2>
|
|
{
|
|
public List<ComboSelectListItem> ReceiptTypes { get; set; }
|
|
public List<ComboSelectListItem> Trs { get; set; }
|
|
public List<ComboSelectListItem> Addresses { get; set; }
|
|
public List<ComboSelectListItem> SupplyNames { get; set; }
|
|
public ReceiptHeader2VM()
|
|
{
|
|
}
|
|
|
|
protected override void InitVM()
|
|
{
|
|
var CurrentCulture = Wtm.CurrentCulture;
|
|
var dictDatas = DC.Set<SysDictData>().ToList();
|
|
ReceiptTypes = dictDatas.Where(x => x.DictType == "ReceiptType2").Select(x => new ComboSelectListItem
|
|
{
|
|
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
|
|
Value = x.DictValue
|
|
}).ToList();
|
|
Trs = dictDatas.Where(x => x.DictType == "Trs").Select(x => new ComboSelectListItem
|
|
{
|
|
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
|
|
Value = x.DictValue
|
|
}).ToList();
|
|
Addresses = dictDatas.Where(x => x.DictType == "Addresses").Select(x => new ComboSelectListItem
|
|
{
|
|
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
|
|
Value = x.DictValue
|
|
}).ToList();
|
|
|
|
var dc2 = Wtm.CreateDC(cskey: "hangyong");
|
|
SupplyNames = dc2.Set<Supplier>().Select(x => new ComboSelectListItem
|
|
{
|
|
Text = x.Name,
|
|
Value = x.Code
|
|
}).ToList();
|
|
|
|
}
|
|
|
|
public override void DoAdd()
|
|
{
|
|
base.DoAdd();
|
|
}
|
|
|
|
public override void DoEdit(bool updateAllFields = false)
|
|
{
|
|
base.DoEdit(updateAllFields);
|
|
}
|
|
|
|
public override void DoDelete()
|
|
{
|
|
base.DoDelete();
|
|
}
|
|
}
|
|
}
|