浏览代码

Add retry field to vender events.
Add download, export and view PIN user permissions.

Andrew Klopper 8 年之前
父节点
当前提交
861188a4e7

+ 5 - 0
BulkPrintingAPI/Controllers/Utils.cs

@@ -181,6 +181,11 @@ namespace BulkPrintingAPI.Controllers
181 181
                 existingUser.OfflineReprintValue = user.OfflineReprintValue;
182 182
                 existingUser.OnlinePrintValue = user.OnlinePrintValue;
183 183
                 existingUser.OnlineReprintValue = user.OnlineReprintValue;
184
+                existingUser.BulkExport = user.BulkExport;
185
+                existingUser.BulkExportMaxValue = user.BulkExportMaxValue;
186
+                existingUser.BulkOrder = user.BulkOrder;
187
+                existingUser.BulkOrderMaxValue = user.BulkOrderMaxValue;
188
+                existingUser.BulkViewPins = user.BulkViewPins;
184 189
 
185 190
                 user = existingUser;
186 191
             }

+ 4 - 1
BulkPrintingAPI/Controllers/VendorEventsController.cs

@@ -33,6 +33,8 @@ namespace BulkPrintingAPI.Controllers
33 33
 
34 34
             [Required]
35 35
             public VendorEvent.VendorEventType? EventType { get; set; }
36
+
37
+            public bool Retry { get; set; }
36 38
         }
37 39
 
38 40
         public VendorEventsController(MAXContext context)
@@ -83,7 +85,8 @@ namespace BulkPrintingAPI.Controllers
83 85
                     VendorId = remoteEvent.VendorId.Value,
84 86
                     VoucherId = remoteEvent.VoucherId,
85 87
                     EventType = remoteEvent.EventType.Value,
86
-                    EventDate = remoteEvent.EventDate.Value.ToUniversalTime()
88
+                    EventDate = remoteEvent.EventDate.Value.ToUniversalTime(),
89
+                    Retry = remoteEvent.Retry
87 90
                 });
88 91
             }
89 92
 

+ 285 - 0
BulkPrintingAPI/Migrations/20170821080542_AddVendorEventRetryField.Designer.cs

