Просмотр исходного кода

Added 30s timer to repeatedly poll for unfinished batches
Tweaked Order Report print layout
Fixed Max value on numeric spinners on View PIN form to integer maximum
Added ability to search any batch ID from View PIN form

Brett Credo лет назад: 8
Родитель
Сommit
55679fd46e

+ 10 - 3
BulkPrinting/BulkPrinting/BatchForm.Designer.cs

29
         private void InitializeComponent()
29
         private void InitializeComponent()
30
         {
30
         {
31
             this.components = new System.ComponentModel.Container();
31
             this.components = new System.ComponentModel.Container();
32
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
32
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
33
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BatchForm));
33
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BatchForm));
34
             this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
34
             this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
35
             this.pnlSplitGrids = new System.Windows.Forms.Panel();
35
             this.pnlSplitGrids = new System.Windows.Forms.Panel();
53
             this.dgvBatches = new System.Windows.Forms.DataGridView();
53
             this.dgvBatches = new System.Windows.Forms.DataGridView();
54
             this.LogoutTimer = new System.Windows.Forms.Timer(this.components);
54
             this.LogoutTimer = new System.Windows.Forms.Timer(this.components);
55
             this.lblLoading = new System.Windows.Forms.Label();
55
             this.lblLoading = new System.Windows.Forms.Label();
56
+            this.ReSyncTimer = new System.Windows.Forms.Timer(this.components);
56
             this.pnlSplitGrids.SuspendLayout();
57
             this.pnlSplitGrids.SuspendLayout();
57
             this.grpFilter.SuspendLayout();
58
             this.grpFilter.SuspendLayout();
58
             ((System.ComponentModel.ISupportInitialize)(this.dgvBatches)).BeginInit();
59
             ((System.ComponentModel.ISupportInitialize)(this.dgvBatches)).BeginInit();
303
             this.dgvBatches.AllowUserToAddRows = false;
304
             this.dgvBatches.AllowUserToAddRows = false;
304
             this.dgvBatches.AllowUserToDeleteRows = false;
305
             this.dgvBatches.AllowUserToDeleteRows = false;
305
             this.dgvBatches.AllowUserToResizeRows = false;
306
             this.dgvBatches.AllowUserToResizeRows = false;
306
-            dataGridViewCellStyle1.BackColor = System.Drawing.Color.Azure;
307
-            this.dgvBatches.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
307
+            dataGridViewCellStyle2.BackColor = System.Drawing.Color.Azure;
308
+            this.dgvBatches.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2;
308
             this.dgvBatches.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
309
             this.dgvBatches.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
309
             | System.Windows.Forms.AnchorStyles.Left) 
310
             | System.Windows.Forms.AnchorStyles.Left) 
310
             | System.Windows.Forms.AnchorStyles.Right)));
311
             | System.Windows.Forms.AnchorStyles.Right)));
336
             this.lblLoading.TabIndex = 6;
337
             this.lblLoading.TabIndex = 6;
337
             this.lblLoading.Text = "Loading...";
338
             this.lblLoading.Text = "Loading...";
338
             // 
339
             // 
340
+            // ReSyncTimer
341
+            // 
342
+            this.ReSyncTimer.Interval = 30000;
343
+            this.ReSyncTimer.Tick += new System.EventHandler(this.ReSyncTimer_Tick);
344
+            // 
339
             // BatchForm
345
             // BatchForm
340
             // 
346
             // 
341
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
347
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
384
         private System.Windows.Forms.RadioButton rdoFilterReprinted;
390
         private System.Windows.Forms.RadioButton rdoFilterReprinted;
385
         private System.Windows.Forms.RadioButton rdoFilterUnprinted;
391
         private System.Windows.Forms.RadioButton rdoFilterUnprinted;
386
         private System.Windows.Forms.RadioButton rdoFilterPrinted;
392
         private System.Windows.Forms.RadioButton rdoFilterPrinted;
393
+        private System.Windows.Forms.Timer ReSyncTimer;
387
     }
394
     }
388
 }
395
 }
389
 
396
 

+ 17 - 1
BulkPrinting/BulkPrinting/BatchForm.cs

289
             }
289
             }
