-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmRecruitBrowser.vb
635 lines (610 loc) · 26.5 KB
/
frmRecruitBrowser.vb
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
Public Class frmRecruitBrowser
Inherits System.Windows.Forms.Form
Implements DataboundForm
Private MainForm As frmTracker
Friend WithEvents tbcPersonType As System.Windows.Forms.DataGridTextBoxColumn
Private NavCount As Int16
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents dgTracker As System.Windows.Forms.DataGrid
Friend WithEvents dgsRecruits As System.Windows.Forms.DataGridTableStyle
Friend WithEvents tbcAccCode As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcFirst As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcMiddle As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcLast As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcSuffix As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcAddedOn As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcSex As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcDOB As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcLastVisit As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcSampleProgram As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents dgsContacts As System.Windows.Forms.DataGridTableStyle
Friend WithEvents tbcContactDate As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcInitiator As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcResult As System.Windows.Forms.DataGridTextBoxColumn
' Friend WithEvents tbcType As System.Windows.Forms.DataGridTextBoxColumn
' Friend WithEvents tbcType As DataGridComboBoxColumn
Friend WithEvents tbcType As DGColumnStyles.DataGridComboBoxColumn ' DataGridBoundComboLib.DataGridComboBoxColumn
' Friend WithEvents tbcNotes As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcNotes As DGColumnStyles.WrappingTextBoxColumn
Friend WithEvents tbcStaffPerson As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents dgsStatuses As System.Windows.Forms.DataGridTableStyle
Friend WithEvents tbcDate As System.Windows.Forms.DataGridTextBoxColumn
' Friend WithEvents tbcStatus As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcStatus As DGColumnStyles.DataGridComboBoxColumn
Friend WithEvents tbcRecordedBy As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents dgsPhoneNumbers As System.Windows.Forms.DataGridTableStyle
Friend WithEvents tbcAreaCode As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcPhoneNumber As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcPhoneType As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcSource As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcExtension As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcPhoneRecordedBy As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents dgsAddresses As System.Windows.Forms.DataGridTableStyle
Friend WithEvents tbcPreference As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcLine1 As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcLine2 As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcCity As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcState As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcZip As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcAddrRecordedBy As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcBounceDate As System.Windows.Forms.DataGridTextBoxColumn
' Friend WithEvents tbcStatusTest As System.Windows.Forms.DataGridTextBoxColumn
' Friend WithEvents tbcStatusTest As DGColumnStyles.DataGridComboBoxColumn
Friend WithEvents tbcTypeDescription As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcCurrentStatus As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents tbcEMailAddress As System.Windows.Forms.DataGridTextBoxColumn
Friend WithEvents dvRecruits As System.Data.DataView
Friend WithEvents tbcIncentive As System.Windows.Forms.DataGridTextBoxColumn
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.dgTracker = New System.Windows.Forms.DataGrid
Me.dvRecruits = New System.Data.DataView
Me.dgsRecruits = New System.Windows.Forms.DataGridTableStyle
Me.tbcAccCode = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcFirst = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcMiddle = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcLast = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcSuffix = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcSex = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcDOB = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcEMailAddress = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcLastVisit = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcAddedOn = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcSampleProgram = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcCurrentStatus = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcIncentive = New System.Windows.Forms.DataGridTextBoxColumn
Me.dgsContacts = New System.Windows.Forms.DataGridTableStyle
Me.tbcContactDate = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcType = New DGColumnStyles.DataGridComboBoxColumn
Me.tbcInitiator = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcResult = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcNotes = New DGColumnStyles.WrappingTextBoxColumn
Me.tbcStaffPerson = New System.Windows.Forms.DataGridTextBoxColumn
Me.dgsStatuses = New System.Windows.Forms.DataGridTableStyle
Me.tbcDate = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcStatus = New DGColumnStyles.DataGridComboBoxColumn
Me.tbcRecordedBy = New System.Windows.Forms.DataGridTextBoxColumn
Me.dgsPhoneNumbers = New System.Windows.Forms.DataGridTableStyle
Me.tbcAreaCode = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcPhoneNumber = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcExtension = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcPhoneType = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcSource = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcPhoneRecordedBy = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcTypeDescription = New System.Windows.Forms.DataGridTextBoxColumn
Me.dgsAddresses = New System.Windows.Forms.DataGridTableStyle
Me.tbcPreference = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcLine1 = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcLine2 = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcCity = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcState = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcZip = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcAddrRecordedBy = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcBounceDate = New System.Windows.Forms.DataGridTextBoxColumn
Me.tbcPersonType = New System.Windows.Forms.DataGridTextBoxColumn
CType(Me.dgTracker, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.dvRecruits, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'dgTracker
'
Me.dgTracker.BackgroundColor = System.Drawing.Color.LightGray
Me.dgTracker.CaptionText = "Recruits"
Me.dgTracker.DataMember = ""
Me.dgTracker.DataSource = Me.dvRecruits
Me.dgTracker.Dock = System.Windows.Forms.DockStyle.Fill
Me.dgTracker.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.dgTracker.Location = New System.Drawing.Point(0, 0)
Me.dgTracker.Name = "dgTracker"
Me.dgTracker.Size = New System.Drawing.Size(896, 422)
Me.dgTracker.TabIndex = 0
Me.dgTracker.TableStyles.AddRange(New System.Windows.Forms.DataGridTableStyle() {Me.dgsRecruits, Me.dgsContacts, Me.dgsStatuses, Me.dgsPhoneNumbers, Me.dgsAddresses})
'
'dvRecruits
'
Me.dvRecruits.AllowNew = False
'
'dgsRecruits
'
Me.dgsRecruits.AlternatingBackColor = System.Drawing.Color.Lavender
Me.dgsRecruits.DataGrid = Me.dgTracker
Me.dgsRecruits.GridColumnStyles.AddRange(New System.Windows.Forms.DataGridColumnStyle() {Me.tbcAccCode, Me.tbcFirst, Me.tbcMiddle, Me.tbcLast, Me.tbcSuffix, Me.tbcSex, Me.tbcDOB, Me.tbcEMailAddress, Me.tbcLastVisit, Me.tbcAddedOn, Me.tbcSampleProgram, Me.tbcCurrentStatus, Me.tbcIncentive, Me.tbcPersonType})
Me.dgsRecruits.GridLineColor = System.Drawing.SystemColors.ControlText
Me.dgsRecruits.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.dgsRecruits.MappingName = "Recruits"
Me.dgsRecruits.PreferredColumnWidth = 175
'
'tbcAccCode
'
Me.tbcAccCode.Format = ""
Me.tbcAccCode.FormatInfo = Nothing
Me.tbcAccCode.HeaderText = "Access Code"
Me.tbcAccCode.MappingName = "AccCode"
Me.tbcAccCode.ReadOnly = True
Me.tbcAccCode.Width = 80
'
'tbcFirst
'
Me.tbcFirst.Format = ""
Me.tbcFirst.FormatInfo = Nothing
Me.tbcFirst.HeaderText = "First"
Me.tbcFirst.MappingName = "FirstName"
Me.tbcFirst.Width = 75
'
'tbcMiddle
'
Me.tbcMiddle.Format = ""
Me.tbcMiddle.FormatInfo = Nothing
Me.tbcMiddle.HeaderText = "Middle"
Me.tbcMiddle.MappingName = "MiddleName"
Me.tbcMiddle.NullText = ""
Me.tbcMiddle.Width = 30
'
'tbcLast
'
Me.tbcLast.Format = ""
Me.tbcLast.FormatInfo = Nothing
Me.tbcLast.HeaderText = "Last"
Me.tbcLast.MappingName = "LastName"
Me.tbcLast.Width = 75
'
'tbcSuffix
'
Me.tbcSuffix.Format = ""
Me.tbcSuffix.FormatInfo = Nothing
Me.tbcSuffix.HeaderText = "Suffix"
Me.tbcSuffix.MappingName = "NameSuffix"
Me.tbcSuffix.NullText = ""
Me.tbcSuffix.Width = 50
'
'tbcSex
'
Me.tbcSex.Format = ""
Me.tbcSex.FormatInfo = Nothing
Me.tbcSex.HeaderText = "Sex"
Me.tbcSex.MappingName = "Sex"
Me.tbcSex.NullText = ""
Me.tbcSex.Width = 50
'
'tbcDOB
'
Me.tbcDOB.Format = "MM/dd/yyyy"
Me.tbcDOB.FormatInfo = Nothing
Me.tbcDOB.HeaderText = "DOB"
Me.tbcDOB.MappingName = "BDate"
Me.tbcDOB.Width = 90
'
'tbcEMailAddress
'
Me.tbcEMailAddress.Format = ""
Me.tbcEMailAddress.FormatInfo = Nothing
Me.tbcEMailAddress.HeaderText = "E-Mail Address"
Me.tbcEMailAddress.MappingName = "EMailAddress"
Me.tbcEMailAddress.Width = 175
'
'tbcLastVisit
'
Me.tbcLastVisit.Format = "MM/dd/yyyy"
Me.tbcLastVisit.FormatInfo = Nothing
Me.tbcLastVisit.HeaderText = "Last Visit"
Me.tbcLastVisit.MappingName = "LastVistDate"
Me.tbcLastVisit.Width = 90
'
'tbcAddedOn
'
Me.tbcAddedOn.Format = "MM/dd/yyyy"
Me.tbcAddedOn.FormatInfo = Nothing
Me.tbcAddedOn.HeaderText = "Added On"
Me.tbcAddedOn.MappingName = "AddedDate"
Me.tbcAddedOn.NullText = ""
Me.tbcAddedOn.Width = 90
'
'tbcSampleProgram
'
Me.tbcSampleProgram.Format = ""
Me.tbcSampleProgram.FormatInfo = Nothing
Me.tbcSampleProgram.HeaderText = "Sample Program"
Me.tbcSampleProgram.MappingName = "RecruitProgVersion"
Me.tbcSampleProgram.Width = 60
'
'tbcCurrentStatus
'
Me.tbcCurrentStatus.Format = ""
Me.tbcCurrentStatus.FormatInfo = Nothing
Me.tbcCurrentStatus.HeaderText = "Current Status"
Me.tbcCurrentStatus.MappingName = "StatusDescription"
Me.tbcCurrentStatus.ReadOnly = True
Me.tbcCurrentStatus.Width = 175
'
'tbcIncentive
'
Me.tbcIncentive.Format = ""
Me.tbcIncentive.FormatInfo = Nothing
Me.tbcIncentive.HeaderText = "Incentive"
Me.tbcIncentive.MappingName = "Incentive"
Me.tbcIncentive.Width = 125
'
'dgsContacts
'
Me.dgsContacts.AlternatingBackColor = System.Drawing.Color.Lavender
Me.dgsContacts.DataGrid = Me.dgTracker
Me.dgsContacts.GridColumnStyles.AddRange(New System.Windows.Forms.DataGridColumnStyle() {Me.tbcContactDate, Me.tbcType, Me.tbcInitiator, Me.tbcResult, Me.tbcNotes, Me.tbcStaffPerson})
Me.dgsContacts.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.dgsContacts.MappingName = "RecruitContacts"
'
'tbcContactDate
'
Me.tbcContactDate.Format = "g"
Me.tbcContactDate.FormatInfo = Nothing
Me.tbcContactDate.HeaderText = "Date"
Me.tbcContactDate.MappingName = "ContactDate"
Me.tbcContactDate.Width = 200
'
'tbcType
'
Me.tbcType.Format = ""
Me.tbcType.FormatInfo = Nothing
Me.tbcType.HeaderText = "Type"
Me.tbcType.MappingName = "ContactType"
Me.tbcType.NullText = ""
Me.tbcType.Width = 125
'
'tbcInitiator
'
Me.tbcInitiator.Format = ""
Me.tbcInitiator.FormatInfo = Nothing
Me.tbcInitiator.HeaderText = "Initiated By"
Me.tbcInitiator.MappingName = "Initiator"
Me.tbcInitiator.NullText = ""
Me.tbcInitiator.Width = 90
'
'tbcResult
'
Me.tbcResult.Format = ""
Me.tbcResult.FormatInfo = Nothing
Me.tbcResult.HeaderText = "Result"
Me.tbcResult.MappingName = "Result"
Me.tbcResult.NullText = ""
Me.tbcResult.Width = 75
'
'tbcNotes
'
Me.tbcNotes.Format = ""
Me.tbcNotes.FormatInfo = Nothing
Me.tbcNotes.HeaderText = "Notes"
Me.tbcNotes.MappingName = "Notes"
Me.tbcNotes.NullText = ""
Me.tbcNotes.Width = 275
'
'tbcStaffPerson
'
Me.tbcStaffPerson.Format = ""
Me.tbcStaffPerson.FormatInfo = Nothing
Me.tbcStaffPerson.HeaderText = "Staff Person"
Me.tbcStaffPerson.MappingName = "AddedBy"
Me.tbcStaffPerson.NullText = ""
Me.tbcStaffPerson.Width = 75
'
'dgsStatuses
'
Me.dgsStatuses.AlternatingBackColor = System.Drawing.Color.Lavender
Me.dgsStatuses.DataGrid = Me.dgTracker
Me.dgsStatuses.GridColumnStyles.AddRange(New System.Windows.Forms.DataGridColumnStyle() {Me.tbcDate, Me.tbcStatus, Me.tbcRecordedBy})
Me.dgsStatuses.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.dgsStatuses.MappingName = "RecruitStatuses"
'
'tbcDate
'
Me.tbcDate.Format = "g"
Me.tbcDate.FormatInfo = Nothing
Me.tbcDate.HeaderText = "Date"
Me.tbcDate.MappingName = "StatusDate"
Me.tbcDate.NullText = ""
Me.tbcDate.Width = 150
'
'tbcStatus
'
Me.tbcStatus.Format = ""
Me.tbcStatus.FormatInfo = Nothing
Me.tbcStatus.HeaderText = "Status"
Me.tbcStatus.MappingName = "Status"
Me.tbcStatus.NullText = ""
Me.tbcStatus.Width = 75
'
'tbcRecordedBy
'
Me.tbcRecordedBy.Format = ""
Me.tbcRecordedBy.FormatInfo = Nothing
Me.tbcRecordedBy.HeaderText = "Recorded By"
Me.tbcRecordedBy.MappingName = "AddedBy"
Me.tbcRecordedBy.Width = 75
'
'dgsPhoneNumbers
'
Me.dgsPhoneNumbers.AlternatingBackColor = System.Drawing.Color.Lavender
Me.dgsPhoneNumbers.DataGrid = Me.dgTracker
Me.dgsPhoneNumbers.GridColumnStyles.AddRange(New System.Windows.Forms.DataGridColumnStyle() {Me.tbcAreaCode, Me.tbcPhoneNumber, Me.tbcExtension, Me.tbcPhoneType, Me.tbcSource, Me.tbcPhoneRecordedBy, Me.tbcTypeDescription})
Me.dgsPhoneNumbers.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.dgsPhoneNumbers.MappingName = "PhoneNumbers"
'
'tbcAreaCode
'
Me.tbcAreaCode.Format = ""
Me.tbcAreaCode.FormatInfo = Nothing
Me.tbcAreaCode.HeaderText = "Area Code"
Me.tbcAreaCode.MappingName = "AreaCode"
Me.tbcAreaCode.NullText = ""
Me.tbcAreaCode.Width = 50
'
'tbcPhoneNumber
'
Me.tbcPhoneNumber.Format = "000-0000"
Me.tbcPhoneNumber.FormatInfo = Nothing
Me.tbcPhoneNumber.HeaderText = "Number"
Me.tbcPhoneNumber.MappingName = "PhoneNumber"
Me.tbcPhoneNumber.NullText = ""
Me.tbcPhoneNumber.Width = 75
'
'tbcExtension
'
Me.tbcExtension.Format = ""
Me.tbcExtension.FormatInfo = Nothing
Me.tbcExtension.HeaderText = "Extension"
Me.tbcExtension.MappingName = "Extension"
Me.tbcExtension.NullText = ""
Me.tbcExtension.Width = 50
'
'tbcPhoneType
'
Me.tbcPhoneType.Format = ""
Me.tbcPhoneType.FormatInfo = Nothing
Me.tbcPhoneType.HeaderText = "Type"
Me.tbcPhoneType.MappingName = "Type"
Me.tbcPhoneType.NullText = ""
Me.tbcPhoneType.Width = 125
'
'tbcSource
'
Me.tbcSource.Format = ""
Me.tbcSource.FormatInfo = Nothing
Me.tbcSource.HeaderText = "Source"
Me.tbcSource.MappingName = "Source"
Me.tbcSource.NullText = ""
Me.tbcSource.Width = 75
'
'tbcPhoneRecordedBy
'
Me.tbcPhoneRecordedBy.Format = ""
Me.tbcPhoneRecordedBy.FormatInfo = Nothing
Me.tbcPhoneRecordedBy.HeaderText = "Recorded By"
Me.tbcPhoneRecordedBy.MappingName = "AddedBy"
Me.tbcPhoneRecordedBy.Width = 75
'
'tbcTypeDescription
'
Me.tbcTypeDescription.Format = ""
Me.tbcTypeDescription.FormatInfo = Nothing
Me.tbcTypeDescription.HeaderText = "Type Description"
Me.tbcTypeDescription.MappingName = "TypeDescription"
Me.tbcTypeDescription.Width = 120
'
'dgsAddresses
'
Me.dgsAddresses.AlternatingBackColor = System.Drawing.Color.Lavender
Me.dgsAddresses.DataGrid = Me.dgTracker
Me.dgsAddresses.GridColumnStyles.AddRange(New System.Windows.Forms.DataGridColumnStyle() {Me.tbcPreference, Me.tbcLine1, Me.tbcLine2, Me.tbcCity, Me.tbcState, Me.tbcZip, Me.tbcAddrRecordedBy, Me.tbcBounceDate})
Me.dgsAddresses.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.dgsAddresses.MappingName = "Addresses"
'
'tbcPreference
'
Me.tbcPreference.Format = ""
Me.tbcPreference.FormatInfo = Nothing
Me.tbcPreference.HeaderText = "Preference"
Me.tbcPreference.MappingName = "PreferenceRank"
Me.tbcPreference.NullText = ""
Me.tbcPreference.Width = 50
'
'tbcLine1
'
Me.tbcLine1.Format = ""
Me.tbcLine1.FormatInfo = Nothing
Me.tbcLine1.HeaderText = "Line 1"
Me.tbcLine1.MappingName = "Line1"
Me.tbcLine1.NullText = ""
Me.tbcLine1.Width = 200
'
'tbcLine2
'
Me.tbcLine2.Format = ""
Me.tbcLine2.FormatInfo = Nothing
Me.tbcLine2.HeaderText = "Line 2"
Me.tbcLine2.MappingName = "Line2"
Me.tbcLine2.NullText = ""
Me.tbcLine2.Width = 150
'
'tbcCity
'
Me.tbcCity.Format = ""
Me.tbcCity.FormatInfo = Nothing
Me.tbcCity.HeaderText = "City"
Me.tbcCity.MappingName = "City"
Me.tbcCity.NullText = ""
Me.tbcCity.Width = 75
'
'tbcState
'
Me.tbcState.Format = ""
Me.tbcState.FormatInfo = Nothing
Me.tbcState.HeaderText = "State"
Me.tbcState.MappingName = "State"
Me.tbcState.NullText = ""
Me.tbcState.Width = 75
'
'tbcZip
'
Me.tbcZip.Format = "00000-0000"
Me.tbcZip.FormatInfo = Nothing
Me.tbcZip.HeaderText = "Zip"
Me.tbcZip.MappingName = "Zip"
Me.tbcZip.NullText = ""
Me.tbcZip.Width = 75
'
'tbcAddrRecordedBy
'
Me.tbcAddrRecordedBy.Format = ""
Me.tbcAddrRecordedBy.FormatInfo = Nothing
Me.tbcAddrRecordedBy.HeaderText = "Recorded By"
Me.tbcAddrRecordedBy.MappingName = "AddedBy"
Me.tbcAddrRecordedBy.NullText = ""
Me.tbcAddrRecordedBy.Width = 75
'
'tbcBounceDate
'
Me.tbcBounceDate.Format = "MM/dd/yyyy"
Me.tbcBounceDate.FormatInfo = Nothing
Me.tbcBounceDate.HeaderText = "Bounce Date"
Me.tbcBounceDate.MappingName = "BounceDate"
Me.tbcBounceDate.NullText = ""
Me.tbcBounceDate.Width = 90
'
'tbcPersonType
'
Me.tbcPersonType.Format = ""
Me.tbcPersonType.FormatInfo = Nothing
Me.tbcPersonType.HeaderText = "Type"
Me.tbcPersonType.MappingName = "PersonType"
Me.tbcPersonType.ReadOnly = True
Me.tbcPersonType.Width = 175
'
'frmRecruitBrowser
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 16)
Me.ClientSize = New System.Drawing.Size(896, 422)
Me.Controls.Add(Me.dgTracker)
Me.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.KeyPreview = True
Me.Name = "frmRecruitBrowser"
Me.Text = "CHCR Recruit Browser"
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
CType(Me.dgTracker, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.dvRecruits, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
#End Region
Public Sub BindGrid(ByVal ds As TrackerData)
With Me.dgTracker
' Me.DataView1.Table = ds.Recruits
.DataSource = ds
.DataMember = ds.Recruits.TableName
' .DataSource = Me.DataView1
End With
' Lets try to track the position of the contacts list.
Dim cmContacts As CurrencyManager
cmContacts = CType(Me.BindingContext(dgTracker.DataSource, "Recruits.Contacts"), CurrencyManager)
AddHandler cmContacts.CurrentChanged, AddressOf OnCurrentContact
' And likewise for the statuses list.
Dim cmStatuses As CurrencyManager
cmStatuses = CType(Me.BindingContext(dgTracker.DataSource, "Recruits.Status History"), CurrencyManager)
AddHandler cmStatuses.CurrentChanged, AddressOf OnCurrentStatus
End Sub
Private Sub frmRecruitBrowser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MainForm = CType(Me.MdiParent, frmTracker)
MainForm.pStatus.Text = "Ready"
With Me.tbcType.ColumnComboBox
.DataSource = TrackerApp.Tracker1.ContactTypes
.DisplayMember = "ContactTypeDescription"
.ValueMember = "ContactType"
Me.dgsContacts.PreferredRowHeight = .Height + 1
End With
With Me.tbcStatus.ColumnComboBox
.DataSource = TrackerApp.Tracker1.Statuses.DefaultView
.DisplayMember = "StatusDescription"
.ValueMember = "Status"
Me.dgsStatuses.PreferredRowHeight = .Height + 1
End With
End Sub
Private Sub OnCurrentContact(ByVal sender As Object, ByVal e As System.EventArgs)
Dim x As BindingManagerBase = CType(sender, BindingManagerBase)
If Not x.IsBindingSuspended Then
Dim drv As DataRowView = CType(x.Current, DataRowView)
If drv.IsNew() Then
Dim c As TrackerData.RecruitContactsRow = CType(drv.Row, TrackerData.RecruitContactsRow)
c.ContactDate = Now
End If
End If
End Sub
Private Sub OnCurrentStatus(ByVal sender As Object, ByVal e As System.EventArgs)
Dim x As BindingManagerBase = CType(sender, BindingManagerBase)
If Not x.IsBindingSuspended Then
Dim drv As DataRowView = CType(x.Current, DataRowView)
If drv.IsNew() Then
Dim c As TrackerData.RecruitStatusesRow = CType(drv.Row, TrackerData.RecruitStatusesRow)
c.StatusDate = Now
End If
End If
End Sub
Public Function FixingToSave() As Boolean Implements DataboundForm.EndPendingEdits
Try
'Dim bmb As BindingManagerBase
'With Me.dgTracker
' bmb = .BindingContext(.DataSource, .DataMember)
'End With
'bmb.EndCurrentEdit()
TrackerApp.FlushDataGrid(Me.dgTracker)
Return True
Catch ex As System.Data.NoNullAllowedException
MessageBox.Show(ex.Message)
Return False
End Try
End Function
Public ReadOnly Property CurrentRecruitID() As Integer Implements DataboundForm.CurrentRecruitID
Get
Dim cm As CurrencyManager
With dgTracker
cm = CType(.BindingContext(.DataSource, .DataMember), CurrencyManager)
Dim drv As DataRowView = CType(cm.Current, DataRowView)
Return CType(drv.Row, TrackerData.RecruitsRow).RecruitID
End With
End Get
End Property
End Class