@@ -0,0 +1,285 @@
1
+using System;
2
+using Microsoft.EntityFrameworkCore;
3
+using Microsoft.EntityFrameworkCore.Infrastructure;
4
+using Microsoft.EntityFrameworkCore.Metadata;
5
+using Microsoft.EntityFrameworkCore.Migrations;
6
+using MAX.Models;
7
+
8
+namespace BulkPrintingAPI.Migrations
9
+{
10
+    [DbContext(typeof(MAXContext))]
11
+    [Migration("20170821080542_AddVendorEventRetryField")]
12
+    partial class AddVendorEventRetryField
13
+    {
14
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
15
+        {
16
+            modelBuilder
17
+                .HasAnnotation("ProductVersion", "1.1.2")
18
+                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
19
+
20
+            modelBuilder.Entity("MAX.Models.Account", b =>
21
+                {
22
+                    b.Property<int>("Id");
23
+
24
+                    b.Property<decimal>("Balance");
25
+
26
+                    b.Property<string>("Name")
27
+                        .IsRequired()
28
+                        .HasMaxLength(50);
29
+
30
+                    b.Property<string>("Reference")
31
+                        .IsRequired()
32
+                        .HasMaxLength(50);
33
+
34
+                    b.Property<int>("Status");
35
+
36
+                    b.Property<int>("WarehouseId");
37
+
38
+                    b.HasKey("Id");
39
+
40
+                    b.HasIndex("WarehouseId");
41
+
42
+                    b.ToTable("Accounts");
43
+                });
44
+
45
+            modelBuilder.Entity("MAX.Models.Batch", b =>
46
+                {
47
+                    b.Property<int>("Id");
48
+
49
+                    b.Property<int>("AccountId");
50
+
51
+                    b.Property<decimal>("Cost");
52
+
53
+                    b.Property<int>("DeliveredQuantity");
54
+
55
+                    b.Property<decimal>("DiscountPercentage");
56
+
57
+                    b.Property<decimal>("FaceValue");
58
+
59
+                    b.Property<int>("NetworkId");
60
+
61
+                    b.Property<string>("NetworkName")
62
+                        .IsRequired()
63
+                        .HasMaxLength(20);
64
+
65
+                    b.Property<DateTimeOffset>("OrderDate");
66
+
67
+                    b.Property<Guid?>("OrderGuid");
68
+
69
+                    b.Property<string>("OrderReference")
70
+                        .IsRequired()
71
+                        .HasMaxLength(20);
72
+
73
+                    b.Property<int>("OrderedById");
74
+
75
+                    b.Property<string>("ProductDescription")
76
+                        .IsRequired()
77
+                        .HasMaxLength(50);
78
+
79
+                    b.Property<int>("ProductId");
80
+
81
+                    b.Property<bool>("ReadyForDownload");
82
+
83
+                    b.Property<int>("RequestedQuantity");
84
+
85
+                    b.Property<int>("VendorId");
86
+
87
+                    b.Property<int>("VoucherType");
88
+
89
+                    b.HasKey("Id");
90
+
91
+                    b.HasIndex("AccountId");
92
+
93
+                    b.HasIndex("OrderGuid")
94
+                        .IsUnique();
95
+
96
+                    b.HasIndex("ReadyForDownload", "OrderDate");
97
+
98
+                    b.ToTable("Batches");
99
+                });
100
+
101
+            modelBuilder.Entity("MAX.Models.User", b =>
102
+                {
103
+                    b.Property<int>("Id");
104
+
105
+                    b.Property<int>("AccountId");
106
+
107
+                    b.Property<bool>("CanPrintOffline");
108
+
109
+                    b.Property<bool>("CanPrintOnline");
110
+
111
+                    b.Property<bool>("CanReprintOffline");
112
+
113
+                    b.Property<bool>("CanReprintOnline");
114
+
115
+                    b.Property<bool>("Enabled");
116
+
117
+                    b.Property<string>("FirstName")
118
+                        .IsRequired()
119
+                        .HasMaxLength(50);
120
+
121
+                    b.Property<DateTimeOffset>("LastLogin");
122
+
123
+                    b.Property<int>("Level");
124
+
125
+                    b.Property<decimal>("OfflinePrintValue");
126
+
127
+                    b.Property<decimal>("OfflineReprintValue");
128
+
129
+                    b.Property<decimal>("OnlinePrintValue");
130
+
131
+                    b.Property<decimal>("OnlineReprintValue");
132
+
133
+                    b.Property<string>("Surname")
134
+                        .IsRequired()
135
+                        .HasMaxLength(50);
136
+
137
+                    b.Property<int>("System");
138
+
139
+                    b.Property<string>("Username")
140
+                        .IsRequired()
141
+                        .HasMaxLength(50);
142
+
143
+                    b.HasKey("Id");
144
+
145
+                    b.HasIndex("AccountId");
146
+
147
+                    b.ToTable("Users");
148
+                });
149
+
150
+            modelBuilder.Entity("MAX.Models.Vendor", b =>
151
+                {
152
+                    b.Property<int>("Id");
153
+
154
+                    b.Property<int>("AccountId");
155
+
156
+                    b.Property<byte[]>("EncryptedDatabasePassword")
157
+                        .IsRequired()
158
+                        .HasMaxLength(32);
159
+
160
+                    b.Property<byte[]>("EncryptedVoucherKey")
161
+                        .IsRequired()
162
+                        .HasMaxLength(32);
163
+
164
+                    b.Property<int?>("LastVendorEventRemoteId");
165
+
166
+                    b.Property<string>("SerialNumber")
167
+                        .IsRequired()
168
+                        .HasMaxLength(50);
169
+
170
+                    b.HasKey("Id");
171
+
172
+                    b.HasIndex("AccountId");
173
+
174
+                    b.ToTable("Vendors");
175
+                });
176
+
177
+            modelBuilder.Entity("MAX.Models.VendorEvent", b =>
178
+                {
179
+                    b.Property<int>("Id")
180
+                        .ValueGeneratedOnAdd();
181
+
182
+                    b.Property<DateTimeOffset>("EventDate");
183
+
184
+                    b.Property<int>("EventType");
185
+
186
+                    b.Property<int?>("RemoteId");
187
+
188
+                    b.Property<bool>("Retry");
189
+
190
+                    b.Property<int>("UserId");
191
+
192
+                    b.Property<int>("VendorId");
193
+
194
+                    b.Property<int?>("VoucherId");
195
+
196
+                    b.HasKey("Id");
197
+
198
+                    b.HasIndex("VendorId", "RemoteId")
199
+                        .IsUnique();
200
+
201
+                    b.ToTable("VendorEvents");
202
+                });
203
+
204
+            modelBuilder.Entity("MAX.Models.Voucher", b =>
205
+                {
206
+                    b.Property<int>("Id");
207
+
208
+                    b.Property<int>("BatchId");
209
+
210
+                    b.Property<string>("EncryptedPIN")
211
+                        .IsRequired()
212
+                        .HasMaxLength(50);
213
+
214
+                    b.Property<DateTime>("ExpiryDate")
215
+                        .HasColumnType("Date");
216
+
217
+                    b.Property<int>("SequenceNumber");
218
+
219
+                    b.Property<string>("Serial")
220
+                        .IsRequired()
221
+                        .HasMaxLength(50);
222
+
223
+                    b.HasKey("Id");
224
+
225
+                    b.HasIndex("BatchId", "SequenceNumber")
226
+                        .IsUnique();
227
+
228
+                    b.ToTable("Vouchers");
229
+                });
230
+
231
+            modelBuilder.Entity("MAX.Models.Warehouse", b =>
232
+                {
233
+                    b.Property<int>("Id");
234
+
235
+                    b.Property<string>("Name")
236
+                        .IsRequired()
237
+                        .HasMaxLength(50);
238
+
239
+                    b.HasKey("Id");
240
+
241
+                    b.ToTable("Warehouses");
242
+                });
243
+
244
+            modelBuilder.Entity("MAX.Models.Account", b =>
245
+                {
246
+                    b.HasOne("MAX.Models.Warehouse", "Warehouse")
247
+                        .WithMany("Accounts")
248
+                        .HasForeignKey("WarehouseId")
249
+                        .OnDelete(DeleteBehavior.Cascade);
250
+                });
251
+
252
+            modelBuilder.Entity("MAX.Models.Batch", b =>
253
+                {
254
+                    b.HasOne("MAX.Models.Account", "Account")
255
+                        .WithMany()
256
+                        .HasForeignKey("AccountId")
257
+                        .OnDelete(DeleteBehavior.Cascade);
258
+                });
259
+
260
+            modelBuilder.Entity("MAX.Models.User", b =>
261
+                {
262
+                    b.HasOne("MAX.Models.Account", "Account")
263
+                        .WithMany("Users")
264
+                        .HasForeignKey("AccountId")
265
+                        .OnDelete(DeleteBehavior.Cascade);
266
+                });
267
+
268
+            modelBuilder.Entity("MAX.Models.Vendor", b =>
269
+                {
270
+                    b.HasOne("MAX.Models.Account", "Account")
271
+                        .WithMany("Vendors")
272
+                        .HasForeignKey("AccountId")
273
+                        .OnDelete(DeleteBehavior.Cascade);
274
+                });
275
+
276
+            modelBuilder.Entity("MAX.Models.Voucher", b =>
277
+                {
278
+                    b.HasOne("MAX.Models.Batch", "Batch")
279
+                        .WithMany("Vouchers")
280
+                        .HasForeignKey("BatchId")
281
+                        .OnDelete(DeleteBehavior.Cascade);
282
+                });
283
+        }
284
+    }
285
+}