290
             if (Utility.CheckUserAccess(Utility.UserPermissions.BulkOrder)) { //Only check for undownloaded vouchers if the user is able to see them
290
             if (Utility.CheckUserAccess(Utility.UserPermissions.BulkOrder)) { //Only check for undownloaded vouchers if the user is able to see them
291
                 if ((string)dgvBatches.SelectedRows[0].Cells[dgvBatches.Columns["ReadyForDownload"].Index].Value == "No") {
291
                 if ((string)dgvBatches.SelectedRows[0].Cells[dgvBatches.Columns["ReadyForDownload"].Index].Value == "No") {
292
-                    MessageBox.Show("This batch is not ready to downloaded and cannot be printed.", "Cannot print batch", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
292
+                    MessageBox.Show("This batch is not fully downloaded and cannot be printed.\nPlease wait until \"Batch Ready For Download\" says Yes.\nThis may take several minutes depending on the size of\nthe order and available stock.", "Cannot print batch", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
293
                     return;
293
                     return;
294
                 }
294
                 }
295
             }
295
             }
580
                 e.Graphics.DrawImage(b.BackgroundImage, e.ClipRectangle.X, e.ClipRectangle.Y, e.ClipRectangle.Width, e.ClipRectangle.Height);
580
                 e.Graphics.DrawImage(b.BackgroundImage, e.ClipRectangle.X, e.ClipRectangle.Y, e.ClipRectangle.Width, e.ClipRectangle.Height);
581
             }
581
             }
582
         }
582
         }
583
+
584
+        private void ReSyncTimer_Tick(object sender, EventArgs e)
585
+        {
586
+            LoadingThread = new Thread(() =>
587
+            {
588
+                if (Globals.SessionMode == SessionModes.Online)
589
+                {
590
+                    Utility.SyncAllBatches();
591
+                    Invoke(new Action(() =>
592
+                    {
593
+                        PopulateGrid();
594
+                    }));
595
+                }
596
+            });
597
+            LoadingThread.Start();
598
+        }
583
     }
599
     }
584
 }
600
 }

+ 3 - 0
BulkPrinting/BulkPrinting/BatchForm.resx

123
   <metadata name="LogoutTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
123
   <metadata name="LogoutTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124
     <value>277, 17</value>
124
     <value>277, 17</value>
125
   </metadata>
125
   </metadata>
126
+  <metadata name="ReSyncTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
127
+    <value>398, 3</value>
128
+  </metadata>
126
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
129
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
127
     <value>25</value>
130
     <value>25</value>
128
   </metadata>
131
   </metadata>

+ 1 - 1
BulkPrinting/BulkPrinting/Printer.cs

247
             public static int OrderDate = 0;
247
             public static int OrderDate = 0;
248
             public static int OrderReference = 90;
248
             public static int OrderReference = 90;
249
             public static int User = 170;
249
             public static int User = 170;
250
-            public static int OrderItems = 270;
250
+            public static int OrderItems = 290;
251
             public static int QtyOrdered = 430;
251
             public static int QtyOrdered = 430;
252
             public static int QtyDelivered = 500;
252
             public static int QtyDelivered = 500;
253
             public static int Cost = 580;
253
             public static int Cost = 580;

+ 35 - 10
BulkPrinting/BulkPrinting/VoucherForm.Designer.cs

45
             this.numStartSeqNo = new System.Windows.Forms.NumericUpDown();
45
             this.numStartSeqNo = new System.Windows.Forms.NumericUpDown();
46
             this.numEndSeqNo = new System.Windows.Forms.NumericUpDown();
46
             this.numEndSeqNo = new System.Windows.Forms.NumericUpDown();
47
             this.btnSearch = new System.Windows.Forms.Button();
47
             this.btnSearch = new System.Windows.Forms.Button();
48
+            this.numBatchId = new System.Windows.Forms.NumericUpDown();
49
+            this.label2 = new System.Windows.Forms.Label();
48
             ((System.ComponentModel.ISupportInitialize)(this.dgvVouchers)).BeginInit();
50
             ((System.ComponentModel.ISupportInitialize)(this.dgvVouchers)).BeginInit();
49
             ((System.ComponentModel.ISupportInitialize)(this.numStartSeqNo)).BeginInit();
51
             ((System.ComponentModel.ISupportInitialize)(this.numStartSeqNo)).BeginInit();
50
             ((System.ComponentModel.ISupportInitialize)(this.numEndSeqNo)).BeginInit();
52
             ((System.ComponentModel.ISupportInitialize)(this.numEndSeqNo)).BeginInit();
53
+            ((System.ComponentModel.ISupportInitialize)(this.numBatchId)).BeginInit();
51
             this.SuspendLayout();
54
             this.SuspendLayout();
52
             // 
55
             // 
53
             // dgvVouchers
56
             // dgvVouchers
131
             // dtpStartDate
