SlideShare une entreprise Scribd logo
1  sur  4
Ahmad Mustaqim | 12100408 1
                                                                                Rental_mobil

                                           txtharga_sewa.Text = ""

                                           txtlama.Text = ""

                                           txttotal.Text = "0"

                                           End Sub

                                           Sub nonaktif()

                                           txtsewa.Enabled = False

                                           txtkdpeminjam.Enabled = False

                                           txtnama_peminjam.Enabled = False

                                           cmbtipe.Enabled = False

                                           txtharga_sewa.Enabled = False

MODUL                                      txtlama.Enabled = False

Public dbado As New ADODB.Connection       txttotal.Enabled = False

Public rssewa As New ADODB.Recordset       binputlain.Enabled = False

Public rspeminjam As New ADODB.Recordset   bsave.Enabled = False

Public rsdetail As New ADODB.Recordset     bcancel.Enabled = False

Public Sub koneksi()                       End Sub

If dbado.State = adStateOpen Then          Sub aktif()

dbado.Close                                txtsewa.Enabled = True

End If                                     txtkdpeminjam.Enabled = True

dbado.ConnectionString =                   txtnama_peminjam.Enabled = True
"provider=msdasql.1;persist security
                                           cmbtipe.Enabled = True
info=false;data source=rental_mobil"
                                           txtharga_sewa.Enabled = True
dbado.Open
                                           txtlama.Enabled = True
End Sub
                                           txttotal.Enabled = True
LISTING
                                           binputlain.Enabled = True
Sub bersih()
                                           bsave.Enabled = True
txtsewa.Text = ""
                                           bcancel.Enabled = True
txtkdpeminjam.Text = ""
                                           End Sub
txtnama_peminjam.Text = ""
                                           Sub tabel()
cmbtipe.Text = ""
                                           Grid1.ColWidth(0) = 126
Ahmad Mustaqim | 12100408 2
                                                                                    Rental_mobil

Grid1.ColWidth(1) = 900                          sqldel = "delete from detail_sewa where
                                                 no_sewa='" &txtsewa.Text& "'"
Grid1.ColWidth(2) = 900
                                                 Set rsdetail = dbado.Execute(sqldel, , adCmdText)
Grid1.ColWidth(3) = 900
                                                 tabel
Grid1.ColWidth(4) = 900
                                                 nonaktif
sqltabel = "select*from detail_sewa"
                                                 bersih
Set rsdetail = dbado.Execute(sqltabel, ,
adCmdText)                                       End Sub

Set Grid1.DataSource = rsdetail

End Sub                                          Private Sub bclose_Click()

Sub no()                                         X = MsgBox("yakinmaukeluar form?", vbYesNo,
                                                 "konfirmasi")
Dim sqlno, a, b As String
                                                 If X = vbYes Then
sqlno = "select * from sewa"
                                                 End
Set rssewa = dbado.Execute(sqlno, , adCmdText)
                                                 End If
If rssewa.BOFAndrssewa.EOF Then
                                                 End Sub
txtsewa.Text = "W" &Format(Date, "yymm") &
"001"                                            Private Sub binputlain_Click()

Else                                             sqlsv = "insert into detail_sewa()values('"
                                                 &txtsewa.Text& "','" &cmbtipe.Text& "','"
a=0                                              &txtlama.Text& "','" &txtharga_sewa.Text& "')"
rssewa.MoveFirst                                 Set rsdetail = dbado.Execute(sqlsv, , adCmdText)
Do Until rssewa.EOF                              cmbtipe.Text = ""
a=a+1                                            txtharga_sewa.Text = ""
rssewa.MoveNext                                  txtlama.Text = ""
Loop                                             cmbtipe.SetFocus
a=a+1                                            tabel
b = Len(Str(a))                                  End Sub
txtsewa.Text = "W" &Format(Date, "yymm") &
Mid$("000", 1, 4 - b) & a
                                                 Private Sub bnew_Click()
End If
                                                 aktif
End Sub
                                                 bersih

                                                 no
Private Sub bcancel_Click()
Ahmad Mustaqim | 12100408 3
                                                                                      Rental_mobil

