-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCCreator.vb
163 lines (134 loc) · 5.82 KB
/
CCreator.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
Public Class CCreator
Dim data As Integer = 0
Dim hoje As Date = Date.Now()
Dim dba As New dbamanager
Private Sub CCreator_Load(sender As Object, e As EventArgs) Handles MyBase.Load
MonthCalendar1.MinDate = hoje
End Sub
Private Sub BackToHome_Click(sender As Object, e As EventArgs) Handles BackToHome.Click, Separator.Click
Me.Close()
Home.Show()
End Sub
Private Sub minimize_Click(sender As Object, e As EventArgs) Handles minimize.Click
Me.WindowState = FormWindowState.Minimized
End Sub
Private Sub Minimize_MouseEnter(sender As Object, e As EventArgs)
Style.Link_MouseHover(sender)
End Sub
Private Sub Minimize_MouseLeave(sender As Object, e As EventArgs)
Style.Link(sender)
End Sub
Private Sub BackToHome_MouseHover(sender As Object, e As EventArgs)
Style.Link_MouseHover(sender)
End Sub
Private Sub BackToHome_MouseLeave(sender As Object, e As EventArgs)
Style.Link(sender)
End Sub
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
TextBox1.Focus()
End Sub
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
TextBox2.Focus()
End Sub
Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
TextBox3.Focus()
End Sub
Private Sub PictureBox4_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
TextBox4.Focus()
End Sub
Private Sub PictureBox5_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
TextBox5.Focus()
End Sub
Private Sub PictureBox6_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
TextBox6.Focus()
End Sub
Private Sub PictureBox7_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
TextBox7.Focus()
End Sub
Private Sub PictureBox8_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
TextBox8.Focus()
End Sub
Private Sub PictureBox9_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
TextBox9.Focus()
End Sub
Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown
If (e.KeyCode = Keys.Enter) Then
SendKeys.Send("{TAB}")
End If
End Sub
Private Sub PictureBox2_Click_1(sender As Object, e As EventArgs) Handles PictureBox2.Click
data = 1
MonthCalendar1.Visible = True
MonthCalendar1.Location = New Point(898, 110)
End Sub
Private Sub PictureBox4_Click_1(sender As Object, e As EventArgs) Handles PictureBox4.Click
data = 2
MonthCalendar1.Visible = True
MonthCalendar1.Location = New Point(898, 200)
End Sub
Private Sub PictureBox6_Click_1(sender As Object, e As EventArgs) Handles PictureBox6.Click
data = 3
MonthCalendar1.Visible = True
MonthCalendar1.Location = New Point(898, 295)
End Sub
Private Sub CCreator_Click(sender As Object, e As EventArgs) Handles MyBase.Click
MonthCalendar1.Visible = False
End Sub
Private Sub MonthCalendar1_DateSelected(sender As Object, e As DateRangeEventArgs) Handles MonthCalendar1.DateSelected
If (data = 1) Then
TextBox2.Text = MonthCalendar1.SelectionRange.Start.ToShortDateString()
ElseIf (data = 2) Then
TextBox4.Text = MonthCalendar1.SelectionRange.Start.ToShortDateString()
ElseIf (data = 3) Then
TextBox6.Text = MonthCalendar1.SelectionRange.Start.ToShortDateString()
End If
End Sub
Private Sub Calendario1_Click(sender As Object, e As EventArgs) Handles calendario1.Click
If (MonthCalendar1.Visible = True) Then
MonthCalendar1.Visible = False
Else
data = 1
MonthCalendar1.Visible = True
MonthCalendar1.Location = New Point(898, 110)
End If
End Sub
Private Sub Calendario2_Click(sender As Object, e As EventArgs) Handles calendario2.Click
If (MonthCalendar1.Visible = True) Then
MonthCalendar1.Visible = False
Else
data = 2
MonthCalendar1.Visible = True
MonthCalendar1.Location = New Point(898, 200)
End If
End Sub
Private Sub Calendario3_Click(sender As Object, e As EventArgs) Handles calendario3.Click
If (MonthCalendar1.Visible = True) Then
MonthCalendar1.Visible = False
Else
data = 3
MonthCalendar1.Visible = True
MonthCalendar1.Location = New Point(898, 295)
End If
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim userid As String = dba.getUserId(Session.GetSession_ID)
Dim ctitle As String = TextBox1.Text
Dim cstart As String = TextBox2.Text
Dim cservice As String = TextBox3.Text
Dim cend As String = TextBox4.Text
Dim ctarget As String = TextBox5.Text
Dim cannouncement As String = TextBox6.Text
Dim cquestion1 As String = TextBox7.Text
Dim cquestion2 As String = TextBox8.Text
Dim description As String = TextBox9.Text
Dim status As Integer = 1
If (ctitle = "..." Or cstart = "..." Or cend = "..." Or cannouncement = "..." Or ctarget = "..." Or cservice = "..." Or cquestion1 = "..." Or description = "...") Then
MsgBox("There is a field which still empty. Please Review The fields with ... and fill in the information required.")
Else
dba.ConcourseCreator(userid, ctitle, description, cservice, ctarget, cquestion1, cquestion2, cstart, cend, cannouncement, status)
MsgBox("Concourse Created Sucessfully.")
Me.Close()
Home.Show()
End If
End Sub
End Class