134
             // dtpStartDate
132
             // 
135
             // 
133
             this.dtpStartDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
136
             this.dtpStartDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
134
-            this.dtpStartDate.Location = new System.Drawing.Point(231, 40);
137
+            this.dtpStartDate.Location = new System.Drawing.Point(353, 39);
135
             this.dtpStartDate.Name = "dtpStartDate";
138
             this.dtpStartDate.Name = "dtpStartDate";
136
             this.dtpStartDate.Size = new System.Drawing.Size(100, 20);
139
             this.dtpStartDate.Size = new System.Drawing.Size(100, 20);
137
             this.dtpStartDate.TabIndex = 10;
140
             this.dtpStartDate.TabIndex = 10;
140
             // dtpEndDate
143
             // dtpEndDate
141
             // 
144
             // 
142
             this.dtpEndDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
145
             this.dtpEndDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
143
-            this.dtpEndDate.Location = new System.Drawing.Point(388, 40);
146
+            this.dtpEndDate.Location = new System.Drawing.Point(510, 39);
144
             this.dtpEndDate.Name = "dtpEndDate";
147
             this.dtpEndDate.Name = "dtpEndDate";
145
             this.dtpEndDate.Size = new System.Drawing.Size(100, 20);
148
             this.dtpEndDate.Size = new System.Drawing.Size(100, 20);
146
             this.dtpEndDate.TabIndex = 10;
149
             this.dtpEndDate.TabIndex = 10;
148
             // 
151
             // 
149
             // txtSerial
152
             // txtSerial
150
             // 
153
             // 
151
-            this.txtSerial.Location = new System.Drawing.Point(198, 86);
154
+            this.txtSerial.Location = new System.Drawing.Point(320, 85);
152
             this.txtSerial.Name = "txtSerial";
155
             this.txtSerial.Name = "txtSerial";
153
             this.txtSerial.Size = new System.Drawing.Size(290, 20);
156
             this.txtSerial.Size = new System.Drawing.Size(290, 20);
154
             this.txtSerial.TabIndex = 11;
157
             this.txtSerial.TabIndex = 11;
157
             // 
160
             // 
158
             this.lblBatch1.AutoSize = true;
161
             this.lblBatch1.AutoSize = true;
159
             this.lblBatch1.ForeColor = System.Drawing.Color.White;
162
             this.lblBatch1.ForeColor = System.Drawing.Color.White;
160
-            this.lblBatch1.Location = new System.Drawing.Point(195, 65);
163
+            this.lblBatch1.Location = new System.Drawing.Point(317, 64);
161
             this.lblBatch1.Name = "lblBatch1";
164
             this.lblBatch1.Name = "lblBatch1";
162
             this.lblBatch1.Size = new System.Drawing.Size(30, 13);
165
             this.lblBatch1.Size = new System.Drawing.Size(30, 13);
163
             this.lblBatch1.TabIndex = 12;
166
             this.lblBatch1.TabIndex = 12;
168
             // 
171
             // 
169
             this.label3.AutoSize = true;
172
             this.label3.AutoSize = true;
170
             this.label3.ForeColor = System.Drawing.Color.White;
173
             this.label3.ForeColor = System.Drawing.Color.White;
171
-            this.label3.Location = new System.Drawing.Point(195, 42);
174
+            this.label3.Location = new System.Drawing.Point(317, 41);
172
             this.label3.Name = "label3";
175
             this.label3.Name = "label3";
173
             this.label3.Size = new System.Drawing.Size(30, 13);
176
             this.label3.Size = new System.Drawing.Size(30, 13);
174
             this.label3.TabIndex = 12;
177
             this.label3.TabIndex = 12;
179
             // 
182
             // 
180
             this.label4.AutoSize = true;
183
             this.label4.AutoSize = true;
181
             this.label4.ForeColor = System.Drawing.Color.White;
184
             this.label4.ForeColor = System.Drawing.Color.White;
182
-            this.label4.Location = new System.Drawing.Point(362, 42);
185
+            this.label4.Location = new System.Drawing.Point(484, 41);
183
             this.label4.Name = "label4";
186
             this.label4.Name = "label4";
184
             this.label4.Size = new System.Drawing.Size(20, 13);
187
             this.label4.Size = new System.Drawing.Size(20, 13);
185
             this.label4.TabIndex = 12;
188
             this.label4.TabIndex = 12;
190
             // 
193
             // 
191
             this.lblBatch2.AutoSize = true;
194
             this.lblBatch2.AutoSize = true;