+ 25 - 0
BulkPrintingAPI/Migrations/20170821080542_AddVendorEventRetryField.cs

@@ -0,0 +1,25 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using Microsoft.EntityFrameworkCore.Migrations;
4
+
5
+namespace BulkPrintingAPI.Migrations
6
+{
7
+    public partial class AddVendorEventRetryField : Migration
8
+    {
9
+        protected override void Up(MigrationBuilder migrationBuilder)
10
+        {
11
+            migrationBuilder.AddColumn<bool>(
12
+                name: "Retry",
13
+                table: "VendorEvents",
14
+                nullable: false,
15
+                defaultValue: false);
16
+        }
17
+
18
+        protected override void Down(MigrationBuilder migrationBuilder)
19
+        {
20
+            migrationBuilder.DropColumn(
21
+                name: "Retry",
22
+                table: "VendorEvents");
23
+        }
24
+    }
25
+}

+ 295 - 0
BulkPrintingAPI/Migrations/20170823095121_AddExportOrderViewPinUserPermissions.Designer.cs

@@ -0,0 +1,295 @@
1
+using System;
2
+using Microsoft.EntityFrameworkCore;
3
+using Microsoft.EntityFrameworkCore.Infrastructure;
4
+using Microsoft.EntityFrameworkCore.Metadata;
5
+using Microsoft.EntityFrameworkCore.Migrations;
6
+using MAX.Models;
7
+
8
+namespace BulkPrintingAPI.Migrations
9
+{
10
+    [DbContext(typeof(MAXContext))]
11
+    [Migration("20170823095121_AddExportOrderViewPinUserPermissions")]
12
+    partial class AddExportOrderViewPinUserPermissions
13
+    {
14
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
15
+        {
16
+            modelBuilder
17
+                .HasAnnotation("ProductVersion", "1.1.2")
18
+                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
19
+
20
+            modelBuilder.Entity("MAX.Models.Account", b =>
21
+                {
22
+                    b.Property<int>("Id");
23
+
24
+                    b.Property<decimal>("Balance");
25
+
26
+                    b.Property<string>("Name")
27
+                        .IsRequired()
28
+                        .HasMaxLength(50);
29
+
30
+                    b.Property<string>("Reference")
31
+                        .IsRequired()
32
+                        .HasMaxLength(50);
33
+
34
+                    b.Property<int>("Status");
35
+
36
+                    b.Property<int>("WarehouseId");
37
+
38
+                    b.HasKey("Id");
39
+
40
+                    b.HasIndex("WarehouseId");
41
+
42
+                    b.ToTable("Accounts");
43
+                });
44
+
45
+            modelBuilder.Entity("MAX.Models.Batch", b =>
46
+                {
47
+                    b.Property<int>("Id");
48
+
49
+                    b.Property<int>("AccountId");
50
+
51
+                    b.Property<decimal>("Cost");
52
+
53
+                    b.Property<int>("DeliveredQuantity");
54
+
55
+                    b.Property<decimal>("DiscountPercentage");
56
+
57
+                    b.Property<decimal>("FaceValue");
58
+
59
+                    b.Property<int>("NetworkId");
60
+
61
+                    b.Property<string>("NetworkName")
62
+                        .IsRequired()
63
+                        .HasMaxLength(20);
64
+
65
+                    b.Property<DateTimeOffset>("OrderDate");
66
+
67
+                    b.Property<Guid?>("OrderGuid");
68
+
69
+                    b.Property<string>("OrderReference")
70
+                        .IsRequired()
71
+                        .HasMaxLength(20);
72
+
73
+                    b.Property<int>("OrderedById");
74
+
75
+                    b.Property<string>("ProductDescription")
76
+                        .IsRequired()
77
+                        .HasMaxLength(50);
78
+
79
+                    b.Property<int>("ProductId");
80
+
81
+                    b.Property<bool>("ReadyForDownload");
82
+
83
+                    b.Property<int>("RequestedQuantity");
84
+
85
+                    b.Property<int>("VendorId");
86
+
87
+                    b.Property<int>("VoucherType");
88
+
89
+                    b.HasKey("Id");
90
+
91
+                    b.HasIndex("AccountId");
92
+
93
+                    b.HasIndex("OrderGuid")
94
+                        .IsUnique();
95
+
96
+                    b.HasIndex("ReadyForDownload", "OrderDate");
97
+
98
+                    b.ToTable("Batches");
99
+                });
100
+
101
+            modelBuilder.Entity("MAX.Models.User", b =>
102
+                {
103
+                    b.Property<int>("Id");
104
+
105
+                    b.Property<int>("AccountId");
106
+
107
+                    b.Property<bool>("BulkExport");
108
+
109
+                    b.Property<decimal>("BulkExportMaxValue");
110
+
111
+                    b.Property<bool>("BulkOrder");
112
+
113
+                    b.Property<decimal>("BulkOrderMaxValue");
114
+
115
+                    b.Property<bool>("BulkViewPins");
116
+
117
+                    b.Property<bool>("CanPrintOffline");
118
+
119
+                    b.Property<bool>("CanPrintOnline");
120
+
121
+                    b.Property<bool>("CanReprintOffline");
122
+
123
+                    b.Property<bool>("CanReprintOnline");
124
+
125
+                    b.Property<bool>("Enabled");
126
+
127
+                    b.Property<string>("FirstName")
128
+                        .IsRequired()
129
+                        .HasMaxLength(50);
130
+
131
+                    b.Property<DateTimeOffset>("LastLogin");
132
+
133
+                    b.Property<int>("Level");
134
+
135
+                    b.Property<decimal>("OfflinePrintValue");
136
+
137
+                    b.Property<decimal>("OfflineReprintValue");
138
+
139
+                    b.Property<decimal>("OnlinePrintValue");
140
+
141
+                    b.Property<decimal>("OnlineReprintValue");
142
+
143
+                    b.Property<string>("Surname")
144
+                        .IsRequired()
145
+                        .HasMaxLength(50);
146
+
147
+                    b.Property<int>("System");
148
+
149
+                    b.Property<string>("Username")
150
+                        .IsRequired()
151
+                        .HasMaxLength(50);
152
+
153
+                    b.HasKey("Id");
154
+
155
+                    b.HasIndex("AccountId");
156
+
157
+                    b.ToTable("Users");
158
+                });
159
+
160
+            modelBuilder.Entity("MAX.Models.Vendor", b =>
161
+                {
162
+                    b.Property<int>("Id");
163
+
164
+                    b.Property<int>("AccountId");
165
+
166
+                    b.Property<byte[]>("EncryptedDatabasePassword")
167
+                        .IsRequired()
168
+                        .HasMaxLength(32);
169
+
170
+                    b.Property<byte[]>("EncryptedVoucherKey")
171
+                        .IsRequired()
172
+                        .HasMaxLength(32);
173
+
174
+                    b.Property<int?>("LastVendorEventRemoteId");
175
+
176
+                    b.Property<string>("SerialNumber")
177
+                        .IsRequired()
178
+                        .HasMaxLength(50);
179
+
180
+                    b.HasKey("Id");
181
+
182
+                    b.HasIndex("AccountId");
183
+
184
+                    b.ToTable("Vendors");
185
+                });
186
+
187
+            modelBuilder.Entity("MAX.Models.VendorEvent", b =>
188
+                {
189
+                    b.Property<int>("Id")
190
+                        .ValueGeneratedOnAdd();
191
+
192
+                    b.Property<DateTimeOffset>("EventDate");
193
+
194
+                    b.Property<int>("EventType");
195
+
196
+                    b.Property<int?>("RemoteId");
197
+
198
+                    b.Property<bool>("Retry");
199
+
200
+                    b.Property<int>("UserId");
201
+
202
+                    b.Property<int>("VendorId");
203
+
204
+                    b.Property<int?>("VoucherId");
205
+
206
+                    b.HasKey("Id");
207
+
208
+                    b.HasIndex("VendorId", "RemoteId")
209
+                        .IsUnique();
210
+
211
+                    b.ToTable("VendorEvents");
212
+                });
213
+
214
+            modelBuilder.Entity("MAX.Models.Voucher", b =>
215
+                {
216
+                    b.Property<int>("Id");
217
+
218
+                    b.Property<int>("BatchId");
219
+
220
+                    b.Property<string>("EncryptedPIN")
221
+                        .IsRequired()
222
+                        .HasMaxLength(50);
223
+
224
+                    b.Property<DateTime>("ExpiryDate")
225
+                        .HasColumnType("Date");
226
+
227
+                    b.Property<int>("SequenceNumber");
228
+
229
+                    b.Property<string>("Serial")
230
+                        .IsRequired()
231
+                        .HasMaxLength(50);
232
+
233
+                    b.HasKey("Id");
234
+
235
+                    b.HasIndex("BatchId", "SequenceNumber")
236
+                        .IsUnique();
237
+
238
+                    b.ToTable("Vouchers");
239
+                });
240
+
241
+            modelBuilder.Entity("MAX.Models.Warehouse", b =>
242
+                {
243
+                    b.Property<int>("Id");
244
+
245
+                    b.Property<string>("Name")
246
+                        .IsRequired()
247
+                        .HasMaxLength(50);
248
+
249
+                    b.HasKey("Id");
250
+
251
+                    b.ToTable("Warehouses");
252
+                });
253
+
254
+            modelBuilder.Entity("MAX.Models.Account", b =>
255
+                {
256
+                    b.HasOne("MAX.Models.Warehouse", "Warehouse")
257
+                        .WithMany("Accounts")
258
+                        .HasForeignKey("WarehouseId")
259
+                        .OnDelete(DeleteBehavior.Cascade);
260
+                });
261
+
262
+            modelBuilder.Entity("MAX.Models.Batch", b =>
263
+                {
264
+                    b.HasOne("MAX.Models.Account", "Account")
265
+                        .WithMany()
266
+                        .HasForeignKey("AccountId")
267
+                        .OnDelete(DeleteBehavior.Cascade);
268
+                });
269
+
270
+            modelBuilder.Entity("MAX.Models.User", b =>
271
+                {
272
+                    b.HasOne("MAX.Models.Account", "Account")
273
+                        .WithMany("Users")
274
+                        .HasForeignKey("AccountId")
275
+                        .OnDelete(DeleteBehavior.Cascade);
276
+                });
277
+
278
+            modelBuilder.Entity("MAX.Models.Vendor", b =>
279
+                {
280
+                    b.HasOne("MAX.Models.Account", "Account")
281
+                        .WithMany("Vendors")
282
+                        .HasForeignKey("AccountId")
283
+                        .OnDelete(DeleteBehavior.Cascade);
284
+                });
285
+
286
+            modelBuilder.Entity("MAX.Models.Voucher", b =>
287
+                {
288
+                    b.HasOne("MAX.Models.Batch", "Batch")
289
+                        .WithMany("Vouchers")
290
+                        .HasForeignKey("BatchId")
291
+                        .OnDelete(DeleteBehavior.Cascade);
292
+                });
293
+        }
294
+    }
295
+}

