Vous trouvez ici la liste des activités que vous pouvez utiliser pour enseigner le module 1 du programme de l'informatique au secondaire
Les activités du module 1
Vous trouvez ici la liste des activités que vous pouvez utiliser pour enseigner le module 1 du programme de l'informatique au secondaire
أقوى برنامج كشف الهكر بالمجان لمدة سنتين
السلام عليكم ورحمة الله تعالى وبركاته
يسعدني اليوم أن أضع بين أيديكم واحد من أقوى برامج كشف الهكر في نسخته الدفوعة بالمجان لمدة سنتين وهذا عرض جد مغري من الشركة فسارعوا للاستفادة منه
كل التفاصيل تجدونها في الفيديو أسفله. ففرجة ممتعة ولأي استفسارات ضعوها في التعليقات
Programme d'aide pour la realisation d'un projet de gestion en VB NET
Pour réaliser un projet informatique pour gérer votre entreprise par exemple, vous suivez un ensemble d'étapes bien sûr en commençant par l'analyse et la conception puis la création de la base de données et finalement la creation de l'interface graphique de l'application, dans ce sujet vous trouvez quelques programmes qui vont vous aider pour se connecter à la base de données, pour activer les boutons de commande ...
Imports System.Data.OleDb
Public Class
reservation
Public Objetdatatable As DataTable
La fonction de chaque formulaire
Sub reservation()
Try
strsql = "select * from reservation"
cmd = New OleDbCommand(strsql)
Objetdataadapter = New OleDbDataAdapter(cmd)
cmd.Connection = con
Objetdataadapter.Fill(Objetdataset, "reservation")
Objetdatatable = Objetdataset.Tables("reservation")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
_______________________________________________
Load
Private Sub reservation_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call connect()
Call reservation()
Me.TextBox1.Text = Objetdatatable.Rows(rownumber).Item("nreservation")
Me.TextBox2.Text = Objetdatatable.Rows(rownumber).Item("villedepart")
Me.TextBox3.Text = Objetdatatable.Rows(rownumber).Item("villearrivee")
Me.TextBox4.Text = Objetdatatable.Rows(rownumber).Item("datedepart")
Me.TextBox5.Text = Objetdatatable.Rows(rownumber).Item("montant")
DataGridView2.DataSource = Objetdataset
DataGridView2.DataMember = "reservation"
End Sub
______________________________________________
SUIVANT:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call connect()
If rownumber = Objetdatatable.Rows.Count - 1 Then
MsgBox("dernier enregistrement")
Else
rownumber += 1
Me.TextBox1.Text = Objetdatatable.Rows(rownumber).Item("nreservation")
Me.TextBox2.Text = Objetdatatable.Rows(rownumber).Item("villedepart")
Me.TextBox3.Text = Objetdatatable.Rows(rownumber).Item("villearrivee")
Me.TextBox4.Text = Objetdatatable.Rows(rownumber).Item("datedepart")
Me.TextBox5.Text = Objetdatatable.Rows(rownumber).Item("montant")
End If
End Sub
_______________________________________________
PRECEDENT:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Call connect()
If rownumber = 0 Then
MsgBox("premier enregistrement")
Else
rownumber -= 1
Me.TextBox1.Text = Objetdatatable.Rows(rownumber).Item("nreservation")
Me.TextBox2.Text = Objetdatatable.Rows(rownumber).Item("villedepart")
Me.TextBox3.Text = Objetdatatable.Rows(rownumber).Item("villearrivee")
Me.TextBox4.Text = Objetdatatable.Rows(rownumber).Item("datedepart")
Me.TextBox5.Text = Objetdatatable.Rows(rownumber).Item("montant")
End If
End Sub
_______________________________________________
NOUVEAU:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
End Sub
_______________________________________________
ENREGISTRER:
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Call connect()
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = "" Or TextBox5.Text = "" Then
MsgBox("remplir tous les champs")
Else
Objetdatarow = Objetdataset.Tables("reservation").NewRow()
Objetdatarow("nreservation") = Me.TextBox1.Text
Objetdatarow("villedepart") = Me.TextBox2.Text
Objetdatarow("villearrivee") = Me.TextBox3.Text
Objetdatarow("datedepart") = Me.TextBox4.Text
Objetdatarow("montant") = Me.TextBox5.Text
Objetdataset.Tables("reservation").Rows.Add(Objetdatarow)
Objetcommandbuilder = New OleDbCommandBuilder(Objetdataadapter)
Objetdataadapter.Update(Objetdataset, "reservation")
Objetdataset.Clear()
Objetdataadapter.Fill(Objetdataset, "reservation")
Objetdatatable = Objetdataset.Tables("reservation")
MsgBox("enregistrement effectuées")
End If
End Sub
_______________________________________________
FERMER:
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Me.Close()
End Sub
_______________________________________________
Supprimer
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Call connect()
Objetdataset.Tables("reservation").Rows(rownumber).Delete()
Objetcommandbuilder = New OleDbCommandBuilder(Objetdataadapter)
Objetdataadapter.Update(Objetdataset, "reservation")
MsgBox("suppression effectué")
End Sub
Call connect()
Objetdatarow = Objetdataset.Tables("client").Rows(rownumber)
Objetdatarow("nreservation") = Me.TextBox1.Text
Objetdatarow("villedepart") = Me.TextBox2.Text
Objetdatarow("villearrivee") = Me.TextBox3.Text
Objetdatarow("datedepart") = Me.TextBox4.Text
Objetdatarow("montant") = Me.TextBox5.Text
Objetcommandbuilder = New OleDbCommandBuilder(Objetdataadapter)
Objetdataadapter.Update(Objetdataset, "client")
Objetdataset.Clear()
Objetdataadapter.Fill(Objetdataset, "client")
Objetdatatable = Objetdataset.Tables("client")
MsgBox("modification effectués")
End Sub
Call connect()
Call reservation()
Dim cmd As New OleDbCommand("select * from reservation where [code] like '%" & txtSearch.Text & "%'")
cmd.Connection = con
Dim da As New OleDbDataAdapter
da.SelectCommand = cmd
Dim ds As New DataSet
da.Fill(ds, "client")
dtg1.DataSource = ds.Tables("client")
con.Close()
End Sub
End Class
___________________________________________
MODULE
Imports System.Data.OleDb
Imports System.Data
Module Module1
Public con As New OleDbConnection()
Public cmd As OleDbCommand
Public Objetdataadapter As OleDbDataAdapter
Public Objetdataset As New DataSet()
Public strsql As String
Public Objetdatatable As DataTable
Public Objetdatarow As DataRow
Public rownumber As Integer
Public Objetcommandbuilder As OleDbCommandBuilder
Public Objetdatatable1 As DataTable
Public Sub connect()
Try
con = New OleDbConnection()
con.ConnectionString = "provider=Microsoft.ace.OLEDB.12.0;" & "Data Source =C:\Users\user\Desktop\pri.accdb;"
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Module
Imports System.Data.OleDb
Public Objetdatatable As DataTable
La fonction de chaque formulaire
Sub reservation()
Try
strsql = "select * from reservation"
cmd = New OleDbCommand(strsql)
Objetdataadapter = New OleDbDataAdapter(cmd)
cmd.Connection = con
Objetdataadapter.Fill(Objetdataset, "reservation")
Objetdatatable = Objetdataset.Tables("reservation")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
_______________________________________________
Load
Private Sub reservation_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call connect()
Call reservation()
Me.TextBox1.Text = Objetdatatable.Rows(rownumber).Item("nreservation")
Me.TextBox2.Text = Objetdatatable.Rows(rownumber).Item("villedepart")
Me.TextBox3.Text = Objetdatatable.Rows(rownumber).Item("villearrivee")
Me.TextBox4.Text = Objetdatatable.Rows(rownumber).Item("datedepart")
Me.TextBox5.Text = Objetdatatable.Rows(rownumber).Item("montant")
DataGridView2.DataSource = Objetdataset
DataGridView2.DataMember = "reservation"
End Sub
______________________________________________
SUIVANT:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call connect()
If rownumber = Objetdatatable.Rows.Count - 1 Then
MsgBox("dernier enregistrement")
Else
rownumber += 1
Me.TextBox1.Text = Objetdatatable.Rows(rownumber).Item("nreservation")
Me.TextBox2.Text = Objetdatatable.Rows(rownumber).Item("villedepart")
Me.TextBox3.Text = Objetdatatable.Rows(rownumber).Item("villearrivee")
Me.TextBox4.Text = Objetdatatable.Rows(rownumber).Item("datedepart")
Me.TextBox5.Text = Objetdatatable.Rows(rownumber).Item("montant")
End If
End Sub
_______________________________________________
PRECEDENT:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Call connect()
If rownumber = 0 Then
MsgBox("premier enregistrement")
Else
rownumber -= 1
Me.TextBox1.Text = Objetdatatable.Rows(rownumber).Item("nreservation")
Me.TextBox2.Text = Objetdatatable.Rows(rownumber).Item("villedepart")
Me.TextBox3.Text = Objetdatatable.Rows(rownumber).Item("villearrivee")
Me.TextBox4.Text = Objetdatatable.Rows(rownumber).Item("datedepart")
Me.TextBox5.Text = Objetdatatable.Rows(rownumber).Item("montant")
End If
End Sub
_______________________________________________
NOUVEAU:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
End Sub
_______________________________________________
ENREGISTRER:
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Call connect()
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = "" Or TextBox5.Text = "" Then
MsgBox("remplir tous les champs")
Else
Objetdatarow = Objetdataset.Tables("reservation").NewRow()
Objetdatarow("nreservation") = Me.TextBox1.Text
Objetdatarow("villedepart") = Me.TextBox2.Text
Objetdatarow("villearrivee") = Me.TextBox3.Text
Objetdatarow("datedepart") = Me.TextBox4.Text
Objetdatarow("montant") = Me.TextBox5.Text
Objetdataset.Tables("reservation").Rows.Add(Objetdatarow)
Objetcommandbuilder = New OleDbCommandBuilder(Objetdataadapter)
Objetdataadapter.Update(Objetdataset, "reservation")
Objetdataset.Clear()
Objetdataadapter.Fill(Objetdataset, "reservation")
Objetdatatable = Objetdataset.Tables("reservation")
MsgBox("enregistrement effectuées")
End If
End Sub
_______________________________________________
FERMER:
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Me.Close()
End Sub
_______________________________________________
Supprimer
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Call connect()
Objetdataset.Tables("reservation").Rows(rownumber).Delete()
Objetcommandbuilder = New OleDbCommandBuilder(Objetdataadapter)
Objetdataadapter.Update(Objetdataset, "reservation")
MsgBox("suppression effectué")
End Sub
MODIFIER:
Private Sub
Button7_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
Button7.ClickCall connect()
Objetdatarow = Objetdataset.Tables("client").Rows(rownumber)
Objetdatarow("nreservation") = Me.TextBox1.Text
Objetdatarow("villedepart") = Me.TextBox2.Text
Objetdatarow("villearrivee") = Me.TextBox3.Text
Objetdatarow("datedepart") = Me.TextBox4.Text
Objetdatarow("montant") = Me.TextBox5.Text
Objetcommandbuilder = New OleDbCommandBuilder(Objetdataadapter)
Objetdataadapter.Update(Objetdataset, "client")
Objetdataset.Clear()
Objetdataadapter.Fill(Objetdataset, "client")
Objetdatatable = Objetdataset.Tables("client")
MsgBox("modification effectués")
End Sub
RECHERCHER
Private Sub
Button8_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
Button8.ClickCall connect()
Call reservation()
Dim cmd As New OleDbCommand("select * from reservation where [code] like '%" & txtSearch.Text & "%'")
cmd.Connection = con
Dim da As New OleDbDataAdapter
da.SelectCommand = cmd
Dim ds As New DataSet
da.Fill(ds, "client")
dtg1.DataSource = ds.Tables("client")
con.Close()
End Sub
End Class
___________________________________________
MODULE
Imports System.Data.OleDb
Imports System.Data
Module Module1
Public con As New OleDbConnection()
Public cmd As OleDbCommand
Public Objetdataadapter As OleDbDataAdapter
Public Objetdataset As New DataSet()
Public strsql As String
Public Objetdatatable As DataTable
Public Objetdatarow As DataRow
Public rownumber As Integer
Public Objetcommandbuilder As OleDbCommandBuilder
Public Objetdatatable1 As DataTable
Public Sub connect()
Try
con = New OleDbConnection()
con.ConnectionString = "provider=Microsoft.ace.OLEDB.12.0;" & "Data Source =C:\Users\user\Desktop\pri.accdb;"
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Module
un blog pour le partage d'un ensemble de solutions professionnelles dans le domaine technologique
Tous les droits sont résérvés à solutions professionnelles 2020 | Privacy-Policy | Réglement |