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
| Imports System.Drawing
Imports System.Collections
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.Data
Imports System.Runtime.InteropServices
Imports System.Threading
Public Class Form1
Public bmb As BindingManagerBase
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO : cette ligne de code charge les données dans la table 'BaseDataSet.Donnees'. Vous pouvez la déplacer ou la supprimer selon vos besoins.
Me.DonneesTableAdapter.Fill(Me.BaseDataSet.Donnees)
'TODO : cette ligne de code charge les données dans la table 'BaseDataSet.Donnees'. Vous pouvez la déplacer ou la supprimer selon vos besoins.
Me.DonneesTableAdapter.Fill(Me.BaseDataSet.Donnees)
'TODO : cette ligne de code charge les données dans la table 'BaseDataSet.Donnees'. Vous pouvez la déplacer ou la supprimer selon vos besoins.
Me.DonneesTableAdapter.Fill(Me.BaseDataSet.Donnees)
'TODO : cette ligne de code charge les données dans la table 'BaseDataSet.Donnees'. Vous pouvez la déplacer ou la supprimer selon vos besoins.
Me.DonneesTableAdapter.Fill(Me.BaseDataSet.Donnees)
bmb = Me.BindingContext(Me.DonneesBindingSource)
My.Forms.LoginForm1.Visible = False
Me.ToolStripStatusLabel1.Text = "Société :"
Me.ToolStripStatusLabel2.Text = My.Application.Info.ProductName
Me.ToolStripStatusLabel3.Text = "| Utilisateur :"
Me.ToolStripStatusLabel4.Text = My.Forms.LoginForm1.UsernameTextBox.Text
Me.ToolStripStatusLabel5.Text = "| Ouverture du programme à :"
Me.ToolStripStatusLabel6.Text = My.Computer.Clock.LocalTime
Me.MinimizeBox = True
Me.MaximizeBox = True
Me.HelpButton = True
End Sub
Private Sub NouveauToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NouveauToolStripMenuItem.Click
Me.bmb.AddNew()
Me.Langue1_cdtComboBox.Text = "Anglais"
End Sub
Private Sub SupprimerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SupprimerToolStripMenuItem.Click
If MsgBox("Etes-vous sur de vouloir supprimer ce candidat", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
Try
Me.bmb.RemoveAt(Me.bmb.Position)
MsgBox("Element supprimé")
Catch ex As Exception
MsgBox("Erreur de suppression:" & vbCr & ex.Message)
End Try
End If
End Sub
Private Sub EnregistrerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EnregistrerToolStripMenuItem.Click
Me.Validate()
Me.DonneesBindingSource.EndEdit()
Me.DonneesTableAdapter.Update(Me.BaseDataSet.Donnees)
End Sub
Private Sub ImprimerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ImprimerToolStripMenuItem.Click
Me.bmb.Position -= 1
End Sub
Private Sub QuitterToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitterToolStripMenuItem.Click
Me.bmb.Position += 1
End Sub
Private Sub QuitterToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitterToolStripMenuItem1.Click
Me.Close()
My.Forms.LoginForm1.Close()
End Sub
Private Sub RechercheToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RechercheToolStripMenuItem.Click
Dim Form2 As New Recherche
Recherche.ShowDialog()
End Sub
Private Sub AjouterUnUtilisateurToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjouterUnUtilisateurToolStripMenuItem.Click
If (My.Forms.LoginForm1.UsernameTextBox.Text = "admin") Then
Dim AjoutU As New AjouterUtilisateur
AjoutU.ShowDialog()
Else
MsgBox("Vous n'êtes pas administrateur du logiciel")
End If
End Sub
Public Function afficher_element(ByVal valeur As String)
Dim i As Integer
Dim pourcent As Integer
Dim bOk As Boolean = False
If (valeur < 5000) Then
Me.DonneesBindingSource.Position = valeur - 25
Else
Me.DonneesBindingSource.Position = 4056 + (valeur - 18280) - 30
End If
For i = 0 To Me.DonneesBindingSource.Count Step 1
pourcent = (i / (Me.DonneesBindingSource.Count)) * 100
If (i = 0) Then
My.Forms.Recherche.ProgressBar1.Increment(-100)
Else
My.Forms.Recherche.ProgressBar1.Increment(pourcent)
End If
My.Forms.Recherche.ProgressBar1.Increment(pourcent)
If (valeur = Me.Num_cdtLabel1.Text) Then
bOk = True
My.Forms.Recherche.ProgressBar1.Increment(100)
i = Me.DonneesBindingSource.Count
Else
Me.DonneesBindingSource.MoveNext()
End If
Next
Return bOk
End Function
Private Sub DonneesBindingNavigatorSaveItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DonneesBindingNavigatorSaveItem.Click
Me.Validate()
Me.DonneesBindingSource.EndEdit()
Me.DonneesTableAdapter.Update(Me.BaseDataSet.Donnees)
End Sub
Private Sub AjouterUnEtatCivilToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjouterUnEtatCivilToolStripMenuItem.Click
If (My.Forms.LoginForm1.UsernameTextBox.Text = "admin") Then
Dim AjoutE As New AjoutEtatCivil
AjoutE.ShowDialog()
Else
MsgBox("Vous n'êtes pas administrateur du logiciel")
End If
End Sub
Private Sub AjouterOuSupprimerUneNationalitéToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjouterOuSupprimerUneNationalitéToolStripMenuItem.Click
If (My.Forms.LoginForm1.UsernameTextBox.Text = "admin") Then
Dim AjoutNa As New AjoutNationalite
AjoutNa.ShowDialog()
Else
MsgBox("Vous n'êtes pas administrateur du logiciel")
End If
End Sub
Private Sub AjouterOuSupprimerUneNoteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjouterOuSupprimerUneNoteToolStripMenuItem.Click
If (My.Forms.LoginForm1.UsernameTextBox.Text = "admin") Then
Dim AjoutN As New Ajoutnote
AjoutN.ShowDialog()
Else
MsgBox("Vous n'êtes pas administrateur du logiciel")
End If
End Sub
Private Sub AjouterOuSuprimerUnNiveauDeLangueToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjouterOuSuprimerUnNiveauDeLangueToolStripMenuItem.Click
If (My.Forms.LoginForm1.UsernameTextBox.Text = "admin") Then
Dim AjoutNivo As New Ajoutnivolangue
AjoutNivo.ShowDialog()
Else
MsgBox("Vous n'êtes pas administrateur du logiciel")
End If
End Sub
Private Sub AjouterOuSuprimerUneLangueToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AjouterOuSuprimerUneLangueToolStripMenuItem.Click
If (My.Forms.LoginForm1.UsernameTextBox.Text = "admin") Then
Dim AjoutLge As New AjoutLangue
AjoutLangue.ShowDialog()
Else
MsgBox("Vous n'êtes pas administrateur du logiciel")
End If
End Sub
Private Sub FermerEtOuvrirUneNouvelleSessionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FermerEtOuvrirUneNouvelleSessionToolStripMenuItem.Click
Me.Close()
My.Forms.LoginForm1.Show()
My.Forms.LoginForm1.UsernameTextBox.Text = ""
My.Forms.LoginForm1.PasswordTextBox.Text = ""
End Sub
Private Sub ImrpimerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ImrpimerToolStripMenuItem.Click
Dim impression As New Form2
Form2.ShowDialog()
End Sub
Public Sub Societe_cdtTextbox_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Societe_cdtTextBox.KeyPress
Dim pos As Integer
pos = Societe_cdtTextBox.SelectionStart
If Societe_cdtTextBox.SelectionStart = 0 Then
If e.KeyChar = "a" Then
e.Handled = True
Societe_cdtTextBox.Text = Societe_cdtTextBox.Text.Insert(pos, "A")
End If
If e.KeyChar = "b" Then
e.Handled = True
Societe_cdtTextBox.Text = Societe_cdtTextBox.Text.Insert(pos, "B")
End If
...
If e.KeyChar = "z" Then
e.Handled = True
Societe_cdtTextBox.Text = Societe_cdtTextBox.Text.Insert(pos, "Z")
End If
Societe_cdtTextBox.SelectionStart = pos + 1 'on avance le curseur d'un caractère
End If
End Sub
Public Sub Souhaits_cdtTextbox_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Souhaits_cdtTextbox.KeyPress
Dim pos As Integer
pos = Souhaits_cdtTextbox.SelectionStart
If Souhaits_cdtTextbox.SelectionStart = 0 Then
If e.KeyChar = "a" Then
e.Handled = True
Souhaits_cdtTextbox.Text = Souhaits_cdtTextbox.Text.Insert(pos, "A")
End If
...
If e.KeyChar = "x" Then
e.Handled = True
Souhaits_cdtTextbox.Text = Souhaits_cdtTextbox.Text.Insert(pos, "X")
End If
If e.KeyChar = "y" Then
e.Handled = True
Souhaits_cdtTextbox.Text = Souhaits_cdtTextbox.Text.Insert(pos, "Y")
End If
If e.KeyChar = "z" Then
e.Handled = True
Souhaits_cdtTextbox.Text = Souhaits_cdtTextbox.Text.Insert(pos, "Z")
End If
Souhaits_cdtTextbox.SelectionStart = pos + 1 'on avance le curseur d'un caractère
End If
End Sub
Public Sub Competences_cdtTextbox_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs)
Dim pos As Integer
pos = Competences_cdtTextBox.SelectionStart
If Competences_cdtTextBox.SelectionStart = 0 Then
If e.KeyChar = "a" Then
e.Handled = True
Competences_cdtTextBox.Text = Competences_cdtTextBox.Text.Insert(pos, "A")
End If
If e.KeyChar = "b" Then
e.Handled = True
Competences_cdtTextBox.Text = Competences_cdtTextBox.Text.Insert(pos, "B")
End If
...
If e.KeyChar = "y" Then
e.Handled = True
Competences_cdtTextBox.Text = Competences_cdtTextBox.Text.Insert(pos, "Y")
End If
If e.KeyChar = "z" Then
e.Handled = True
Competences_cdtTextBox.Text = Competences_cdtTextBox.Text.Insert(pos, "Z")
End If
Competences_cdtTextBox.SelectionStart = pos + 1 'on avance le curseur d'un caractère
End If
End Sub
Private Sub Pretention_salTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Pretention_salTextBox.Validating
If Not IsNumeric(Me.Pretention_salTextBox.Text) Then
Me.ErrorProvider1.SetError(Me.Pretention_salTextBox, "L'entrée doit être numérique")
e.Cancel = True
Else
Me.ErrorProvider1.SetError(Me.Pretention_salTextBox, "")
End If
End Sub
Private Sub Actuel_salTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Actuel_salTextBox.Validating
If Not IsNumeric(Me.Actuel_salTextBox.Text) Then
Me.ErrorProvider1.SetError(Me.Actuel_salTextBox, "L'entrée doit être numérique")
e.Cancel = True
Else
Me.ErrorProvider1.SetError(Me.Actuel_salTextBox, "")
End If
End Sub
Private Sub Pretention2_salTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Pretention2_salTextBox.Validating
If Not IsNumeric(Me.Pretention2_salTextBox.Text) Then
Me.ErrorProvider1.SetError(Me.Pretention2_salTextBox, "L'entrée doit être numérique")
e.Cancel = True
Else
Me.ErrorProvider1.SetError(Me.Pretention2_salTextBox, "")
End If
End Sub
Private Sub Fixe_cdtTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Fixe_cdtTextBox.Validating
If Not IsNumeric(Me.Fixe_cdtTextBox.Text) Then
Me.ErrorProvider1.SetError(Me.Fixe_cdtTextBox, "L'entrée doit être numérique")
e.Cancel = True
Else
Me.ErrorProvider1.SetError(Me.Fixe_cdtTextBox, "")
End If
End Sub
Private Sub Actuel2_salTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Actuel2_salTextBox.Validating
If Not IsNumeric(Me.Actuel2_salTextBox.Text) Then
Me.ErrorProvider1.SetError(Me.Actuel2_salTextBox, "L'entrée doit être numérique")
e.Cancel = True
Else
Me.ErrorProvider1.SetError(Me.Actuel2_salTextBox, "")
End If
End Sub
Private Sub Mobile_cdtTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
If Not IsNumeric(Me.Mobile_cdtTextBox.Text) Then
Me.ErrorProvider1.SetError(Me.Mobile_cdtTextBox, "L'entrée doit être numérique")
e.Cancel = True
Else
Me.ErrorProvider1.SetError(Me.Mobile_cdtTextBox, "")
End If
End Sub
Private Sub Nom_cdtTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Nom_cdtTextBox.TextChanged
End Sub
Private Sub Prenom_cdtTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Nom_cdtTextBox.TextChanged
Dim ch As String
ch = UCase(Microsoft.VisualBasic.Left(Prenom_cdtTextBox.Text, 1))
ch = ch & LCase(Microsoft.VisualBasic.Right(Prenom_cdtTextBox.Text, Len(Prenom_cdtTextBox.Text) - 1))
Prenom_cdtTextBox.Text = ch
End Sub
Private Sub Actuel_salLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Global_cdtLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub ExpOrale_cdtComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExpOrale_cdtComboBox.SelectedIndexChanged
End Sub
Private Sub Global_cdtComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Global_cdtComboBox.SelectedIndexChanged
End Sub
Private Sub Motivation_cdtComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Motivation_cdtComboBox.SelectedIndexChanged
End Sub
Private Sub Relationnel_cdtLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Presentation_cdtLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Mobilite_cdtLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub ExpOrale_cdtLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Habilitation_cdtLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Habilitation_cdtTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Habilitation_cdtTextBox.TextChanged
End Sub
Private Sub Souhaits_cdtLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Souhaits_cdtTextbox.TextChanged
End Sub
Private Sub Mobile_cdtTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Niveau1_cdtComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Niveau1_cdtComboBox.SelectedIndexChanged
End Sub
Private Sub Langue2_cdtComboBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Langue3_cdtComboBox.SelectedIndexChanged
End Sub
Private Sub TabPage3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabPage3.Click
End Sub
Private Sub Langue1_cdtComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Langue1_cdtComboBox.SelectedIndexChanged
End Sub
Private Sub Vuele_autDateTimePicker_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Vuele_autCheckBox.Click
If Vuele_autCheckBox.Checked = True Then
Vuele_autDateTimePicker.Enabled = True 'pour activer
Else
Vuele_autDateTimePicker.Enabled = False 'pour désactiver
End If
End Sub
Private Sub Depuis_cdtDateTimePicker_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Depuis_cdtCheckBox.Click
If Depuis_cdtCheckBox.Checked = True Then
Depuis_cdtDateTimePicker.Enabled = True 'pour activer
Else
Depuis_cdtDateTimePicker.Enabled = False 'pour désactiver
End If
End Sub
Private Sub Contactencours_cdtTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Contactencours_cdtTextBox.TextChanged
End Sub
Private Sub TabPage5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabPage5.Click
End Sub
Private Sub Rdvtel2_autLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
End Class |
Partager