+ 65 - 0
BulkPrintingAPI/Migrations/20170823095121_AddExportOrderViewPinUserPermissions.cs

@@ -0,0 +1,65 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using Microsoft.EntityFrameworkCore.Migrations;
4
+
5
+namespace BulkPrintingAPI.Migrations
6
+{
7
+    public partial class AddExportOrderViewPinUserPermissions : Migration
8
+    {
9
+        protected override void Up(MigrationBuilder migrationBuilder)
10
+        {
11
+            migrationBuilder.AddColumn<bool>(
12
+                name: "BulkExport",
13
+                table: "Users",
14
+                nullable: false,
15
+                defaultValue: false);
16
+
17
+            migrationBuilder.AddColumn<decimal>(
18
+                name: "BulkExportMaxValue",
19
+                table: "Users",
20
+                nullable: false,
21
+                defaultValue: 0m);
22
+
23
+            migrationBuilder.AddColumn<bool>(
24
+                name: "BulkOrder",
25
+                table: "Users",
26
+                nullable: false,
27
+                defaultValue: false);
28
+
29
+            migrationBuilder.AddColumn<decimal>(
30
+                name: "BulkOrderMaxValue",
31
+                table: "Users",
32
+                nullable: false,
33
+                defaultValue: 0m);
34
+
35
+            migrationBuilder.AddColumn<bool>(
36
+                name: "BulkViewPins",
37
+                table: "Users",
38
+                nullable: false,
39
+                defaultValue: false);
40
+        }
41
+
42
+        protected override void Down(MigrationBuilder migrationBuilder)
43
+        {
44
+            migrationBuilder.DropColumn(
45
+                name: "BulkExport",
46
+                table: "Users");
47
+
48
+            migrationBuilder.DropColumn(
49
+                name: "BulkExportMaxValue",
50
+                table: "Users");
51
+
52
+            migrationBuilder.DropColumn(
53
+                name: "BulkOrder",
54
+                table: "Users");
55
+
56
+            migrationBuilder.DropColumn(
57
+                name: "BulkOrderMaxValue",
58
+                table: "Users");
59
+
60
+            migrationBuilder.DropColumn(
61
+                name: "BulkViewPins",
62
+                table: "Users");
63
+        }
64
+    }
65
+}

