Professional Documents
Culture Documents
APPENDIX
9.1 SCREENSHOT
Login user create
4.6 TABLE DESIGN
TABLE DESIGN
l_id
Login Sup_name
phone
pwd
phn
c_id sup_id
Address
SSSS
Customer Manag Supplier
e
c_id p_id
Billing
s_id
Insert
Sales
rate
Sup_na
me P_wt
Invoice p_name
Purchase
Stock
s_id
pro_id
p_name
P_wt
Production Manag
e
SOURCE CODE
Imports System.Data.SqlClient
Public Class frmLogin
End Sub
End Sub
uName.Value = UserName.Text
uPassword.Value = Password.Text
myCommand.Parameters.Add(uName)
myCommand.Parameters.Add(uPassword)
myCommand.Connection.Open()
If myReader.HasRows Then
myReader.Read()
Login = myReader(Login)
End If
Else
ProgressBar1.Visible = True
ProgressBar1.Maximum = 5000
ProgressBar1.Minimum = 0
ProgressBar1.Value = 4
ProgressBar1.Step = 1
For i = 0 To 5000
ProgressBar1.PerformStep()
Next
FrmMain.ToolStripStatusLabel2.Text = UserName.Text
Me.Hide()
FrmMain.Show()
End If
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
End Try
End Sub
If Len(Trim(B_Address.Text)) = 0 Then
MessageBox.Show("Please enter address", "Input Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
B_Address.Focus()
Exit Sub
End If
If Len(Trim(B_City.Text)) = 0 Then
MessageBox.Show("Please enter city", "Input Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
B_City.Focus()
Exit Sub
End If
If Len(Trim(B_State.Text)) = 0 Then
MessageBox.Show("Please select state", "Input Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
B_State.Focus()
Exit Sub
End If
If Len(Trim(B_ZipCode.Text)) = 0 Then
MessageBox.Show("Please enter zip/post code", "Input Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
B_ZipCode.Focus()
Exit Sub
End If
If Len(Trim(S_name.Text)) = 0 Then
MessageBox.Show("Please enter name", "Input Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
S_name.Focus()
Exit Sub
End If
If Len(Trim(S_Address.Text)) = 0 Then
MessageBox.Show("Please enter address", "Input Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
S_Address.Focus()
Exit Sub
End If
If Len(Trim(S_City.Text)) = 0 Then
MessageBox.Show("Please enter city", "Input Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
S_City.Focus()
Exit Sub
End If
If Len(Trim(S_State.Text)) = 0 Then
MessageBox.Show("Please select state", "Input Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
S_State.Focus()
Exit Sub
End If
If Len(Trim(S_ZipCode.Text)) = 0 Then
MessageBox.Show("Please enter zip/post code", "Input Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
S_ZipCode.Focus()
Exit Sub
End If
If Len(Trim(txtMobileNo.Text)) = 0 Then
MessageBox.Show("Please enter mobile no.", "Input Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
txtMobileNo.Focus()
Exit Sub
End If
Try
auto()
con = New SqlConnection(cs)
con.Open()
Dim ct As String = "select customerno from customer where customerno=@find"
If rdr.Read Then
MessageBox.Show("Distributor ID Already Exists", "Input Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)