txtkdpeminjam.SetFocus                             If cmbtipe.ListIndex = 1 Then

End Sub                                            ck = "select no_sewa from detail_sewa where
                                                   no_sewa='" &txtsewa.Text& "' and tipe_mobil='"
                                                   &cmbtipe.Text& "'"
Private Sub bsave_Click()                          Set rsdetail = dbado.Execute(ck, , adCmdText)
sqlsave = "insert into sewa()values('"               If rsdetail.BOFAndrsdetail.EOF Then
&txtsewa.Text& "','" &lbltanggal.Caption& "','"
&txttotal.Text& "','" &txtkdpeminjam.Text& "')"    txtharga_sewa.Text = "300000"

Set rssewa = dbado.Execute(sqlsave, ,              txtlama.SetFocus
adCmdText)
                                                     Else
sqlsv = "insert into detail_sewa()values('"
&txtsewa.Text& "','" &cmbtipe.Text& "','"          MsgBox " TIPE '" &cmbtipe.Text& "' SUDAH
&txtlama.Text& "','" &txtharga_sewa.Text& "')"     DIPESAN!"

Set rsdetail = dbado.Execute(sqlsv, , adCmdText)   txtharga_sewa.Text = ""

tabel                                              cmbtipe.SetFocus

nonaktif                                             End If

bersih                                             Else

End Sub                                            If cmbtipe.ListIndex = 2 Then

Private Sub cmbtipe_Click()                        ck = "select no_sewa from detail_sewa where
                                                   no_sewa='" &txtsewa.Text& "' and tipe_mobil='"
If cmbtipe.ListIndex = 0 Then                      &cmbtipe.Text& "'"

ck = "select no_sewa from detail_sewa where        Set rsdetail = dbado.Execute(ck, , adCmdText)
no_sewa='" &txtsewa.Text& "' and tipe_mobil='"
&cmbtipe.Text& "'"                                   If rsdetail.BOFAndrsdetail.EOF Then

Set rsdetail = dbado.Execute(ck, , adCmdText)      txtharga_sewa.Text = "500000"

  If rsdetail.BOFAndrsdetail.EOF Then              txtlama.SetFocus

txtharga_sewa.Text = "400000"                        Else

txtlama.SetFocus                                   MsgBox " TIPE '" &cmbtipe.Text& "' SUDAH
                                                   DIPESAN!"
  Else
                                                   txtharga_sewa.Text = ""
MsgBox " TIPE '" &cmbtipe.Text& "' SUDAH
DIPESAN!"                                          cmbtipe.SetFocus

txtharga_sewa.Text = ""                              End If

cmbtipe.SetFocus                                   End If

  End If                                           End If

Else                                               End If
Ahmad Mustaqim | 12100408 4
                                                                                     Rental_mobil

End Sub                                           Private Sub txtlama_Change()

                                                  txttotal.Text = (Val(txtharga_sewa.Text) *
                                                  Val(txtlama.Text)) + Val(txttotal.Text)
Private Sub Form_Activate()
                                                  End Sub
nonaktif

lbltanggal.Caption = Format(Date, "yyyy-mm-dd")

tabel

cmbtipe.AddItem ("inova")

cmbtipe.AddItem ("avanza")

cmbtipe.AddItem ("city")

End Sub



Private Sub Form_Load()

koneksi

End Sub



Private Sub txtkdpeminjam_OnEnter()

sqlkd = "select*from peminjam where
kd_peminjam='" &txtkdpeminjam.Text& "'"

Set rspeminjam = dbado.Execute(sqlkd, ,
adCmdText)

If rspeminjam.BOFAndrspeminjam.EOF Then

MsgBox "KODE '" &txtkdpeminjam.Text& "'
BelumTerdaftar"

txtkdpeminjam.Text = ""

txtkdpeminjam.SetFocus

Else

txtnama_peminjam.Text = rspeminjam!nama

cmbtipe.SetFocus

End If

End Sub

Contenu connexe

Tendances

Fabric.js @ Falsy Values
Fabric.js @ Falsy ValuesFabric.js @ Falsy Values
Fabric.js @ Falsy ValuesJuriy Zaytsev
 