+ 12 - 0
BulkPrintingAPI/Migrations/MAXContextModelSnapshot.cs

@@ -103,6 +103,16 @@ namespace BulkPrintingAPI.Migrations
103 103
 
104 104
                     b.Property<int>("AccountId");
105 105
 
106
+                    b.Property<bool>("BulkExport");
107
+
108
+                    b.Property<decimal>("BulkExportMaxValue");
109
+
110
+                    b.Property<bool>("BulkOrder");
111
+
112
+                    b.Property<decimal>("BulkOrderMaxValue");
113
+
114
+                    b.Property<bool>("BulkViewPins");
115
+
106 116
                     b.Property<bool>("CanPrintOffline");
107 117
 
108 118
                     b.Property<bool>("CanPrintOnline");
@@ -184,6 +194,8 @@ namespace BulkPrintingAPI.Migrations
184 194
 
185 195
                     b.Property<int?>("RemoteId");
186 196
 
197
+                    b.Property<bool>("Retry");
198
+
187 199
                     b.Property<int>("UserId");
188 200
 
189 201
                     b.Property<int>("VendorId");

+ 1 - 1
BulkPrintingAPI/Properties/PublishProfiles/FolderProfile.pubxml

@@ -17,4 +17,4 @@ by editing this MSBuild file. In order to learn more about this please visit htt
17 17
     <publishUrl>bin\Release\PublishOutput</publishUrl>