192
             this.lblBatch2.ForeColor = System.Drawing.Color.White;
195
             this.lblBatch2.ForeColor = System.Drawing.Color.White;
193
-            this.lblBatch2.Location = new System.Drawing.Point(362, 65);
196
+            this.lblBatch2.Location = new System.Drawing.Point(484, 64);
194
             this.lblBatch2.Name = "lblBatch2";
197
             this.lblBatch2.Name = "lblBatch2";
195
             this.lblBatch2.Size = new System.Drawing.Size(20, 13);
198
             this.lblBatch2.Size = new System.Drawing.Size(20, 13);
196
             this.lblBatch2.TabIndex = 12;
199
             this.lblBatch2.TabIndex = 12;
199
             // 
202
             // 
200
             // numStartSeqNo
203
             // numStartSeqNo
201
             // 
204
             // 
202
-            this.numStartSeqNo.Location = new System.Drawing.Point(231, 63);
205
+            this.numStartSeqNo.Location = new System.Drawing.Point(353, 62);
203
             this.numStartSeqNo.Name = "numStartSeqNo";
206
             this.numStartSeqNo.Name = "numStartSeqNo";
204
             this.numStartSeqNo.Size = new System.Drawing.Size(100, 20);
207
             this.numStartSeqNo.Size = new System.Drawing.Size(100, 20);
205
             this.numStartSeqNo.TabIndex = 14;
208
             this.numStartSeqNo.TabIndex = 14;
207
             // 
210
             // 
208
             // numEndSeqNo
211
             // numEndSeqNo
209
             // 
212
             // 
210
-            this.numEndSeqNo.Location = new System.Drawing.Point(388, 63);
213
+            this.numEndSeqNo.Location = new System.Drawing.Point(510, 62);
211
             this.numEndSeqNo.Name = "numEndSeqNo";
214
             this.numEndSeqNo.Name = "numEndSeqNo";
212
             this.numEndSeqNo.Size = new System.Drawing.Size(100, 20);
215
             this.numEndSeqNo.Size = new System.Drawing.Size(100, 20);
213
             this.numEndSeqNo.TabIndex = 14;
216
             this.numEndSeqNo.TabIndex = 14;
218
             this.btnSearch.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(132)))), ((int)(((byte)(186)))));
221
             this.btnSearch.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(132)))), ((int)(((byte)(186)))));
219
             this.btnSearch.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSearch.BackgroundImage")));
222
             this.btnSearch.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSearch.BackgroundImage")));
220
             this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
223
             this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
221
-            this.btnSearch.Location = new System.Drawing.Point(494, 3);
224
+            this.btnSearch.Location = new System.Drawing.Point(616, 2);
222
             this.btnSearch.Name = "btnSearch";
225
             this.btnSearch.Name = "btnSearch";
223
             this.btnSearch.Size = new System.Drawing.Size(100, 100);
226
             this.btnSearch.Size = new System.Drawing.Size(100, 100);
224
             this.btnSearch.TabIndex = 13;
227
             this.btnSearch.TabIndex = 13;
225
             this.btnSearch.UseVisualStyleBackColor = false;
228
             this.btnSearch.UseVisualStyleBackColor = false;
226
             this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
229
             this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
227
             // 
230
             // 
231
+            // numBatchId
232
+            // 
233
+            this.numBatchId.Location = new System.Drawing.Point(242, 62);
234
+            this.numBatchId.Name = "numBatchId";
235
+            this.numBatchId.Size = new System.Drawing.Size(69, 20);
236
+            this.numBatchId.TabIndex = 15;
237
+            // 
238
+            // label2
239
+            // 
240
+            this.label2.AutoSize = true;
241
+            this.label2.ForeColor = System.Drawing.Color.White;
242
+            this.label2.Location = new System.Drawing.Point(187, 65);
243
+            this.label2.Name = "label2";
244
+            this.label2.Size = new System.Drawing.Size(49, 13);
245
+            this.label2.TabIndex = 16;
246
+            this.label2.Text = "Batch ID";
247
+            // 
228
             // VoucherForm
248
             // VoucherForm
229
             // 
249
             // 
230
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
250
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
231
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
251
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
232
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(63)))), ((int)(((byte)(145)))));
252
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(63)))), ((int)(((byte)(145)))));
233
             this.ClientSize = new System.Drawing.Size(728, 554);
253
             this.ClientSize = new System.Drawing.Size(728, 554);