The Ring programming language version 1.7 book - Part 32 of 196
The Ring programming language version 1.7 book - Part 32 of 196The Ring programming language version 1.7 book - Part 32 of 196
The Ring programming language version 1.7 book - Part 32 of 196Mahmoud Samir Fayed
 
Google App Engine Developer - Day3
Google App Engine Developer - Day3Google App Engine Developer - Day3
Google App Engine Developer - Day3Simon Su
 
Heap Hand note
Heap Hand noteHeap Hand note
Heap Hand noteAbdur Rouf
 
20110514 mongo dbチューニング
20110514 mongo dbチューニング20110514 mongo dbチューニング
20110514 mongo dbチューニングYuichi Matsuo
 
Refactoring in AS3
Refactoring in AS3Refactoring in AS3
Refactoring in AS3Eddie Kao
 
Hands on Data Grids - Stephen Milidge
Hands on Data Grids - Stephen MilidgeHands on Data Grids - Stephen Milidge
Hands on Data Grids - Stephen MilidgeJAXLondon2014
 
みんなで Swift 復習会 GO! in 福岡・発表資料
みんなで Swift 復習会 GO! in 福岡・発表資料みんなで Swift 復習会 GO! in 福岡・発表資料
みんなで Swift 復習会 GO! in 福岡・発表資料Tomohiro Kumagai
 
Typescript - why it's awesome
Typescript - why it's awesomeTypescript - why it's awesome
Typescript - why it's awesomePiotr Miazga
 
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...JAX London
 
はじめてのMongoDB
はじめてのMongoDBはじめてのMongoDB
はじめてのMongoDBTakahiro Inoue
 
Coffee Scriptでenchant.js
Coffee Scriptでenchant.jsCoffee Scriptでenchant.js
Coffee Scriptでenchant.jsNaoyuki Totani
 
Qtp+real time+test+script
Qtp+real time+test+scriptQtp+real time+test+script
Qtp+real time+test+scriptRamu Palanki
 
[PHP] Zend_Db (Zend Framework)
[PHP] Zend_Db (Zend Framework)[PHP] Zend_Db (Zend Framework)
[PHP] Zend_Db (Zend Framework)Jun Shimizu
 

Tendances (19)

Corona sdk
Corona sdkCorona sdk
Corona sdk
 
Rspec and Rails
Rspec and RailsRspec and Rails
Rspec and Rails
 
Fabric.js @ Falsy Values
Fabric.js @ Falsy ValuesFabric.js @ Falsy Values
Fabric.js @ Falsy Values
 
The Ring programming language version 1.7 book - Part 32 of 196
The Ring programming language version 1.7 book - Part 32 of 196The Ring programming language version 1.7 book - Part 32 of 196
The Ring programming language version 1.7 book - Part 32 of 196
 
Google App Engine Developer - Day3
Google App Engine Developer - Day3Google App Engine Developer - Day3
Google App Engine Developer - Day3
 
Heap Hand note
Heap Hand noteHeap Hand note
Heap Hand note
 
20110514 mongo dbチューニング
20110514 mongo dbチューニング20110514 mongo dbチューニング
20110514 mongo dbチューニング
 
Refactoring in AS3
Refactoring in AS3Refactoring in AS3
Refactoring in AS3
 
Hands on Data Grids - Stephen Milidge
Hands on Data Grids - Stephen MilidgeHands on Data Grids - Stephen Milidge
Hands on Data Grids - Stephen Milidge
 
みんなで Swift 復習会 GO! in 福岡・発表資料
みんなで Swift 復習会 GO! in 福岡・発表資料みんなで Swift 復習会 GO! in 福岡・発表資料
みんなで Swift 復習会 GO! in 福岡・発表資料
 
Typescript - why it's awesome
Typescript - why it's awesomeTypescript - why it's awesome
Typescript - why it's awesome
 
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
 
はじめてのMongoDB
はじめてのMongoDBはじめてのMongoDB
はじめてのMongoDB
 
Coffee Scriptでenchant.js
Coffee Scriptでenchant.jsCoffee Scriptでenchant.js
Coffee Scriptでenchant.js
 
Prototype UI Intro
Prototype UI IntroPrototype UI Intro
Prototype UI Intro
 