18 18
     <DeleteExistingFiles>False</DeleteExistingFiles>
19 19
   </PropertyGroup>
20
-</Project>
20
+</Project>

+ 5 - 0
MAXClient/Client.cs

@@ -146,6 +146,11 @@ namespace MAX
146 146
                     user.OfflineReprintValue = decimal.Parse(parts[12]);
147 147
                     user.CanReprintOnline = bool.Parse(parts[13]);
148 148
                     user.OnlineReprintValue = decimal.Parse(parts[14]);
149
+                    user.BulkExport = bool.Parse(parts[15]);
150
+                    user.BulkExportMaxValue = decimal.Parse(parts[16]);
151
+                    user.BulkOrder = bool.Parse(parts[17]);
152
+                    user.BulkOrderMaxValue = decimal.Parse(parts[18]);
153
+                    user.BulkViewPins = bool.Parse(parts[19]);
149 154
                 }
150 155
 
151 156
                 return user;

+ 10 - 0
MAXData/Models/User.cs

@@ -54,5 +54,15 @@ namespace MAX.Models
54 54
         public bool CanReprintOffline { get; set; }
55 55
 
56 56
         public decimal OfflineReprintValue { get; set; }
57
+
58
+        public bool BulkExport { get; set; }
59
+
60
+        public decimal BulkExportMaxValue { get; set; }
61
+
62
+        public bool BulkOrder { get; set; }
63
+
64
+        public decimal BulkOrderMaxValue { get; set; }
65
+
66
+        public bool BulkViewPins { get; set; }
57 67
     }
58 68
 }

+ 4 - 1
MAXData/Models/VendorEvent.cs

@@ -13,7 +13,8 @@ namespace MAX.Models
13 13
             Logout = 4,
14 14
             DownloadVoucher = 5,
15 15
             PrintVoucher = 6,
16
-            ViewVoucherPIN = 7
16
+            ViewVoucherPIN = 7,
17
+            ExportVoucher = 8
17 18
         }
18 19
 
19 20
         public int Id { get; set; }
@@ -29,5 +30,7 @@ namespace MAX.Models
29 30
         public DateTimeOffset EventDate { get; set; }
30 31
 
31 32
         public VendorEventType EventType { get; set; }
33
+
34
+        public bool Retry { get; set; }
32 35
     }
33 36
 }