TUGAS
Program Rumus ABC dengan SQL DataBase Program Komputer Universitas Sriwijaya Teknik Pertambangan
Nama
: Febby Pratama Hasbullah
Nim
: 03021381621086
Jurusan
: Teknik Pertambangan
Kampus
: Indralaya
JURUSAN TEKNIK PERTAMBANGAN FAKULTAS TEKNIK UNIVERSITAS SRIWIJAYA 2018
UJI COBA PROGRAM Form 1 Membuat Data :
Tombol menuju Form mencari Data Tombol Hasil X1,X2,D
Tombol Hapus A,B,C,X1,X2,D
Tombol Save Data
SQL Access :
Koding Form 1 : Membuat Data PublicClassForm1 PrivateSub Table1BindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Table1BindingNavigatorSaveItem.Click Me.Validate() Me.Table1BindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.Database1dataset) EndSub
PrivateSub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load 'TODO: This line of code loads data into the 'Tugas_SqlDataSet.Table1' table. You can move, or remove it, as needed. Me.Table1TableAdapter.Fill(Me.DataBase1DataSet.Table1) EndSub PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try Dim a, b, c AsDouble a = ATextBox.Text b = BTextBox.Text c = CTextBox.Text X1TextBox.Text = (-(b) + (Math.Sqrt((b * b) - (4 * a * c)))) / 2 * a X2TextBox.Text = (-(b) - (Math.Sqrt((b * b) - (4 * a * c)))) / 2 * a DTextBox.Text = (b * b) - (4 * a * c) Catch ex AsException MsgBox("Isikan data", vbInformation, "Perhatian") EndTry EndSub PrivateSub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click X1TextBox.Clear() X2TextBox.Clear() DTextBox.Clear() ATextBox.Clear() BTextBox.Clear() CTextBox.Clear() EndSub PrivateSub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.Hide() Form2.show() EndSub PrivateSub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Close() EndSub EndClass
Form 2 Mencari Data :
Ketik NIM Data Akan Langsung Tampil
Tombol Keluar
Tombol Untuk kembali ke Form Membuat Data
Langkah-Langkah Mencari Data : 1. Masukkan NIM 2. Data akan langsung tampil Koding Form : Mencari Data PublicClassForm2 PrivateSub Table1BindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.Validate() Me.Table1BindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.Database1DataSet) EndSub PrivateSub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load 'TODO: This line of code loads data into the 'Tugas_SqlDataSet.Table1' table. You can move, or remove it, as needed. Me.Table1TableAdapter.Fill(Me.Database1DataSet) EndSub PrivateSub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged Table1BindingSource.Filter = "NIM LIKE'" + TextBox1.Text + "%'" EndSub PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Hide() Form1.Show() EndSub PrivateSub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click MyBase.Finalize() EndSub EndClass