Qtp+real time+test+script
Qtp+real time+test+scriptQtp+real time+test+script
Qtp+real time+test+script
 
Python002
Python002Python002
Python002
 
Disruptor
DisruptorDisruptor
Disruptor
 
[PHP] Zend_Db (Zend Framework)
[PHP] Zend_Db (Zend Framework)[PHP] Zend_Db (Zend Framework)
[PHP] Zend_Db (Zend Framework)
 

Similaire à Rental

Visual Studio.Net - Sql Server
Visual Studio.Net - Sql ServerVisual Studio.Net - Sql Server
Visual Studio.Net - Sql ServerDarwin Durand
 
Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]testduser1
 
Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]User1test
 
The Ring programming language version 1.8 book - Part 34 of 202
The Ring programming language version 1.8 book - Part 34 of 202The Ring programming language version 1.8 book - Part 34 of 202
The Ring programming language version 1.8 book - Part 34 of 202Mahmoud Samir Fayed
 
High Performance Core Data
High Performance Core DataHigh Performance Core Data
High Performance Core DataMatthew Morey
 
The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 31 of 189
The Ring programming language version 1.6 book - Part 31 of 189The Ring programming language version 1.6 book - Part 31 of 189
The Ring programming language version 1.6 book - Part 31 of 189Mahmoud Samir Fayed
 
Lampiran source code
Lampiran source codeLampiran source code
Lampiran source codeancunk
 
The Ring programming language version 1.5.2 book - Part 28 of 181
The Ring programming language version 1.5.2 book - Part 28 of 181The Ring programming language version 1.5.2 book - Part 28 of 181
The Ring programming language version 1.5.2 book - Part 28 of 181Mahmoud Samir Fayed
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryDatabricks
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryDatabricks
 
The Ring programming language version 1.5.1 book - Part 27 of 180
The Ring programming language version 1.5.1 book - Part 27 of 180The Ring programming language version 1.5.1 book - Part 27 of 180
The Ring programming language version 1.5.1 book - Part 27 of 180Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 18 of 84
The Ring programming language version 1.2 book - Part 18 of 84The Ring programming language version 1.2 book - Part 18 of 84
The Ring programming language version 1.2 book - Part 18 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 20 of 88
The Ring programming language version 1.3 book - Part 20 of 88The Ring programming language version 1.3 book - Part 20 of 88
The Ring programming language version 1.3 book - Part 20 of 88Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 48 of 84
The Ring programming language version 1.2 book - Part 48 of 84The Ring programming language version 1.2 book - Part 48 of 84
The Ring programming language version 1.2 book - Part 48 of 84Mahmoud Samir Fayed
 

Similaire à Rental (20)

Kursus
KursusKursus
Kursus
 
Visual Studio.Net - Sql Server
Visual Studio.Net - Sql ServerVisual Studio.Net - Sql Server
Visual Studio.Net - Sql Server
 
Kode vb.net
Kode vb.netKode vb.net
Kode vb.net
 
Kode vb.net
Kode vb.netKode vb.net
Kode vb.net
 
Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]
 
Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]Adodb Scripts And Some Sample Scripts[1]
Adodb Scripts And Some Sample Scripts[1]
 
The Ring programming language version 1.8 book - Part 34 of 202
The Ring programming language version 1.8 book - Part 34 of 202The Ring programming language version 1.8 book - Part 34 of 202
The Ring programming language version 1.8 book - Part 34 of 202
 
High Performance Core Data
High Performance Core DataHigh Performance Core Data
High Performance Core Data
 
The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84The Ring programming language version 1.2 book - Part 79 of 84
The Ring programming language version 1.2 book - Part 79 of 84
 
The Ring programming language version 1.6 book - Part 31 of 189
The Ring programming language version 1.6 book - Part 31 of 189The Ring programming language version 1.6 book - Part 31 of 189
The Ring programming language version 1.6 book - Part 31 of 189
 
Lampiran source code
Lampiran source codeLampiran source code
Lampiran source code
 
The Ring programming language version 1.5.2 book - Part 28 of 181
The Ring programming language version 1.5.2 book - Part 28 of 181The Ring programming language version 1.5.2 book - Part 28 of 181
The Ring programming language version 1.5.2 book - Part 28 of 181
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
 
