Parcourir la Source

Fix reprint warning message.
Allow reprint dialog to auto-size.
Correctly calculate IsReprint when printing vouchers, which was broken by removing a seemingly unnecessary join that wasn't actually unused.
Bump version number.

Brett Credo il y a 8 ans
Parent
révision
e8db99855c

+ 1 - 8
BulkPrinting/BulkPrinting/BatchForm.cs

@@ -19,13 +19,6 @@ namespace BulkPrinting
19 19
             InitializeComponent();
20 20
         }
21 21
 
22
-        private class BatchEvent
23
-        {
24
-            public int PrintCount=0;
25
-            public int ReprintCount=0;
26
-            public int ExportCount=0;
27
-        }
28
-
29 22
         public void PopulateGrid()
30 23
         {
31 24
             bool CanOrder = Utility.CheckUserAccess(Utility.UserPermissions.BulkOrder);
@@ -481,7 +474,7 @@ namespace BulkPrinting
481 474
                 MessageBox.Show("Please choose a batch to reprint.", "No batch selected", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
482 475
                 return;
483 476
             }
484
-            MessageBox.Show("Please be aware that this function is used for exporting vouchers that have already been exported previously. Use this function with caution.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Stop);
477
+            MessageBox.Show("Please be aware that this function is used for reprinting vouchers that have already been printed previously. Use this function with caution.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Stop);
485 478
             int BatchID = (int)dgvBatches.SelectedRows[0].Cells[dgvBatches.Columns["Id"].Index].Value;
486 479
             if ((string)dgvBatches.SelectedRows[0].Cells[dgvBatches.Columns["Exported"].Index].Value != "")
487 480
             {

+ 1 - 1
BulkPrinting/BulkPrinting/Properties/AssemblyInfo.cs

@@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
33 33
 // by using the '*' as shown below:
34 34
 // [assembly: AssemblyVersion("1.0.*")]
35 35
 [assembly: AssemblyVersion("1.0.*")]
36
-[assembly: AssemblyFileVersion("1.3")]
36
+[assembly: AssemblyFileVersion("1.4")]

+ 89 - 58
BulkPrinting/BulkPrinting/ReprintForm.Designer.cs

@@ -65,9 +65,10 @@
65 65
             // 
66 66
             this.lblPrintDescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
67 67
             this.lblPrintDescription.ForeColor = System.Drawing.Color.White;
68
-            this.lblPrintDescription.Location = new System.Drawing.Point(13, 13);
68
+            this.lblPrintDescription.Location = new System.Drawing.Point(17, 16);
69
+            this.lblPrintDescription.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
69 70
             this.lblPrintDescription.Name = "lblPrintDescription";
70
-            this.lblPrintDescription.Size = new System.Drawing.Size(259, 23);
71
+            this.lblPrintDescription.Size = new System.Drawing.Size(345, 28);
71 72
             this.lblPrintDescription.TabIndex = 1;
72 73
             this.lblPrintDescription.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
73 74
             // 
@@ -75,18 +76,20 @@
75 76
             // 
76 77
             this.label1.AutoSize = true;
77 78
             this.label1.ForeColor = System.Drawing.Color.White;
78
-            this.label1.Location = new System.Drawing.Point(88, 96);
79
+            this.label1.Location = new System.Drawing.Point(117, 118);
80
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
79 81
             this.label1.Name = "label1";
80
-            this.label1.Size = new System.Drawing.Size(93, 13);
82
+            this.label1.Size = new System.Drawing.Size(123, 17);
81 83
             this.label1.TabIndex = 2;
82 84
             this.label1.Text = "Batch Order Date:";
83 85
             // 
84 86
             // label3
85 87
             // 
86 88
             this.label3.AutoSize = true;
87
-            this.label3.Location = new System.Drawing.Point(57, 109);
89
+            this.label3.Location = new System.Drawing.Point(76, 134);
90
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
88 91
             this.label3.Name = "label3";
89
-            this.label3.Size = new System.Drawing.Size(124, 13);
92
+            this.label3.Size = new System.Drawing.Size(163, 17);
90 93
             this.label3.TabIndex = 4;
91 94
             this.label3.Text = "Total Vouchers in Batch:";
92 95
             // 
@@ -94,9 +97,10 @@
94 97
             // 
95 98
             this.label4.AutoSize = true;
96 99
             this.label4.ForeColor = System.Drawing.Color.White;
97
-            this.label4.Location = new System.Drawing.Point(117, 124);
100
+            this.label4.Location = new System.Drawing.Point(156, 153);
101
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
98 102
             this.label4.Name = "label4";
99
-            this.label4.Size = new System.Drawing.Size(64, 13);
103
+            this.label4.Size = new System.Drawing.Size(83, 17);
100 104
             this.label4.TabIndex = 5;
101 105
             this.label4.Text = "Face Value:";
102 106
             // 
@@ -104,9 +108,10 @@
104 108
             // 
105 109
             this.label5.AutoSize = true;
106 110
             this.label5.ForeColor = System.Drawing.Color.White;
107
-            this.label5.Location = new System.Drawing.Point(104, 139);
111
+            this.label5.Location = new System.Drawing.Point(139, 171);
112
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
108 113
             this.label5.Name = "label5";
109
-            this.label5.Size = new System.Drawing.Size(77, 13);
114
+            this.label5.Size = new System.Drawing.Size(101, 17);
110 115
             this.label5.TabIndex = 6;
111 116
             this.label5.Text = "Voucher Type:";
112 117
             // 
@@ -114,45 +119,50 @@
114 119
             // 
115 120
             this.lblBatchOrderDate.AutoSize = true;
116 121
             this.lblBatchOrderDate.ForeColor = System.Drawing.Color.White;
117
-            this.lblBatchOrderDate.Location = new System.Drawing.Point(187, 96);
122
+            this.lblBatchOrderDate.Location = new System.Drawing.Point(249, 118);
123
+            this.lblBatchOrderDate.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
118 124
             this.lblBatchOrderDate.Name = "lblBatchOrderDate";
119
-            this.lblBatchOrderDate.Size = new System.Drawing.Size(0, 13);
125
+            this.lblBatchOrderDate.Size = new System.Drawing.Size(0, 17);
120 126
             this.lblBatchOrderDate.TabIndex = 7;
121 127
             // 
122 128
             // lblTotalVouchers
123 129
             // 
124 130
             this.lblTotalVouchers.AutoSize = true;
125 131
             this.lblTotalVouchers.ForeColor = System.Drawing.Color.White;
126
-            this.lblTotalVouchers.Location = new System.Drawing.Point(187, 109);
132
+            this.lblTotalVouchers.Location = new System.Drawing.Point(249, 134);
133
+            this.lblTotalVouchers.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
127 134
             this.lblTotalVouchers.Name = "lblTotalVouchers";
128
-            this.lblTotalVouchers.Size = new System.Drawing.Size(0, 13);
135
+            this.lblTotalVouchers.Size = new System.Drawing.Size(0, 17);
129 136
             this.lblTotalVouchers.TabIndex = 7;
130 137
             // 
131 138
             // lblFaceValue
132 139
             // 
133 140
             this.lblFaceValue.AutoSize = true;
134 141
             this.lblFaceValue.ForeColor = System.Drawing.Color.White;
135
-            this.lblFaceValue.Location = new System.Drawing.Point(187, 124);
142
+            this.lblFaceValue.Location = new System.Drawing.Point(249, 153);
143
+            this.lblFaceValue.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
136 144
             this.lblFaceValue.Name = "lblFaceValue";
137
-            this.lblFaceValue.Size = new System.Drawing.Size(0, 13);
145
+            this.lblFaceValue.Size = new System.Drawing.Size(0, 17);
138 146
             this.lblFaceValue.TabIndex = 7;
139 147
             // 
140 148
             // lblVoucherType
141 149
             // 
142 150
             this.lblVoucherType.AutoSize = true;
143 151
             this.lblVoucherType.ForeColor = System.Drawing.Color.White;
144
-            this.lblVoucherType.Location = new System.Drawing.Point(187, 139);
152
+            this.lblVoucherType.Location = new System.Drawing.Point(249, 171);
153
+            this.lblVoucherType.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
145 154
             this.lblVoucherType.Name = "lblVoucherType";
146
-            this.lblVoucherType.Size = new System.Drawing.Size(0, 13);
155
+            this.lblVoucherType.Size = new System.Drawing.Size(0, 17);
147 156
             this.lblVoucherType.TabIndex = 7;
148 157
             // 
149 158
             // label6
150 159
             // 
151 160
             this.label6.AutoSize = true;
152 161
             this.label6.ForeColor = System.Drawing.Color.White;
153
-            this.label6.Location = new System.Drawing.Point(103, 81);
162
+            this.label6.Location = new System.Drawing.Point(137, 100);
163
+            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
154 164
             this.label6.Name = "label6";
155
-            this.label6.Size = new System.Drawing.Size(78, 13);
165
+            this.label6.Size = new System.Drawing.Size(102, 17);
156 166
             this.label6.TabIndex = 10;
157 167
             this.label6.Text = "Batch Number:";
158 168
             // 
@@ -160,9 +170,10 @@
160 170
             // 
161 171
             this.lblBatchNumber.AutoSize = true;
162 172
             this.lblBatchNumber.ForeColor = System.Drawing.Color.White;
163
-            this.lblBatchNumber.Location = new System.Drawing.Point(187, 81);
173
+            this.lblBatchNumber.Location = new System.Drawing.Point(249, 100);
174
+            this.lblBatchNumber.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
164 175
             this.lblBatchNumber.Name = "lblBatchNumber";
165
-            this.lblBatchNumber.Size = new System.Drawing.Size(0, 13);
176
+            this.lblBatchNumber.Size = new System.Drawing.Size(0, 17);
166 177
             this.lblBatchNumber.TabIndex = 11;
167 178
             // 
168 179
             // btnCancel
@@ -171,9 +182,10 @@
171 182
             this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.Black;
172 183
             this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
173 184
             this.btnCancel.ForeColor = System.Drawing.Color.White;
174
-            this.btnCancel.Location = new System.Drawing.Point(145, 312);
185
+            this.btnCancel.Location = new System.Drawing.Point(193, 384);
186
+            this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
175 187
             this.btnCancel.Name = "btnCancel";
176
-            this.btnCancel.Size = new System.Drawing.Size(75, 23);
188
+            this.btnCancel.Size = new System.Drawing.Size(100, 28);
177 189
             this.btnCancel.TabIndex = 12;
178 190
             this.btnCancel.Text = "Cancel";
179 191
             this.btnCancel.UseVisualStyleBackColor = false;
@@ -185,9 +197,10 @@
185 197
             this.btnNext.FlatAppearance.BorderColor = System.Drawing.Color.Black;
186 198
             this.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
187 199
             this.btnNext.ForeColor = System.Drawing.Color.White;
188
-            this.btnNext.Location = new System.Drawing.Point(226, 312);
200
+            this.btnNext.Location = new System.Drawing.Point(301, 384);
201
+            this.btnNext.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
189 202
             this.btnNext.Name = "btnNext";
190
-            this.btnNext.Size = new System.Drawing.Size(75, 23);
203
+            this.btnNext.Size = new System.Drawing.Size(100, 28);
191 204
             this.btnNext.TabIndex = 13;
192 205
             this.btnNext.Text = "Next";
193 206
             this.btnNext.UseVisualStyleBackColor = false;
@@ -197,33 +210,37 @@
197 210
             // 
198 211
             this.lblFirstSeqNum.AutoSize = true;
199 212
             this.lblFirstSeqNum.ForeColor = System.Drawing.Color.White;
200
-            this.lblFirstSeqNum.Location = new System.Drawing.Point(42, 229);
213
+            this.lblFirstSeqNum.Location = new System.Drawing.Point(56, 282);
214
+            this.lblFirstSeqNum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
201 215
             this.lblFirstSeqNum.Name = "lblFirstSeqNum";
202
-            this.lblFirstSeqNum.Size = new System.Drawing.Size(158, 13);
216
+            this.lblFirstSeqNum.Size = new System.Drawing.Size(208, 17);
203 217
             this.lblFirstSeqNum.TabIndex = 17;
204 218
             this.lblFirstSeqNum.Text = "To Voucher Sequence Number:";
205 219
             // 
206 220
             // numLastSeqNum
207 221
             // 
208
-            this.numLastSeqNum.Location = new System.Drawing.Point(206, 227);
222
+            this.numLastSeqNum.Location = new System.Drawing.Point(275, 279);
223
+            this.numLastSeqNum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
209 224
             this.numLastSeqNum.Name = "numLastSeqNum";
210
-            this.numLastSeqNum.Size = new System.Drawing.Size(95, 20);
225
+            this.numLastSeqNum.Size = new System.Drawing.Size(127, 22);
211 226
             this.numLastSeqNum.TabIndex = 18;
212 227
             // 
213 228
             // numFirstSeqNum
214 229
             // 
215
-            this.numFirstSeqNum.Location = new System.Drawing.Point(206, 204);
230
+            this.numFirstSeqNum.Location = new System.Drawing.Point(275, 251);
231
+            this.numFirstSeqNum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
216 232
             this.numFirstSeqNum.Name = "numFirstSeqNum";
217
-            this.numFirstSeqNum.Size = new System.Drawing.Size(95, 20);
233
+            this.numFirstSeqNum.Size = new System.Drawing.Size(127, 22);
218 234
             this.numFirstSeqNum.TabIndex = 18;
219 235
             // 
220 236
             // lblLastSeqNum
221 237
             // 
222 238
             this.lblLastSeqNum.AutoSize = true;
223 239
             this.lblLastSeqNum.ForeColor = System.Drawing.Color.White;
224
-            this.lblLastSeqNum.Location = new System.Drawing.Point(33, 206);
240
+            this.lblLastSeqNum.Location = new System.Drawing.Point(44, 254);
241
+            this.lblLastSeqNum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
225 242
             this.lblLastSeqNum.Name = "lblLastSeqNum";
226
-            this.lblLastSeqNum.Size = new System.Drawing.Size(168, 13);
243
+            this.lblLastSeqNum.Size = new System.Drawing.Size(223, 17);
227 244
             this.lblLastSeqNum.TabIndex = 17;
228 245
             this.lblLastSeqNum.Text = "From Voucher Sequence Number:";
229 246
             // 
@@ -231,9 +248,10 @@
231 248
             // 
232 249
             this.label7.AutoSize = true;
233 250
             this.label7.ForeColor = System.Drawing.Color.White;
234
-            this.label7.Location = new System.Drawing.Point(131, 154);
251
+            this.label7.Location = new System.Drawing.Point(175, 190);
252
+            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
235 253
             this.label7.Name = "label7";
236
-            this.label7.Size = new System.Drawing.Size(50, 13);
254
+            this.label7.Size = new System.Drawing.Size(63, 17);
237 255
             this.label7.TabIndex = 6;
238 256
             this.label7.Text = "Network:";
239 257
             // 
@@ -241,18 +259,20 @@
241 259
             // 
242 260
             this.lblNetwork.AutoSize = true;
243 261
             this.lblNetwork.ForeColor = System.Drawing.Color.White;
244
-            this.lblNetwork.Location = new System.Drawing.Point(187, 154);
262
+            this.lblNetwork.Location = new System.Drawing.Point(249, 190);
263
+            this.lblNetwork.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
245 264
             this.lblNetwork.Name = "lblNetwork";
246
-            this.lblNetwork.Size = new System.Drawing.Size(0, 13);
265
+            this.lblNetwork.Size = new System.Drawing.Size(0, 17);
247 266
             this.lblNetwork.TabIndex = 7;
248 267
             // 
249 268
             // label8
250 269
             // 
251 270
             this.label8.AutoSize = true;
252 271
             this.label8.ForeColor = System.Drawing.Color.White;
253
-            this.label8.Location = new System.Drawing.Point(12, 13);
272
+            this.label8.Location = new System.Drawing.Point(16, 16);
273
+            this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
254 274
             this.label8.Name = "label8";
255
-            this.label8.Size = new System.Drawing.Size(291, 39);
275
+            this.label8.Size = new System.Drawing.Size(390, 51);
256 276
             this.label8.TabIndex = 20;
257 277
             this.label8.Text = "Reprinting is only available for previously printed vouchers. \r\nSelect either a r" +
258 278
     "ange of vouchers from the currently selected\r\nbatch, or enter a single voucher s" +
@@ -263,9 +283,10 @@
263 283
             this.rdoRange.AutoSize = true;
264 284
             this.rdoRange.Checked = true;
265 285
             this.rdoRange.ForeColor = System.Drawing.Color.White;
266
-            this.rdoRange.Location = new System.Drawing.Point(30, 55);
286
+            this.rdoRange.Location = new System.Drawing.Point(40, 68);
287
+            this.rdoRange.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
267 288
             this.rdoRange.Name = "rdoRange";
268
-            this.rdoRange.Size = new System.Drawing.Size(175, 17);
289
+            this.rdoRange.Size = new System.Drawing.Size(231, 21);
269 290
             this.rdoRange.TabIndex = 21;
270 291
             this.rdoRange.TabStop = true;
271 292
             this.rdoRange.Text = "Choose a range from this batch:";
@@ -275,9 +296,10 @@
275 296
             // 
276 297
             this.rdoSerial.AutoSize = true;
277 298
             this.rdoSerial.ForeColor = System.Drawing.Color.White;
278
-            this.rdoSerial.Location = new System.Drawing.Point(30, 253);
299
+            this.rdoSerial.Location = new System.Drawing.Point(40, 311);
300
+            this.rdoSerial.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
279 301
             this.rdoSerial.Name = "rdoSerial";
280
-            this.rdoSerial.Size = new System.Drawing.Size(247, 17);
302
+            this.rdoSerial.Size = new System.Drawing.Size(328, 21);
281 303
             this.rdoSerial.TabIndex = 21;
282 304
             this.rdoSerial.Text = "Choose an individual voucher by serial number:";
283 305
             this.rdoSerial.UseVisualStyleBackColor = true;
@@ -286,17 +308,19 @@
286 308
             // 
287 309
             this.label9.AutoSize = true;
288 310
             this.label9.ForeColor = System.Drawing.Color.White;
289
-            this.label9.Location = new System.Drawing.Point(73, 279);
311
+            this.label9.Location = new System.Drawing.Point(97, 343);
312
+            this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
290 313
             this.label9.Name = "label9";
291
-            this.label9.Size = new System.Drawing.Size(39, 13);
314
+            this.label9.Size = new System.Drawing.Size(52, 17);
292 315
             this.label9.TabIndex = 22;
293 316
             this.label9.Text = "Serial: ";
294 317
             // 
295 318
             // txtSerialNum
296 319
             // 
297
-            this.txtSerialNum.Location = new System.Drawing.Point(118, 276);
320
+            this.txtSerialNum.Location = new System.Drawing.Point(157, 340);
321
+            this.txtSerialNum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
298 322
             this.txtSerialNum.Name = "txtSerialNum";
299
-            this.txtSerialNum.Size = new System.Drawing.Size(183, 20);
323
+            this.txtSerialNum.Size = new System.Drawing.Size(243, 22);
300 324
             this.txtSerialNum.TabIndex = 23;
301 325
             this.txtSerialNum.TextChanged += new System.EventHandler(this.txtSerialNum_TextChanged);
302 326
             // 
@@ -304,9 +328,10 @@
304 328
             // 
305 329
             this.label10.AutoSize = true;
306 330
             this.label10.ForeColor = System.Drawing.Color.White;
307
-            this.label10.Location = new System.Drawing.Point(113, 167);
331
+            this.label10.Location = new System.Drawing.Point(151, 206);
332
+            this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
308 333
             this.label10.Name = "label10";
309
-            this.label10.Size = new System.Drawing.Size(67, 13);
334
+            this.label10.Size = new System.Drawing.Size(88, 17);
310 335
             this.label10.TabIndex = 6;
311 336
             this.label10.Text = "Range Start:";
312 337
             // 
@@ -314,9 +339,10 @@
314 339
             // 
315 340
             this.label11.AutoSize = true;
316 341
             this.label11.ForeColor = System.Drawing.Color.White;
317
-            this.label11.Location = new System.Drawing.Point(116, 180);
342
+            this.label11.Location = new System.Drawing.Point(155, 222);
343
+            this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
318 344
             this.label11.Name = "label11";
319
-            this.label11.Size = new System.Drawing.Size(64, 13);
345
+            this.label11.Size = new System.Drawing.Size(83, 17);
320 346
             this.label11.TabIndex = 6;
321 347
             this.label11.Text = "Range End:";
322 348
             // 
@@ -324,26 +350,30 @@
324 350
             // 
325 351
             this.lblMinSeqNo.AutoSize = true;
326 352
             this.lblMinSeqNo.ForeColor = System.Drawing.Color.White;
327
-            this.lblMinSeqNo.Location = new System.Drawing.Point(186, 167);
353
+            this.lblMinSeqNo.Location = new System.Drawing.Point(248, 206);
354
+            this.lblMinSeqNo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
328 355
             this.lblMinSeqNo.Name = "lblMinSeqNo";
329
-            this.lblMinSeqNo.Size = new System.Drawing.Size(0, 13);
356
+            this.lblMinSeqNo.Size = new System.Drawing.Size(0, 17);
330 357
             this.lblMinSeqNo.TabIndex = 7;
331 358
             // 
332 359
             // lblMaxSeqNo
333 360
             // 
334 361
             this.lblMaxSeqNo.AutoSize = true;
335 362
             this.lblMaxSeqNo.ForeColor = System.Drawing.Color.White;
336
-            this.lblMaxSeqNo.Location = new System.Drawing.Point(186, 180);
363
+            this.lblMaxSeqNo.Location = new System.Drawing.Point(248, 222);
364
+            this.lblMaxSeqNo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
337 365
             this.lblMaxSeqNo.Name = "lblMaxSeqNo";
338
-            this.lblMaxSeqNo.Size = new System.Drawing.Size(0, 13);
366
+            this.lblMaxSeqNo.Size = new System.Drawing.Size(0, 17);
339 367
             this.lblMaxSeqNo.TabIndex = 7;
340 368
             // 
341 369
             // ReprintForm
342 370
             // 
343
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
371
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
344 372
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
373
+            this.AutoSize = true;
374
+            this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
345 375
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(63)))), ((int)(((byte)(145)))));
346
-            this.ClientSize = new System.Drawing.Size(313, 347);
376
+            this.ClientSize = new System.Drawing.Size(424, 428);
347 377
             this.ControlBox = false;
