liaoxujun@qq.com
2024-02-26 a71cfd93b85389e6473afdca1b7d6411bb676d0d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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 cy_scdz.Model.Oder;
 
 
namespace cy_scdz.ViewModel.Order.OrderProductionVMs
{
    public partial class OrderProductionListVM : BasePagedListVM<OrderProduction_View, OrderProductionSearcher>
    {
        protected override List<GridAction> InitGridAction()
        {
            return new List<GridAction>
            {
                this.MakeStandardAction("OrderProduction", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"Order", dialogWidth: 800),
                this.MakeStandardAction("OrderProduction", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "Order", dialogWidth: 800),
                this.MakeStandardAction("OrderProduction", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "Order", dialogWidth: 800),
                this.MakeStandardAction("OrderProduction", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "Order", dialogWidth: 800),
                this.MakeStandardAction("OrderProduction", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "Order", dialogWidth: 800),
                this.MakeStandardAction("OrderProduction", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "Order", dialogWidth: 800),
                this.MakeStandardAction("OrderProduction", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "Order", dialogWidth: 800),
                this.MakeStandardAction("OrderProduction", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "Order"),
            };
        }
 
 
        protected override IEnumerable<IGridColumn<OrderProduction_View>> InitGridHeader()
        {
            return new List<GridColumn<OrderProduction_View>>{
                this.MakeGridHeader(x => x.Title_view),
                this.MakeGridHeader(x => x.Workbook16KCount),
                this.MakeGridHeader(x => x.Workbook16KPrice),
                this.MakeGridHeader(x => x.Workbook16KManufacturerId),
                this.MakeGridHeader(x => x.Workbook32KCount),
                this.MakeGridHeader(x => x.Workbook32KPrice),
                this.MakeGridHeader(x => x.Workbook32KManufacturerId),
                this.MakeGridHeader(x => x.PictureBook16KCount),
                this.MakeGridHeader(x => x.PictureBook16KPrice),
                this.MakeGridHeader(x => x.PictureBook16KManufacturerId),
                this.MakeGridHeader(x => x.PictureBook32KCount),
                this.MakeGridHeader(x => x.PictureBook32KPrice),
                this.MakeGridHeader(x => x.PictureBook32KManufacturerId),
                this.MakeGridHeader(x => x.PictureBookA4Count),
                this.MakeGridHeader(x => x.PictureBookA4KPrice),
                this.MakeGridHeader(x => x.PictureBookA4KManufacturerId),
                this.MakeGridHeader(x => x.LargeCharacterBookCount),
                this.MakeGridHeader(x => x.LargeCharacterPrice),
                this.MakeGridHeader(x => x.LargeCharacterManufacturerIds),
                this.MakeGridHeader(x => x.Mark),
                this.MakeGridHeader(x => x.DeliveryTime),
                this.MakeGridHeader(x => x.Chunqiuji),
                this.MakeGridHeader(x => x.IsOver),
                this.MakeGridHeaderAction(width: 200)
            };
        }
 
        public override IOrderedQueryable<OrderProduction_View> GetSearchQuery()
        {
            var query = DC.Set<OrderProduction>()
                .Select(x => new OrderProduction_View
                {
                    ID = x.ID,
                    Title_view = x.Oder.Title,
                    Workbook16KCount = x.Workbook16KCount,
                    Workbook16KPrice = x.Workbook16KPrice,
                    Workbook16KManufacturerId = x.Workbook16KManufacturerId,
                    Workbook32KCount = x.Workbook32KCount,
                    Workbook32KPrice = x.Workbook32KPrice,
                    Workbook32KManufacturerId = x.Workbook32KManufacturerId,
                    PictureBook16KCount = x.PictureBook16KCount,
                    PictureBook16KPrice = x.PictureBook16KPrice,
                    PictureBook16KManufacturerId = x.PictureBook16KManufacturerId,
                    PictureBook32KCount = x.PictureBook32KCount,
                    PictureBook32KPrice = x.PictureBook32KPrice,
                    PictureBook32KManufacturerId = x.PictureBook32KManufacturerId,
                    PictureBookA4Count = x.PictureBookA4Count,
                    PictureBookA4KPrice = x.PictureBookA4KPrice,
                    PictureBookA4KManufacturerId = x.PictureBookA4KManufacturerId,
                    LargeCharacterBookCount = x.LargeCharacterBookCount,
                    LargeCharacterPrice = x.LargeCharacterPrice,
                    LargeCharacterManufacturerIds = x.LargeCharacterManufacturerIds,
                    Mark = x.Mark,
                    DeliveryTime = x.DeliveryTime,
                    Chunqiuji = x.Chunqiuji,
                    IsOver = x.IsOver,
                })
                .OrderBy(x => x.ID);
            return query;
        }
 
    }
 
    public class OrderProduction_View : OrderProduction{
        [Display(Name = "项目名称")]
        public String Title_view { get; set; }
 
    }
}