JavaScript Refactoring
JavaScript RefactoringJavaScript Refactoring
JavaScript Refactoring
 
The Ring programming language version 1.5.1 book - Part 27 of 180
The Ring programming language version 1.5.1 book - Part 27 of 180The Ring programming language version 1.5.1 book - Part 27 of 180
The Ring programming language version 1.5.1 book - Part 27 of 180
 
The Ring programming language version 1.2 book - Part 18 of 84
The Ring programming language version 1.2 book - Part 18 of 84The Ring programming language version 1.2 book - Part 18 of 84
The Ring programming language version 1.2 book - Part 18 of 84
 
The Ring programming language version 1.3 book - Part 20 of 88
The Ring programming language version 1.3 book - Part 20 of 88The Ring programming language version 1.3 book - Part 20 of 88
The Ring programming language version 1.3 book - Part 20 of 88
 
The Ring programming language version 1.2 book - Part 48 of 84
The Ring programming language version 1.2 book - Part 48 of 84The Ring programming language version 1.2 book - Part 48 of 84
The Ring programming language version 1.2 book - Part 48 of 84
 
Assist9 bmis
Assist9 bmisAssist9 bmis
Assist9 bmis
 

Dernier

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 

Dernier (20)

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

Rental

  • 1. Ahmad Mustaqim | 12100408 1 Rental_mobil txtharga_sewa.Text = "" txtlama.Text = "" txttotal.Text = "0" End Sub Sub nonaktif() txtsewa.Enabled = False txtkdpeminjam.Enabled = False txtnama_peminjam.Enabled = False cmbtipe.Enabled = False txtharga_sewa.Enabled = False MODUL txtlama.Enabled = False Public dbado As New ADODB.Connection txttotal.Enabled = False Public rssewa As New ADODB.Recordset binputlain.Enabled = False Public rspeminjam As New ADODB.Recordset bsave.Enabled = False Public rsdetail As New ADODB.Recordset bcancel.Enabled = False Public Sub koneksi() End Sub If dbado.State = adStateOpen Then Sub aktif() dbado.Close txtsewa.Enabled = True End If txtkdpeminjam.Enabled = True dbado.ConnectionString = txtnama_peminjam.Enabled = True "provider=msdasql.1;persist security cmbtipe.Enabled = True info=false;data source=rental_mobil" txtharga_sewa.Enabled = True dbado.Open txtlama.Enabled = True End Sub txttotal.Enabled = True LISTING binputlain.Enabled = True Sub bersih() bsave.Enabled = True txtsewa.Text = "" bcancel.Enabled = True txtkdpeminjam.Text = "" End Sub txtnama_peminjam.Text = "" Sub tabel() cmbtipe.Text = "" Grid1.ColWidth(0) = 126
  • 2. Ahmad Mustaqim | 12100408 2 Rental_mobil Grid1.ColWidth(1) = 900 sqldel = "delete from detail_sewa where no_sewa='" &txtsewa.Text& "'" Grid1.ColWidth(2) = 900 Set rsdetail = dbado.Execute(sqldel, , adCmdText) Grid1.ColWidth(3) = 900 tabel Grid1.ColWidth(4) = 900 nonaktif sqltabel = "select*from detail_sewa" bersih Set rsdetail = dbado.Execute(sqltabel, , adCmdText) End Sub Set Grid1.DataSource = rsdetail End Sub Private Sub bclose_Click() Sub no() X = MsgBox("yakinmaukeluar form?", vbYesNo, "konfirmasi") Dim sqlno, a, b As String If X = vbYes Then sqlno = "select * from sewa" End Set rssewa = dbado.Execute(sqlno, , adCmdText) End If If rssewa.BOFAndrssewa.EOF Then End Sub txtsewa.Text = "W" &Format(Date, "yymm") & "001" Private Sub binputlain_Click() Else sqlsv = "insert into detail_sewa()values('" &txtsewa.Text& "','" &cmbtipe.Text& "','" a=0 &txtlama.Text& "','" &txtharga_sewa.Text& "')" rssewa.MoveFirst Set rsdetail = dbado.Execute(sqlsv, , adCmdText) Do Until rssewa.EOF cmbtipe.Text = "" a=a+1 txtharga_sewa.Text = "" rssewa.MoveNext txtlama.Text = "" Loop cmbtipe.SetFocus a=a+1 tabel b = Len(Str(a)) End Sub txtsewa.Text = "W" &Format(Date, "yymm") & Mid$("000", 1, 4 - b) & a Private Sub bnew_Click() End If aktif End Sub bersih no Private Sub bcancel_Click()
  • 3. Ahmad Mustaqim | 12100408 3 Rental_mobil txtkdpeminjam.SetFocus If cmbtipe.ListIndex = 1 Then End Sub ck = "select no_sewa from detail_sewa where no_sewa='" &txtsewa.Text& "' and tipe_mobil='" &cmbtipe.Text& "'" Private Sub bsave_Click() Set rsdetail = dbado.Execute(ck, , adCmdText) sqlsave = "insert into sewa()values('" If rsdetail.BOFAndrsdetail.EOF Then &txtsewa.Text& "','" &lbltanggal.Caption& "','" &txttotal.Text& "','" &txtkdpeminjam.Text& "')" txtharga_sewa.Text = "300000" Set rssewa = dbado.Execute(sqlsave, , txtlama.SetFocus adCmdText) Else sqlsv = "insert into detail_sewa()values('" &txtsewa.Text& "','" &cmbtipe.Text& "','" MsgBox " TIPE '" &cmbtipe.Text& "' SUDAH &txtlama.Text& "','" &txtharga_sewa.Text& "')" DIPESAN!" Set rsdetail = dbado.Execute(sqlsv, , adCmdText) txtharga_sewa.Text = "" tabel cmbtipe.SetFocus nonaktif End If bersih Else End Sub If cmbtipe.ListIndex = 2 Then Private Sub cmbtipe_Click() ck = "select no_sewa from detail_sewa where no_sewa='" &txtsewa.Text& "' and tipe_mobil='" If cmbtipe.ListIndex = 0 Then &cmbtipe.Text& "'" ck = "select no_sewa from detail_sewa where Set rsdetail = dbado.Execute(ck, , adCmdText) no_sewa='" &txtsewa.Text& "' and tipe_mobil='" &cmbtipe.Text& "'" If rsdetail.BOFAndrsdetail.EOF Then Set rsdetail = dbado.Execute(ck, , adCmdText) txtharga_sewa.Text = "500000" If rsdetail.BOFAndrsdetail.EOF Then txtlama.SetFocus txtharga_sewa.Text = "400000" Else txtlama.SetFocus MsgBox " TIPE '" &cmbtipe.Text& "' SUDAH DIPESAN!" Else txtharga_sewa.Text = "" MsgBox " TIPE '" &cmbtipe.Text& "' SUDAH DIPESAN!" cmbtipe.SetFocus txtharga_sewa.Text = "" End If cmbtipe.SetFocus End If End If End If Else End If
  • 4. Ahmad Mustaqim | 12100408 4 Rental_mobil End Sub Private Sub txtlama_Change() txttotal.Text = (Val(txtharga_sewa.Text) * Val(txtlama.Text)) + Val(txttotal.Text) Private Sub Form_Activate() End Sub nonaktif lbltanggal.Caption = Format(Date, "yyyy-mm-dd") tabel cmbtipe.AddItem ("inova") cmbtipe.AddItem ("avanza") cmbtipe.AddItem ("city") End Sub Private Sub Form_Load() koneksi End Sub Private Sub txtkdpeminjam_OnEnter() sqlkd = "select*from peminjam where kd_peminjam='" &txtkdpeminjam.Text& "'" Set rspeminjam = dbado.Execute(sqlkd, , adCmdText) If rspeminjam.BOFAndrspeminjam.EOF Then MsgBox "KODE '" &txtkdpeminjam.Text& "' BelumTerdaftar" txtkdpeminjam.Text = "" txtkdpeminjam.SetFocus Else txtnama_peminjam.Text = rspeminjam!nama cmbtipe.SetFocus End If End Sub