添加打印模板配置
This commit is contained in:
1 parent
b627851ab5
commit
ebdd40c518
22 files changed
+585
-191
No files matched your search
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using HHWMS.Web.Models;
|
||||
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class PrintConfigBatchVM : BaseBatchVM<PrintConfig, PrintConfig_BatchEdit>
|
||||
{
|
||||
public PrintConfigBatchVM()
|
||||
{
|
||||
ListVM = new PrintConfigListVM();
|
||||
LinkedVM = new PrintConfig_BatchEdit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class to define batch edit fields
|
||||
/// </summary>
|
||||
public class PrintConfig_BatchEdit : BaseVM
|
||||
{
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using HHWMS.Web.Models;
|
||||
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class PrintConfigTemplateVM : BaseTemplateVM
|
||||
{
|
||||
[Display(Name = "PrintConfig.Name")]
|
||||
public ExcelPropety Name_Excel = ExcelPropety.CreateProperty<PrintConfig>(x => x.Name);
|
||||
[Display(Name = "PrintConfig.Template")]
|
||||
public ExcelPropety Template_Excel = ExcelPropety.CreateProperty<PrintConfig>(x => x.Template);
|
||||
[Display(Name = "PrintConfig.TestData")]
|
||||
public ExcelPropety TestData_Excel = ExcelPropety.CreateProperty<PrintConfig>(x => x.TestData);
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class PrintConfigImportVM : BaseImportVM<PrintConfigTemplateVM, PrintConfig>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
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
|
||||
{
|
||||
public partial class PrintConfigListVM : BasePagedListVM<PrintConfig_View, PrintConfigSearcher>
|
||||
{
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
return new List<GridAction>
|
||||
{
|
||||
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "configs"),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
protected override IEnumerable<IGridColumn<PrintConfig_View>> InitGridHeader()
|
||||
{
|
||||
return new List<GridColumn<PrintConfig_View>>{
|
||||
this.MakeGridHeader(x => x.Name),
|
||||
this.MakeGridHeader(x => x.Template),
|
||||
this.MakeGridHeader(x => x.TestData),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
};
|
||||
}
|
||||
|
||||
public override IOrderedQueryable<PrintConfig_View> GetSearchQuery()
|
||||
{
|
||||
var query = DC.Set<PrintConfig>()
|
||||
.CheckContain(Searcher.Name, x=>x.Name)
|
||||
.Select(x => new PrintConfig_View
|
||||
{
|
||||
ID = x.ID,
|
||||
Name = x.Name,
|
||||
Template = x.Template,
|
||||
TestData = x.TestData,
|
||||
})
|
||||
.OrderBy(x => x.ID);
|
||||
return query;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class PrintConfig_View : PrintConfig{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using HHWMS.Web.Models;
|
||||
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class PrintConfigSearcher : BaseSearcher
|
||||
{
|
||||
[Display(Name = "PrintConfig.Name")]
|
||||
public String Name { get; set; }
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
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
|
||||
{
|
||||
public partial class PrintConfigVM : BaseCRUDVM<PrintConfig>
|
||||
{
|
||||
|
||||
public PrintConfigVM()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
public override void DoAdd()
|
||||
{
|
||||
base.DoAdd();
|
||||
}
|
||||
|
||||
public override void DoEdit(bool updateAllFields = false)
|
||||
{
|
||||
base.DoEdit(updateAllFields);
|
||||
}
|
||||
|
||||
public override void DoDelete()
|
||||
{
|
||||
base.DoDelete();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user