108 lines
4.9 KiB
C#
108 lines
4.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using WalkingTec.Mvvm.Core;
|
|
using WalkingTec.Mvvm.Core.Extensions;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using HHWMS.Web.Models;
|
|
|
|
|
|
namespace HHWMS.Web.xwms.ViewModels.ReceiptHeader2VMs
|
|
{
|
|
public partial class ReceiptHeader2ListVM : BasePagedListVM<ReceiptHeader2_View, ReceiptHeader2Searcher>
|
|
{
|
|
protected override List<GridAction> InitGridAction()
|
|
{
|
|
return new List<GridAction>
|
|
{
|
|
this.MakeStandardAction("ReceiptHeader2", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"xwms", dialogWidth: 800),
|
|
this.MakeStandardAction("ReceiptHeader2", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "xwms", dialogWidth: 800),
|
|
this.MakeStandardAction("ReceiptHeader2", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "xwms", dialogWidth: 800),
|
|
this.MakeStandardAction("ReceiptHeader2", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "xwms", dialogWidth: 800),
|
|
this.MakeStandardAction("ReceiptHeader2", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "xwms", dialogWidth: 800),
|
|
this.MakeStandardAction("ReceiptHeader2", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "xwms", dialogWidth: 800),
|
|
this.MakeStandardAction("ReceiptHeader2", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "xwms", dialogWidth: 800),
|
|
this.MakeStandardAction("ReceiptHeader2", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "xwms"),
|
|
};
|
|
}
|
|
|
|
|
|
protected override IEnumerable<IGridColumn<ReceiptHeader2_View>> InitGridHeader()
|
|
{
|
|
return new List<GridColumn<ReceiptHeader2_View>>{
|
|
this.MakeGridHeader(x => x.Code),
|
|
this.MakeGridHeader(x => x.CompanyId),
|
|
this.MakeGridHeader(x => x.CompanyCode),
|
|
this.MakeGridHeader(x => x.Type),
|
|
this.MakeGridHeader(x => x.SourceCode),
|
|
this.MakeGridHeader(x => x.SourcePlatform),
|
|
this.MakeGridHeader(x => x.SupplierId),
|
|
this.MakeGridHeader(x => x.SupplierCode),
|
|
this.MakeGridHeader(x => x.SupplierName),
|
|
this.MakeGridHeader(x => x.TotalQty),
|
|
this.MakeGridHeader(x => x.TotalLines),
|
|
this.MakeGridHeader(x => x.FreeScan),
|
|
this.MakeGridHeader(x => x.Remark),
|
|
this.MakeGridHeader(x => x.UploadStatus),
|
|
this.MakeGridHeader(x => x.Uploadremark),
|
|
this.MakeGridHeader(x => x.UploadTime),
|
|
this.MakeGridHeader(x => x.AppointmentTime),
|
|
this.MakeGridHeader(x => x.FirstStatus),
|
|
this.MakeGridHeader(x => x.LastStatus),
|
|
this.MakeGridHeader(x => x.Enable),
|
|
this.MakeGridHeader(x => x.Deleted),
|
|
this.MakeGridHeader(x => x.Scanid),
|
|
this.MakeGridHeader(x => x.UserDef1),
|
|
this.MakeGridHeader(x => x.UserDef2),
|
|
this.MakeGridHeader(x => x.UserDef3),
|
|
this.MakeGridHeader(x => x.Station),
|
|
this.MakeGridHeaderAction(width: 200)
|
|
};
|
|
}
|
|
|
|
public override IOrderedQueryable<ReceiptHeader2_View> GetSearchQuery()
|
|
{
|
|
var query = DC.Set<ReceiptHeader2>()
|
|
.Select(x => new ReceiptHeader2_View
|
|
{
|
|
ID = x.ID,
|
|
Code = x.Code,
|
|
CompanyId = x.CompanyId,
|
|
CompanyCode = x.CompanyCode,
|
|
Type = x.Type,
|
|
SourceCode = x.SourceCode,
|
|
SourcePlatform = x.SourcePlatform,
|
|
SupplierId = x.SupplierId,
|
|
SupplierCode = x.SupplierCode,
|
|
SupplierName = x.SupplierName,
|
|
TotalQty = x.TotalQty,
|
|
TotalLines = x.TotalLines,
|
|
FreeScan = x.FreeScan,
|
|
Remark = x.Remark,
|
|
UploadStatus = x.UploadStatus,
|
|
Uploadremark = x.Uploadremark,
|
|
UploadTime = x.UploadTime,
|
|
AppointmentTime = x.AppointmentTime,
|
|
FirstStatus = x.FirstStatus,
|
|
LastStatus = x.LastStatus,
|
|
Enable = x.Enable,
|
|
Deleted = x.Deleted,
|
|
Scanid = x.Scanid,
|
|
UserDef1 = x.UserDef1,
|
|
UserDef2 = x.UserDef2,
|
|
UserDef3 = x.UserDef3,
|
|
Station = x.Station,
|
|
})
|
|
.OrderBy(x => x.ID);
|
|
return query;
|
|
}
|
|
|
|
}
|
|
|
|
public class ReceiptHeader2_View : ReceiptHeader2{
|
|
|
|
}
|
|
}
|