254
+            this.Controls.Add(this.label2);
255
+            this.Controls.Add(this.numBatchId);
234
             this.Controls.Add(this.numEndSeqNo);
256
             this.Controls.Add(this.numEndSeqNo);
235
             this.Controls.Add(this.numStartSeqNo);
257
             this.Controls.Add(this.numStartSeqNo);
236
             this.Controls.Add(this.btnSearch);
258
             this.Controls.Add(this.btnSearch);
255
             ((System.ComponentModel.ISupportInitialize)(this.dgvVouchers)).EndInit();
277
             ((System.ComponentModel.ISupportInitialize)(this.dgvVouchers)).EndInit();
256
             ((System.ComponentModel.ISupportInitialize)(this.numStartSeqNo)).EndInit();
278
             ((System.ComponentModel.ISupportInitialize)(this.numStartSeqNo)).EndInit();
257
             ((System.ComponentModel.ISupportInitialize)(this.numEndSeqNo)).EndInit();
279
             ((System.ComponentModel.ISupportInitialize)(this.numEndSeqNo)).EndInit();
280
+            ((System.ComponentModel.ISupportInitialize)(this.numBatchId)).EndInit();
258
             this.ResumeLayout(false);
281
             this.ResumeLayout(false);
259
             this.PerformLayout();
282
             this.PerformLayout();
260
 
283
 
278
         private System.Windows.Forms.Button btnSearch;
301
         private System.Windows.Forms.Button btnSearch;
279
         private System.Windows.Forms.NumericUpDown numStartSeqNo;
302
         private System.Windows.Forms.NumericUpDown numStartSeqNo;
280
         private System.Windows.Forms.NumericUpDown numEndSeqNo;
303
         private System.Windows.Forms.NumericUpDown numEndSeqNo;
304
+        private System.Windows.Forms.NumericUpDown numBatchId;
305
+        private System.Windows.Forms.Label label2;
281
     }
306
     }
282
 }
307
 }

+ 5 - 2
BulkPrinting/BulkPrinting/VoucherForm.cs

24
 
24
 
25
         private void VoucherForm_Load(object sender, EventArgs e)
25
         private void VoucherForm_Load(object sender, EventArgs e)
26
         {
26
         {
27
+            numBatchId.Maximum = int.MaxValue;
28
+            numStartSeqNo.Maximum = int.MaxValue;
29
+            numEndSeqNo.Maximum = int.MaxValue;
27
             if (BatchID > 0)
30
             if (BatchID > 0)
28
             {
31
             {
29
                 rdoVoucherRange.Show();
32
                 rdoVoucherRange.Show();
31
                 lblBatch2.Show();
34
                 lblBatch2.Show();
32
                 numStartSeqNo.Show();
35
                 numStartSeqNo.Show();
33
                 numEndSeqNo.Show();
36
                 numEndSeqNo.Show();
34
-                rdoVoucherRange.Text = "Vouchers in Selected Batch(" + BatchID.ToString() + "):";
37
+                numBatchId.Value = BatchID;
35
             }
38
             }
36
             else {
39
             else {
37
                 rdoVoucherRange.Hide();
40
                 rdoVoucherRange.Hide();
62
             else if (rdoVoucherRange.Checked) {
65
             else if (rdoVoucherRange.Checked) {
63
                 Sql = "SELECT BatchId, Serial, SequenceNumber, ExpiryDate, EncryptedPIN FROM Voucher WHERE BatchId = @batchid AND SequenceNumber BETWEEN @minseqno AND @maxseqno";
66
                 Sql = "SELECT BatchId, Serial, SequenceNumber, ExpiryDate, EncryptedPIN FROM Voucher WHERE BatchId = @batchid AND SequenceNumber BETWEEN @minseqno AND @maxseqno";
64
                 Command = new SQLiteCommand(Sql, Globals.DBConnection);
67
                 Command = new SQLiteCommand(Sql, Globals.DBConnection);
65
-                Command.Parameters.Add(new SQLiteParameter("@batchid", BatchID));
68
+                Command.Parameters.Add(new SQLiteParameter("@batchid", numBatchId.Value));
66
                 Command.Parameters.Add(new SQLiteParameter("@minseqno", numStartSeqNo.Value));
69
                 Command.Parameters.Add(new SQLiteParameter("@minseqno", numStartSeqNo.Value));
67
                 Command.Parameters.Add(new SQLiteParameter("@maxseqno", numEndSeqNo.Value));
70
                 Command.Parameters.Add(new SQLiteParameter("@maxseqno", numEndSeqNo.Value));
68
             }
71
             }