Você está na página 1de 10

EXNO: 11 FOREIGN TRADING SYSTEM

PROBLEM STATEMENT

Foreign Trading System is a system in which the company can import products in an
efficient manner. This system has features as described in the next section. FTS has products
such as mobile phones, desktop computers and laptops. Any company around the globe can place
order in FTS. User should register before placing the order. Credit card is the only mode of
payment. The ordered products will reach the customer within four working days.

DATABASE DESIGN

REGISTER TABLE

CURRENCY TABLE
FOREIGN TRADING SYSTEM

UML DIAGRAMS

USECASE DIAGRAM

search product

trade databasee

set quantity

pay money admin

user

transportation

supplier
product issue

delivery

CLASS DIAGRAM

SEQUENCE DIAGRAM
user admin database supplier

1: search product

2: select product

3: set quantity

4: give money

5: transportation

6: issue product

7: deliver the product


STATE CHART DIAGRAM

search set give money issue transportati delivery


select
product product quantity product on

LAYERED ARCHITECTURE DIAGRAM


MODULE

Global db As New ADODB.Connection


Global rs As New ADODB.Recordset
Global user As String

MDI FORM
Private Sub mnulogin_Click()
Form2.Show
End Sub
Private Sub mnuregister_Click()
Form1.Show
End Sub

FORM1 (REGISTRATION)
Private Sub cmdregister_Click()
query = "insert into
register(name1,country,username1,password1,item1,price1,item2,price2,item3,price3)values('"
& txtname1 & "','" & txtcountry & "','" & txtusername1 & "','" & txtpassword1 & "','" & txtitem1
& "'," & txtprice1 & ",'" & txtitem2 & "'," & txtprice2 & ",'" & txtitem3 & "'," & txtprice3 & ")"
db.Execute (query)
MsgBox ("registered successfully")
End Sub
Private Sub Form_Load()
db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=Z:\CaseTools\foreign\fts\fts.mdb;Persist Security Info = False"
db.Open
End Sub

FORM2 (LOGIN)
Dim query As String
Private Sub cmdlogin_Click()
query = "select * from register where username1='" & txtusername1 & "' and password1 ='" &
txtpassword1 & "'"
Set rs = db.Execute(query)
If Not rs.EOF Then
user = rs(1)
rs.Close
Form5.Show
Else
MsgBox ("Invalid username or password")
txtusername1.SetFocus
End If
End Sub
FORM5 (SELECTION)
Private Sub cmdExp_Click()
Form4.Show
End Sub
Private Sub cmdImp_Click()
Form3.Show
End Sub

FORM3 (IMPORT)
Dim company
Dim price4 As Integer
Dim price5 As Integer
Dim a As Integer
Dim b As Integer
Dim c As Integer
Private Sub cmdimport_Click()
Dim qty As Integer
Dim inv As Integer
qty = txtquantity
inv = qty * txtprice2
txtinvoice = inv
End Sub
Private Sub cmdok_Click()
query = "select * from currency1 where curr= '" & txtcurrency1.Text & "'"
Set rs1 = db.Execute(query)
'curr2 = Val(cmbcurr.Text)
price4 = Val(txtprice1)
a = rs1(1)
b = rs1(2)
c = rs1(3)
If cmbcurr.Text = "rupees" Then
price5 = price4 * a
ElseIf cmbcurr.Text = "dollar" Then
price5 = price4 * b
ElseIf cmbcurr.Text = "euro" Then
price5 = price4 * b
End If
txtprice2 = price5
rs1.Close
End Sub
Private Sub Form_Load()
loadcompany
End Sub
Private Sub lstcompany_Click()
Dim i As Integer
i = lstcompany.ListIndex
company = lstcompany.List(i)
loaditem
End Sub

Private Sub lstitem_Click()


Dim i As Integer
i = lstitem.ListIndex
item = lstitem.List(i)
dispitemdetails (lstitem.List(i))
End Sub
Public Sub loadcompany()
query = "select * from register"
Set rs = db.Execute(query)
Dim i As Integer
i=0
While (Not rs.EOF)
lstcompany.AddItem (rs("name1"))
rs.MoveNext
Wend
End Sub
Public Sub loaditem()
query = "select * from register where name1= '" & company & "'"
Set rs = db.Execute(query)
lstitem.AddItem (rs("item1"))
lstitem.AddItem (rs("item2"))
lstitem.AddItem (rs("item3"))
rs.Close
End Sub
Public Sub dispitemdetails(item As String)
Dim price
query = "select * from register where name1= '" & company & "'"
Set rs = db.Execute(query)
If item = rs("item1") Then
price = rs("price1")
ElseIf item = rs("item2") Then
price = rs("price2")
ElseIf item = rs("item3") Then
price = rs("price3")
End If
txtcompany = rs("name1")
txtitem = item
txtprice1 = price
txtcurrency1 = rs("currency")
rs.Close
End Sub

FORM4 (EXPORT)
Dim company
Dim price4 As Integer
Dim price5 As Integer
Dim a As Integer
Dim b As Integer
Dim c As Integer
Private Sub cmdexport_Click()
Dim qty As Integer
Dim inv As Integer
qty = txtquantity
inv = qty * txtprice2
txtinvoice = inv
End Sub
Private Sub cmdok_Click()
query = "select * from currency1 where curr= '" & txtcurrency1.Text & "'"
Set rs1 = db.Execute(query)
'curr2 = Val(cmbcurr.Text)
price4 = Val(txtprice1)
a = rs1(1)
b = rs1(2)
c = rs1(3)
If cmbcurr.Text = "rupees" Then
price5 = price4 * a
ElseIf cmbcurr.Text = "dollar" Then
price5 = price4 * b
ElseIf cmbcurr.Text = "euro" Then
price5 = price4 * b
End If
txtprice2 = price5
rs1.Close
End Sub
Private Sub Form_Load()
loadcompany
End Sub
Private Sub lstcompany_Click()
Dim i As Integer
i = lstcompany.ListIndex
company = lstcompany.List(i)
loaditem
End Sub
Private Sub lstitem_Click()
Dim i As Integer
i = lstitem.ListIndex
item = lstitem.List(i)
dispitemdetails (lstitem.List(i))
End Sub
Public Sub loadcompany()
query = "select * from register"
Set rs = db.Execute(query)
Dim i As Integer
i=0
While (Not rs.EOF)
lstcompany.AddItem (rs("name1"))
rs.MoveNext
Wend
End Sub
Public Sub loaditem()
query = "select * from register where name1= '" & company & "'"
Set rs = db.Execute(query)
lstitem.AddItem (rs("item1"))
lstitem.AddItem (rs("item2"))
lstitem.AddItem (rs("item3"))
rs.Close
End Sub
Public Sub dispitemdetails(item As String)
Dim price
query = "select * from register where name1= '" & company & "'"
Set rs = db.Execute(query)
If item = rs("item1") Then
price = rs("price1")
ElseIf item = rs("item2") Then
price = rs("price2")
ElseIf item = rs("item3") Then
price = rs("price3")
End If
txtcompany = rs("name1")
txtitem = item
txtprice1 = price
txtcurrency1 = rs("currency")
rs.Close
End Sub
OUTPUT

MDI FORM LOGIN FORM

REGISTRATION FORM

SELECTION FORM
IMPORT FORM

EXPORT FORM:

Você também pode gostar