Documente Academic
Documente Profesional
Documente Cultură
Dim N As Boolean
Me.Close()
End Sub
DateTimePicker1.Value = Now
txtAdresse.Clear()
txtcode.Clear()
10
txtNom.Clear()
11
TxtPrnom.Clear()
12
txtville.Clear()
13
txtNom.Focus()
14
End Sub
15
16
ErreurNom()
17
ErreurPrnom()
18
ErreurCode()
19
If Not N Then
20
Nom = txtNom.Text.Trim
21
Prnom = TxtPrnom.Text.Trim
22
Adresse = txtAdresse.Text.Trim
23
Code = txtcode.Text.Trim
24
Ville = txtville.Text.Trim
25
Form2.Show()
26
Me.Close()
27
Else
28
29
30
End Sub
31
Sub ErreurNom()
32
33
34
35
N = True
36
Exit Sub
37
End If
38
For i = 0 To Len(txtNom.Text.Trim) - 1
39
40
41
42
N = True
43
Exit Sub
44
End If
45
Next
46
ErrorProvider1.Clear()
47
N = False
48
End Sub
49
50
51
Sub ErreurPrnom()
If TxtPrnom.Text = "" Then
52
53
54
N = True
55
Exit Sub
56
End If
57
For i = 0 To Len(TxtPrnom.Text.Trim) - 1
58
59
60
61
N = True
62
Exit Sub
63
End If
64
Next
65
ErrorProvider2.Clear()
66
67
N = False
End Sub
68
69
Sub ErreurCode()
70
71
If L <= 5 Then
72
For i = 0 To Len(txtcode.Text.Trim) - 1
73
74
75
76
N = True
77
Exit Sub
78
End If
79
80
Next
Else
81
82
83
txtcode.Text.Remove(L - 5)
84
N = True
85
Exit Sub
86
End If
87
ErrorProvider3.Clear()
88
N = False
89
End Sub
90 End Class
91
92 ----------------------------------------------------------------------------93
94 Public Class Form2
95
96
Form1.Show()
97
Me.Close()
98
End Sub
99
100
101
102
lbladresse1.Text = Adresse
103
104
End Sub