348 378
             this.Controls.Add(this.txtSerialNum);
349 379
             this.Controls.Add(this.label9);
@@ -376,6 +406,7 @@
376 406
             this.ForeColor = System.Drawing.Color.White;
377 407
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
378 408
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
409
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
379 410
             this.MaximizeBox = false;
380 411
             this.MinimizeBox = false;
381 412
             this.Name = "ReprintForm";

+ 2 - 2
BulkPrinting/BulkPrinting/Utility.cs

@@ -420,7 +420,7 @@ namespace BulkPrinting
420 420
             List<EventLog> LogEvents = new List<EventLog>();
421 421
 
422 422
             IList<PrintVoucher> VoucherRow = new List<PrintVoucher>();
423
-            using (var Command = db.CreateCommand("SELECT DISTINCT v.Id,v.SequenceNumber,v.Serial,v.EncryptedPIN,v.BatchId,b.ProductDescription From Voucher v LEFT JOIN Batch b on v.BatchId = b.Id WHERE v.BatchId=@batch_id AND v.SequenceNumber BETWEEN @seqstartno AND @seqendno ORDER BY v.BatchId, v.SequenceNumber",
423
+            using (var Command = db.CreateCommand("SELECT DISTINCT v.Id,v.SequenceNumber,v.Serial,v.EncryptedPIN,v.BatchId,v.PrintCount,b.ProductDescription From Voucher v LEFT JOIN Batch b on v.BatchId = b.Id WHERE v.BatchId=@batch_id AND v.SequenceNumber BETWEEN @seqstartno AND @seqendno ORDER BY v.BatchId, v.SequenceNumber",
424 424
                 new SQLiteParameter("@batch_id", BatchId),
425 425
                 new SQLiteParameter("@seqstartno", StartSeqNo),
426 426
                 new SQLiteParameter("@seqendno", EndSeqNo)))
@@ -438,7 +438,7 @@ namespace BulkPrinting
438 438
                         IndividualVoucher.Serial = (string)read["Serial"];
439 439
                         IndividualVoucher.VoucherId = (int)read["Id"];
440 440
                         IndividualVoucher.Description = (string)read["ProductDescription"];
441
-                        IsReprint = !read.IsDBNull(6);
441
+                        IsReprint = (int)read["PrintCount"] > 0;
442 442
 
443 443
                         if (IsReprint)
444 444
                         {