0% found this document useful (0 votes)
20 views74 pages

Dental Clinic CODE

The document contains a Visual Basic .NET application for a dental clinic management system, featuring user login, password recovery, and role-based access for different users (admin, receptionist, doctor). It includes functionalities for sending verification codes via email, managing patient data, and displaying clinic information. Additionally, it provides a dashboard for tracking financial performance and patient statistics.

Uploaded by

2023-200150
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views74 pages

Dental Clinic CODE

The document contains a Visual Basic .NET application for a dental clinic management system, featuring user login, password recovery, and role-based access for different users (admin, receptionist, doctor). It includes functionalities for sending verification codes via email, managing patient data, and displaying clinic information. Additionally, it provides a dashboard for tracking financial performance and patient statistics.

Uploaded by

2023-200150
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 74

Imports System.Data.

SqlClient

Public Class Login


Private failedAttempts As Integer = 0
Private connectionString As String =
"Server=.\SQLEXPRESS02;Database=DentalDbVb;Integrated
Security=True;Encrypt=False;"

Private Sub LoginBtn_Click(sender As Object, e As EventArgs) Handles


LoginBtn.Click
Dim Username As String = UnnameTb.Text.Trim()
Dim Password As String = PasswordTb.Text.Trim()
If Username = "" Or Password = "" Then
MsgBox("Enter Username and Password")
Return
End If
Try
Using conn As New SqlConnection(connectionString)
Dim query As String = "SELECT Role FROM UserTbl WHERE Username
= @Username AND Password = @Password"
Using cmd As New SqlCommand(query, conn)
cmd.Parameters.Add("@Username", SqlDbType.VarChar).Value =
Username
cmd.Parameters.Add("@Password", SqlDbType.VarChar).Value =
Password

conn.Open()
Dim RoleObj As Object = cmd.ExecuteScalar()

If RoleObj IsNot Nothing AndAlso Not IsDBNull(RoleObj) Then


Dim Role As String = RoleObj.ToString().Trim().ToLower()

Select Case Role


Case "admin"
Me.Hide()
Dim obj As New Admin()
obj.Show()
Case "receptionist"
Me.Hide()
Dim obj As New Receptionist()
obj.Show()
Case "doctor"
Me.Hide()
Dim obj As New Doctor1()
obj.Show()
Case Else
MsgBox("Unknown Role: " & Role & ". Contact administrator.")
End Select

failedAttempts = 0
Else
failedAttempts += 1
If failedAttempts >= 3 Then
MsgBox("Click Forgot Password if forgotten or contact the admin.",
MsgBoxStyle.Information, "Account Locked")
LoginBtn.Enabled = False
Else
MsgBox("Invalid Username or Password!")
End If
End If
End Using
End Using
Catch ex As Exception
MsgBox("An error occurred: " & ex.Message, MsgBoxStyle.Critical, "Error")
End Try
End Sub

Private Sub ForgotBtn_Click(sender As Object, e As EventArgs) Handles


ForgotBtn.Click
Dim ForgetPassword As New Passwordtxb()
ForgetPassword.Show()
Me.Hide()
End Sub

Private Sub lblAbout_Click(sender As Object, e As EventArgs) Handles


lblAbout.Click
Dim aboutForm As New About_Us()
aboutForm.ShowDialog()
End Sub

Private Sub Close_Click(sender As Object, e As EventArgs) Handles Close.Click


Application.Exit()
End Sub

Private Sub Login_Load(sender As Object, e As EventArgs) Handles


MyBase.Load
End Sub
End Class
Imports System.Net.Mail
Imports System.Net
Imports System.Text.RegularExpressions

Public Class Passwordtxb


Public Shared verificationCode As String
Public Shared verifiedUsername As String

' Method to generate a random 6-digit verification code


Private Function GenerateRandomCode() As String
Dim rand As New Random()
Return rand.Next(100000, 999999).ToString()
End Function

' Method to validate Username format


Private Function IsValidUsername(Username As String) As Boolean
Dim UsernameRegex As New Regex("^[^@\s]+@[^@\s]+\.[^@\s]+$")
Return UsernameRegex.IsMatch(Username)
End Function

' Method to send Username with the verification code


Private Sub SendVerificationCodeUsername(Username As String, code As String)
Try
Dim smtpServer As New SmtpClient("smtp.gmail.com")
smtpServer.Port = 587
smtpServer.Credentials = New
NetworkCredential("[email protected]", "qfmw fpow cxum pzvl")
smtpServer.EnableSsl = True

Dim mail As New MailMessage()


mail.From = New MailAddress("[email protected]")
mail.To.Add(Username)
mail.Subject = "Your Verification Code"
mail.Body = "Your verification code is: " & code

smtpServer.Send(mail)

MessageBox.Show("Verification code sent to " & Username, "Success",


MessageBoxButtons.OK, MessageBoxIcon.Information)

Catch ex As Exception
MessageBox.Show("Username send error: " & ex.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

' Send code button click


Private Sub SendCodeBtn_Click(sender As Object, e As EventArgs) Handles
SendCodeBtn.Click
Dim userUsername As String = TextBoxEmail.Text.Trim()

If String.IsNullOrEmpty(userUsername) Then
MessageBox.Show("Please enter your Username.")
Return
ElseIf Not IsValidUsername(userUsername) Then
MessageBox.Show("Please enter a valid Username address.")
Return
End If

Dim generatedCode As String = GenerateRandomCode()


verificationCode = generatedCode
verifiedUsername = userUsername

SendVerificationCodeUsername(userUsername, generatedCode)

Dim verifyForm As New VerifyCode()


verifyForm.Show()
Me.Hide()
End Sub

' On form load, hide password input


Private Sub ForgotPassword_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
End Sub

' Close the app


Private Sub Close_Click(sender As Object, e As EventArgs) Handles Close.Click
Application.Exit()
End Sub
End Class

Public Class VerifyCode


Private Sub VerifyBtn_Click(sender As Object, e As EventArgs) Handles
VerifyBtn.Click
Dim enteredCode As String = CodeTextBox.Text.Trim()
If enteredCode = Passwordtxb.verificationCode Then
MessageBox.Show("Code verified!", "Success", MessageBoxButtons.OK,
MessageBoxIcon.Information)

Dim resetForm As New ResetPassword()


resetForm.Show()
Me.Hide()
Else
MessageBox.Show("Invalid verification code.", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
End Sub

Private Sub VerifyCode_Load(sender As Object, e As EventArgs) Handles


MyBase.Load

End Sub

Private Sub Close_Click(sender As Object, e As EventArgs) Handles Close.Click


Application.Exit()
End Sub
End Class

Public NotInheritable Class About_Us

Private Sub About_Us_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
' Set the title of the form.
Dim ApplicationTitle As String
If My.Application.Info.Title <> "" Then
ApplicationTitle = My.Application.Info.Title
Else
ApplicationTitle =
System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
End If
Me.Text = String.Format("About {0}", ApplicationTitle)
' Initialize all of the text displayed on the About Box.
' TODO: Customize the application's assembly information in the "Application"
pane of the project
' properties dialog (under the "Project" menu).
Me.TextBoxDescription.Text = My.Application.Info.Description
Me.LabelProductName.Text = My.Application.Info.ProductName
Me.Label1.Text = My.Application.Info.CompanyName
Me.Label1.Text = "Friendly, experienced staff"
Me.Label2.Text = "Comfortable environment"
Me.Label3.Text = "We combine advanced technology with a gentle touch to
make every visit stress-free."
End Sub

Private Sub OKButton_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles OKButton.Click
Dim login As New Login
login.Show()
Me.Close()
End Sub

Private Sub LabelVersion_Click(sender As Object, e As EventArgs)

End Sub

Private Sub TextBoxDescription_TextChanged(sender As Object, e As EventArgs)


Handles TextBoxDescription.TextChanged
TextBoxDescription.Text = "Welcome to Tooth Heaven Dental Clinic! At Tooth
Heaven, we believe that a healthy, beautiful smile can change lives. Our clinic is
dedicated to providing top-quality dental care in a warm, relaxing, and family-friendly
environment. Whether you're here for a routine check-up, cosmetic treatment, or a
full smile makeover, our experienced team is here to ensure your comfort and
satisfaction every step of the way."

End Sub

Private Sub TableLayoutPanel_Paint(sender As Object, e As PaintEventArgs)


Handles TableLayoutPanel.Paint

End Sub

Private Sub LabelProductName_Click(sender As Object, e As EventArgs) Handles


LabelProductName.Click

End Sub

Private Sub LogoPictureBox_Click(sender As Object, e As EventArgs) Handles


LogoPictureBox.Click

End Sub
Private Sub Label1_Click(sender As Object, e As EventArgs) Handles
Label1.Click
TextBoxDescription.Text = "Friendly, experienced staff"
End Sub

Private Sub Label2_Click(sender As Object, e As EventArgs) Handles


Label2.Click
TextBoxDescription.Text = "Comfortable environment"

End Sub

Private Sub Label3_Click(sender As Object, e As EventArgs) Handles


Label3.Click
TextBoxDescription.Text = "We combine advanced technology with a gentle
touch to make every visit stress-free."
End Sub
End Class

Imports System.Data.SqlClient
Public Class Doctor1
Dim con As New SqlConnection("Data Source=.\SQLEXPRESS02;Initial
Catalog=DentalDbVb;Integrated Security=True;Encrypt=False")
Private Sub LoadPatientData()
Try
con.Open()
Dim query As String = "SELECT Patid,PatName,
PatPhoneNo,PatAdd,PatDateAndTime, PatGen, PatAll FROM PatientTbl"
Dim cmd As New SqlCommand(query, con)
Dim adapter As New SqlDataAdapter(cmd)
Dim dt As New DataTable()
adapter.Fill(dt)
DataGridView1.DataSource = dt
Catch ex As Exception
MessageBox.Show("Error loading patients: " & ex.Message)
Finally
If con.State = ConnectionState.Open Then con.Close()
End Try
End Sub
Private Sub Doctor1_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
LoadPatientData()
EnableLabels()
End Sub
Private Sub EnableLabels()
lblPrescription.Enabled = True
lblDashBoard.Enabled = True
lblLogout.Enabled = True
lblPrescription.Visible = True
lblDashBoard.Visible = True
lblLogout.Visible = True
AddHandler lblPrescription.Click, AddressOf lblPrescription_Click
AddHandler lblDashBoard.Click, AddressOf lblDashBoard_Click
AddHandler lblLogout.Click, AddressOf lblLogout_Click
End Sub
Private Sub lblPrescription_Click(sender As Object, e As EventArgs) Handles
lblPrescription.Click
Dim prescriptionForm As New Prescription()
Prescription.Show()
Me.Close()
End Sub
Private Sub lblDashBoard_Click(sender As Object, e As EventArgs) Handles
lblDashBoard.Click
Dim overviewForm As New Overview
Overview.Show()
Me.Close()
End Sub
Private Sub lblLogout_Click(sender As Object, e As EventArgs) Handles
lblLogout.Click
Dim result As DialogResult = MessageBox.Show("Are you sure you want to log
out?", "Logout Confirmation", MessageBoxButtons.YesNo,
MessageBoxIcon.Question)
If result = DialogResult.Yes Then
Dim loginForm As New Login()
loginForm.Show()
Me.Close()
End If
End Sub
Private Sub Savebtn_Click(sender As Object, e As EventArgs)
MessageBox.Show("Save functionality not yet implemented.")
End Sub
Private Sub Editbtn_Click(sender As Object, e As EventArgs)
MessageBox.Show("Edit functionality not yet implemented.")
End Sub
Private Sub Deletebtn_Click(sender As Object, e As EventArgs)
MessageBox.Show("Delete functionality not yet implemented.")
End Sub
Private Sub LblInventory_Click(sender As Object, e As EventArgs) Handles
lblInventory.Click
Dim Inventory2Form As New Inventory2()
Inventory2Form.Show()
Me.Close()
End Sub

End Class

Imports System.Data.SqlClient

Public Class Inventory2

Private connectionString As String = "Data Source=.\SQLEXPRESS02;Initial


Catalog=DentalDbVb;Integrated Security=True;Encrypt=False"

Private Sub LoadDataGridView()


Dim query As String = "SELECT Id, ItemName, ItemPrice, ExpirationDate
FROM InventoryTbl"
Using conn As New SqlConnection(connectionString)
Using cmd As New SqlCommand(query, conn)
Using da As New SqlDataAdapter(cmd)
Dim dt As New DataTable()
Try
da.Fill(dt)
ItemListDGV.DataSource = dt
Catch ex As Exception
MessageBox.Show("Error loading data: " & ex.Message)
End Try
End Using
End Using
End Using
End Sub

Private Sub Inventory2_Load(sender As Object, e As EventArgs) Handles


MyBase.Load
LoadDataGridView() '
End Sub

Private Sub LblReceptionist_Click(sender As Object, e As EventArgs) Handles


LblReceptionist.Click
Dim Doctor1 As New Doctor1()
Doctor1.Show()
Me.Close()
End Sub
Private Sub lblPrescription_Click(sender As Object, e As EventArgs) Handles
lblPrescription.Click
Dim Presciption As New Prescription()
Presciption.Show()
Me.Close()
End Sub

Private Sub lblDashBoard_Click(sender As Object, e As EventArgs) Handles


lblDashBoard.Click
Dim overview As New Overview()
overview.Show()
Me.Close()
End Sub

Private Sub LblLogout_Click(sender As Object, e As EventArgs) Handles


lblLogout.Click
Dim result As DialogResult = MessageBox.Show("Are you sure you want to log
out?", "Logout Confirmation", MessageBoxButtons.YesNo,
MessageBoxIcon.Question)
If result = DialogResult.Yes Then
Me.Close()
Dim obj As New Login()
obj.Show()
End If
End Sub
End Class

Imports System.Data.SqlClient

Public Class Overview


Dim con As New SqlConnection("Data Source=.\SQLEXPRESS02;Initial
Catalog=DentalDbVb;Integrated Security=True;Encrypt=False")

Private Sub Dashboard_Load(sender As Object, e As EventArgs) Handles


MyBase.Load
loadProfit()
loadPatientAcc()
loadActivePatient()
loadTotalPatients()
End Sub

Private Sub TransactionDate_ValueChanged(sender As Object, e As EventArgs)


Handles TransactionDate.ValueChanged
loadProfit()
loadPatientAcc()
End Sub

' Load total, weekly, monthly, and yearly profits


Sub loadProfit()
Try
If con.State = ConnectionState.Closed Then con.Open()

Dim selectedDate As Date = TransactionDate.Value


Dim selectedMonth As Integer = selectedDate.Month
Dim selectedYear As Integer = selectedDate.Year

' Total profit


Using cmd As New SqlCommand("SELECT SUM(Amount) FROM
TransactionHistory", con)
Dim result = cmd.ExecuteScalar()
Profit.Text = "₱" & If(IsDBNull(result), 0,
Convert.ToDecimal(result)).ToString("N2")
End Using

' Weekly profit


Using cmd As New SqlCommand("SELECT SUM(Amount) FROM
TransactionHistory WHERE TransactionDate >= DATEADD(DAY, 1 -
DATEPART(WEEKDAY, @SelectedDate), @SelectedDate) AND TransactionDate <
DATEADD(DAY, 8 - DATEPART(WEEKDAY, @SelectedDate), @SelectedDate)",
con)
cmd.Parameters.AddWithValue("@SelectedDate", selectedDate)
Dim resultWeekly = cmd.ExecuteScalar()
Weeklyprofit.Text = "₱" & If(IsDBNull(resultWeekly), 0,
Convert.ToDecimal(resultWeekly)).ToString("N2")
End Using

' Monthly profit


Using cmd As New SqlCommand("SELECT SUM(Amount) FROM
TransactionHistory WHERE MONTH(TransactionDate) = @selectedMonth AND
YEAR(TransactionDate) = @selectedYear", con)
cmd.Parameters.AddWithValue("@selectedMonth", selectedMonth)
cmd.Parameters.AddWithValue("@selectedYear", selectedYear)
Dim resultMonthly = cmd.ExecuteScalar()
Monthlyprofit.Text = "₱" & If(IsDBNull(resultMonthly), 0,
Convert.ToDecimal(resultMonthly)).ToString("N2")
End Using

' Yearly profit


Using cmd As New SqlCommand("SELECT SUM(Amount) FROM
TransactionHistory WHERE YEAR(TransactionDate) = @selectedYear", con)
cmd.Parameters.AddWithValue("@selectedYear", selectedYear)
Dim resultYearly = cmd.ExecuteScalar()
Yearlyprofit.Text = "₱" & If(IsDBNull(resultYearly), 0,
Convert.ToDecimal(resultYearly)).ToString("N2")
End Using

Catch ex As Exception
MessageBox.Show("Error loading profit: " & ex.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Finally
If con.State = ConnectionState.Open Then con.Close()
End Try
End Sub

' Load weekly, monthly, yearly, and total patient accommodation count
Sub loadPatientAcc()
Try
If con.State = ConnectionState.Closed Then con.Open()

Dim selectedDate As Date = TransactionDate.Value


Dim selectedMonth As Integer = selectedDate.Month
Dim selectedYear As Integer = selectedDate.Year

' Weekly patient count


Using cmd As New SqlCommand("SELECT COUNT(DISTINCT
TransactionID) FROM TransactionHistory WHERE TransactionDate >=
DATEADD(DAY, 1 - DATEPART(WEEKDAY, @SelectedDate), @SelectedDate) AND
TransactionDate < DATEADD(DAY, 8 - DATEPART(WEEKDAY, @SelectedDate),
@SelectedDate)", con)
cmd.Parameters.AddWithValue("@SelectedDate", selectedDate)
Dim resultWeeklyacc = cmd.ExecuteScalar()
weeklyAcc.Text = If(IsDBNull(resultWeeklyacc), "0",
Convert.ToInt32(resultWeeklyacc).ToString())
End Using

' Monthly patient count


Using cmd As New SqlCommand("SELECT COUNT(DISTINCT
TransactionID) FROM TransactionHistory WHERE MONTH(TransactionDate) =
@selectedMonth AND YEAR(TransactionDate) = @selectedYear", con)
cmd.Parameters.AddWithValue("@selectedMonth", selectedMonth)
cmd.Parameters.AddWithValue("@selectedYear", selectedYear)
Dim resultMonthlyacc = cmd.ExecuteScalar()
monthlyAcc.Text = If(IsDBNull(resultMonthlyacc), "0",
Convert.ToInt32(resultMonthlyacc).ToString())
End Using

' Yearly patient count


Using cmd As New SqlCommand("SELECT COUNT(DISTINCT
TransactionID) FROM TransactionHistory WHERE YEAR(TransactionDate) =
@selectedYear", con)
cmd.Parameters.AddWithValue("@selectedYear", selectedYear)
Dim resultYearlyacc = cmd.ExecuteScalar()
yearlyAcc.Text = If(IsDBNull(resultYearlyacc), "0",
Convert.ToInt32(resultYearlyacc).ToString())
End Using

' Total patient accommodation (all-time)


Using cmd As New SqlCommand("SELECT COUNT(DISTINCT
TransactionID) FROM TransactionHistory", con)
Dim totalAcc = cmd.ExecuteScalar()
TotalPatientAcc.Text = If(IsDBNull(totalAcc), "0",
Convert.ToInt32(totalAcc).ToString())
End Using

Catch ex As Exception
MessageBox.Show("Error loading patient accommodation data: " &
ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Finally
If con.State = ConnectionState.Open Then con.Close()
End Try
End Sub

Sub loadActivePatient()
Try
If con.State = ConnectionState.Closed Then con.Open()

Using cmd As New SqlCommand("SELECT COUNT(DISTINCT PatId)


FROM PatientTbl", con)
Dim result = cmd.ExecuteScalar()
Dim activePatients As Integer = If(IsDBNull(result), 0,
Convert.ToInt32(result))
ActivePatient.Text = activePatients.ToString()
End Using

Catch ex As Exception
MessageBox.Show("Error loading active patient data: " & ex.Message,
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Finally
If con.State = ConnectionState.Open Then con.Close()
End Try
End Sub

Sub loadTotalPatients()
Try
If con.State = ConnectionState.Closed Then con.Open()

Using cmd As New SqlCommand("SELECT COUNT(*) FROM PatientTbl",


con)
Dim result = cmd.ExecuteScalar()
TotalPatientAcc.Text = If(IsDBNull(result), "0",
Convert.ToInt32(result).ToString())
End Using

Catch ex As Exception
MessageBox.Show("Error loading total patient count: " & ex.Message,
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Finally
If con.State = ConnectionState.Open Then con.Close()
End Try
End Sub

Private Sub lblDoctor1_Click(sender As Object, e As EventArgs) Handles


lblDoctor1.Click
Dim doctorDashboard As New Doctor1()
doctorDashboard.Show()
Me.Hide()
End Sub

Private Sub lblDashboard_Click(sender As Object, e As EventArgs) Handles


lblDashboard.Click
Dim Prescription As New Prescription()
Prescription.Show()
Me.Hide()
End Sub

Private Sub lblLogout_Click(sender As Object, e As EventArgs) Handles


lblLogout.Click
Dim confirmLogout As DialogResult = MessageBox.Show("Are you sure you
want to log out?", "Logout Confirmation", MessageBoxButtons.YesNo,
MessageBoxIcon.Question)
If confirmLogout = DialogResult.Yes Then
Dim loginForm As New Login()
loginForm.Show()
Me.Hide()
End If
End Sub

Public Sub refreshData()


loadProfit()
loadPatientAcc()
loadActivePatient()
loadTotalPatients()
End Sub

Private Sub lblInventory_Click(sender As Object, e As EventArgs) Handles


lblInventory.Click
Dim inventory2Form As New Inventory2()
inventory2Form.Show()
Me.Hide()
End Sub

Private Sub Yearlyprofit_Click(sender As Object, e As EventArgs) Handles


Yearlyprofit.Click
' Optional: You can implement something here if needed.
End Sub

Private Sub yearlyAcc_Click(sender As Object, e As EventArgs) Handles


yearlyAcc.Click
' Optional: You can implement something here if needed.
End Sub
End Class

Imports System.Data.SqlClient

Public Class Prescription


Dim connectionString As String = "Data Source=.\SQLEXPRESS02;Initial
Catalog=DentalDbVb;Integrated Security=True;Encrypt=False"
Dim selectedPrescriptionId As Integer = -1

Private Sub Prescription_Load(sender As Object, e As EventArgs) Handles


MyBase.Load
LoadPatients()
LoadPrescriptions()
LoadTreatments()
LoadServices()
End Sub

Private Sub LoadServices()


Servicescmb.Items.Clear()
Try
Using con As New SqlConnection(connectionString)
con.Open()
Dim query As String = "SELECT ServiceName FROM Services"
Using cmd As New SqlCommand(query, con)
Using reader As SqlDataReader = cmd.ExecuteReader()
While reader.Read()
Servicescmb.Items.Add(reader("ServiceName").ToString())
End While
End Using
End Using
End Using
Catch ex As SqlException
MessageBox.Show("SQL Error loading services: " & ex.Message)
Catch ex As Exception
MessageBox.Show("Error loading services: " & ex.Message)
End Try
End Sub

Private Sub LoadPatients()


CmbPatients.Items.Clear()
Try
Using con As New SqlConnection(connectionString)
con.Open()
Dim query As String = "SELECT PatName FROM PatientTbl"
Using cmd As New SqlCommand(query, con)
Using reader As SqlDataReader = cmd.ExecuteReader()
While reader.Read()
CmbPatients.Items.Add(reader("PatName").ToString())
End While
End Using
End Using
End Using
Catch ex As Exception
MessageBox.Show("Error loading patients: " & ex.Message, "Database
Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

Private Sub LoadPrescriptions()


Try
Using con As New SqlConnection(connectionString)
con.Open()
Dim query As String = "SELECT PId, Patient, Treatment, TreatmentCost,
Medicine, OtherNotes, ServiceName FROM PrescriptionTbl"
Using cmd As New SqlCommand(query, con)
Dim adapter As New SqlDataAdapter(cmd)
Dim table As New DataTable()
adapter.Fill(table)
PrescriptionDGV.DataSource = table
ConfigureGrid()
End Using
End Using
Catch ex As Exception
MessageBox.Show("Error loading prescriptions: " & ex.Message, "Database
Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

Private Sub LoadTreatments()


cbmservices.Items.Clear()
Try
Using con As New SqlConnection(connectionString)
con.Open()
Dim query As String = "SELECT ItemName FROM InventoryTbl"
Using cmd As New SqlCommand(query, con)
Using reader As SqlDataReader = cmd.ExecuteReader()
While reader.Read()
cbmservices.Items.Add(reader("ItemName").ToString())
End While
End Using
End Using
End Using
Catch ex As Exception
MessageBox.Show("Error loading treatments: " & ex.Message)
End Try
End Sub

Private Sub ConfigureGrid()


With PrescriptionDGV
.Columns("PId").HeaderText = "ID"
.Columns("Patient").HeaderText = "Patient Name"
.Columns("Treatment").HeaderText = "Treatment"
.Columns("TreatmentCost").HeaderText = "Cost"
.Columns("Medicine").HeaderText = "Medicine"
.Columns("OtherNotes").HeaderText = "Notes"
.Columns("ServiceName").HeaderText = "Service"
End With
End Sub

Private Function ValidateInputs() As Boolean


If CmbPatients.SelectedIndex = -1 OrElse cbmservices.SelectedIndex = -1
OrElse
String.IsNullOrWhiteSpace(Costtxtb.Text) OrElse
String.IsNullOrWhiteSpace(MedicineTextb.Text) OrElse
String.IsNullOrWhiteSpace(OtherTextb.Text) OrElse
Servicescmb.SelectedIndex = -1 OrElse
Servicescmb.SelectedItem Is Nothing OrElse
String.IsNullOrWhiteSpace(Servicescmb.SelectedItem.ToString()) Then
MessageBox.Show("Please fill in all fields before saving.", "Missing
Information", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Return False
End If
If Not IsNumeric(Costtxtb.Text) OrElse Convert.ToDecimal(Costtxtb.Text) <= 0
Then
MessageBox.Show("Please enter a valid cost.", "Invalid Cost",
MessageBoxButtons.OK, MessageBoxIcon.Warning)
Return False
End If
Return True
End Function

Private Sub SavePrescription()


If Not ValidateInputs() Then Exit Sub

Dim itemName As String = cbmservices.SelectedItem.ToString()


Dim serviceName As String = Servicescmb.SelectedItem.ToString()
Dim remainingStock As Integer = 0

Try
Using con As New SqlConnection(connectionString)
con.Open()

' Check stock for treatment item


Dim stockQuery As String = "SELECT ItemPrice FROM InventoryTbl
WHERE ItemName = @ItemName"
Using stockCmd As New SqlCommand(stockQuery, con)
stockCmd.Parameters.AddWithValue("@ItemName", itemName)
Dim result = stockCmd.ExecuteScalar()

If result IsNot Nothing Then


remainingStock = Convert.ToInt32(result)
If remainingStock <= 0 Then
MessageBox.Show("This treatment item has run out of stock!",
"Out of Stock", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Return
End If
Else
MessageBox.Show("Selected item not found in inventory.", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Return
End If
End Using

' Insert prescription into the database


Dim insertQuery As String = "INSERT INTO PrescriptionTbl (Patient,
Treatment, TreatmentCost, Medicine, OtherNotes, ServiceName) " &
"VALUES (@Patient, @Treatment, @TreatmentCost,
@Medicine, @OtherNotes, @ServiceName)"
Using insertCmd As New SqlCommand(insertQuery, con)
insertCmd.Parameters.AddWithValue("@Patient",
CmbPatients.SelectedItem.ToString())
insertCmd.Parameters.AddWithValue("@Treatment", itemName)
insertCmd.Parameters.AddWithValue("@TreatmentCost",
Convert.ToDecimal(Costtxtb.Text))
insertCmd.Parameters.AddWithValue("@Medicine", MedicineTextb.Text)
insertCmd.Parameters.AddWithValue("@OtherNotes", OtherTextb.Text)
insertCmd.Parameters.AddWithValue("@ServiceName", serviceName) '
Ensure no NULL
insertCmd.ExecuteNonQuery()
End Using
End Using

MessageBox.Show("Prescription saved!", "Success",


MessageBoxButtons.OK, MessageBoxIcon.Information)
LoadPrescriptions()
ClearFields()
Catch ex As Exception
MessageBox.Show("Error saving prescription: " & ex.Message, "Database
Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

Private Sub Savebtn_Click(sender As Object, e As EventArgs) Handles


Savebtn.Click
SavePrescription()
End Sub

Private Sub ClearFields()


CmbPatients.SelectedIndex = -1
cbmservices.SelectedIndex = -1
Servicescmb.SelectedIndex = -1
Costtxtb.Clear()
MedicineTextb.Clear()
OtherTextb.Clear()
selectedPrescriptionId = -1
End Sub

Private Sub LblLogout_Click(sender As Object, e As EventArgs) Handles


LblLogout.Click
Dim result As DialogResult = MessageBox.Show("Are you sure you want to log
out?", "Logout Confirmation", MessageBoxButtons.YesNo,
MessageBoxIcon.Question)
If result = DialogResult.Yes Then
Me.Close()
Dim obj As New Login()
obj.Show()
End If
End Sub

Private Sub lblDoctor1_Click(sender As Object, e As EventArgs) Handles


lblDoctor1.Click
Dim doctorDashboard As New Doctor1()
doctorDashboard.Show()
Me.Close()
End Sub

Private Sub lblOverview_Click(sender As Object, e As EventArgs) Handles


lblOverview.Click
Dim overview As New Overview()
overview.Show()
Me.Close()
End Sub

Private Sub cbmservices_SelectedIndexChanged(sender As Object, e As


EventArgs) Handles cbmservices.SelectedIndexChanged
If cbmservices.SelectedIndex = -1 Then Return

Try
Using con As New SqlConnection(connectionString)
con.Open()
Dim query As String = "SELECT ItemPrice FROM InventoryTbl WHERE
ItemName = @ItemName"
Using cmd As New SqlCommand(query, con)
cmd.Parameters.AddWithValue("@ItemName",
cbmservices.SelectedItem.ToString())
Using reader As SqlDataReader = cmd.ExecuteReader()
If reader.Read() Then
Costtxtb.Text = reader("ItemPrice").ToString()
End If
End Using
End Using
End Using
Catch ex As Exception
MessageBox.Show("Error fetching treatment info: " & ex.Message)
End Try
End Sub

Private Sub Editbtn_Click(sender As Object, e As EventArgs) Handles


Editbtn.Click
If selectedPrescriptionId = -1 Then
MessageBox.Show("Please select a prescription to edit.", "Selection Error",
MessageBoxButtons.OK, MessageBoxIcon.Warning)
Return
End If
' Implement edit functionality here
End Sub

Private Sub Deletebtn_Click(sender As Object, e As EventArgs) Handles


Deletebtn.Click
If selectedPrescriptionId = -1 Then
MessageBox.Show("Please select a prescription to delete.", "Selection
Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Return
End If
Try
Using con As New SqlConnection(connectionString)
con.Open()
Dim deleteQuery As String = "DELETE FROM PrescriptionTbl WHERE
PId = @PId"
Using deleteCmd As New SqlCommand(deleteQuery, con)
deleteCmd.Parameters.AddWithValue("@PId", selectedPrescriptionId)
deleteCmd.ExecuteNonQuery()
End Using
End Using
MessageBox.Show("Prescription deleted.", "Success",
MessageBoxButtons.OK, MessageBoxIcon.Information)
LoadPrescriptions()
ClearFields()
Catch ex As Exception
MessageBox.Show("Error deleting prescription: " & ex.Message, "Database
Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

Private Sub PrescriptionDGV_CellClick(sender As Object, e As


DataGridViewCellEventArgs) Handles PrescriptionDGV.CellClick
If e.RowIndex >= 0 Then
Dim row As DataGridViewRow = PrescriptionDGV.Rows(e.RowIndex)
selectedPrescriptionId = Convert.ToInt32(row.Cells("PId").Value)
CmbPatients.SelectedItem = row.Cells("Patient").Value.ToString()
cbmservices.SelectedItem = row.Cells("Treatment").Value.ToString()
Servicescmb.SelectedItem = row.Cells("ServiceName").Value.ToString()
Costtxtb.Text = row.Cells("TreatmentCost").Value.ToString()
MedicineTextb.Text = row.Cells("Medicine").Value.ToString()
OtherTextb.Text = row.Cells("OtherNotes").Value.ToString()
End If
End Sub
End Class

Imports System.Data.SqlClient

Public Class Receptionist


Dim con As New SqlConnection("Data Source=.\SQLEXPRESS02;Initial
Catalog=DentalDbVb;Integrated Security=True;Encrypt=False")
Dim key As Integer = 0

' Load patient data when form loads


Private Sub Receptionist_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
LoadPatients()
End Sub

' Load Patients into DataGridView


Private Sub LoadPatients()
Try
con.Open()
Dim query As String = "SELECT * FROM PatientTbl"
Dim adapter As New SqlDataAdapter(query, con)
Dim builder As New SqlCommandBuilder(adapter)
Dim ds As New DataSet()
adapter.Fill(ds)
PatientsDGV.DataSource = ds.Tables(0)
Catch ex As Exception
MessageBox.Show("Error loading data: " & ex.Message)
Finally
con.Close()
End Try
End Sub

' Save new patient


Private Sub SaveBtn_Click(sender As Object, e As EventArgs) Handles
SaveBtn.Click
If PatNameTb.Text = "" Or PatPhoneTb.Text = "" Or PatAddtb.Text = "" Or
GenCb.SelectedIndex = -1 Then
MessageBox.Show("Missing Information")
Else
Try
con.Open()
Dim query As String = "INSERT INTO PatientTbl (PatName, PatPhoneNo,
PatAdd, PatDateAndTime, PatGen, PatAll) VALUES (@Name, @Phone, @Address,
@DateTime, @Gender, @Allergies)"
Dim cmd As New SqlCommand(query, con)
cmd.Parameters.AddWithValue("@Name", PatNameTb.Text)
cmd.Parameters.AddWithValue("@Phone", PatPhoneTb.Text)
cmd.Parameters.AddWithValue("@Address", PatAddtb.Text)
cmd.Parameters.AddWithValue("@DateTime", DOBDate.Value.Date)
cmd.Parameters.AddWithValue("@Gender",
GenCb.SelectedItem.ToString())
cmd.Parameters.AddWithValue("@Allergies", AllergieTb.Text)
cmd.ExecuteNonQuery()
MessageBox.Show("Patient Saved Successfully")
LoadPatients()
ResetForm()
Catch ex As Exception
MessageBox.Show("Error saving data: " & ex.Message)
Finally
con.Close()
End Try
End If
End Sub

' Edit existing patient


Private Sub EditBtn_Click(sender As Object, e As EventArgs) Handles
EditBtn.Click
If key = 0 Then
MessageBox.Show("Select a Patient to Edit")
Else
Try
con.Open()
Dim query As String = "UPDATE PatientTbl SET PatName=@Name,
PatPhoneNo=@Phone, PatAdd=@Address, PatDateAndTime=@DateTime,
PatGen=@Gender, PatAll=@Allergies WHERE Patid=@Key"
Dim cmd As New SqlCommand(query, con)
cmd.Parameters.AddWithValue("@Name", PatNameTb.Text)
cmd.Parameters.AddWithValue("@Phone", PatPhoneTb.Text)
cmd.Parameters.AddWithValue("@Address", PatAddtb.Text)
cmd.Parameters.AddWithValue("@DateTime", DOBDate.Value.Date)
cmd.Parameters.AddWithValue("@Gender",
GenCb.SelectedItem.ToString())
cmd.Parameters.AddWithValue("@Allergies", AllergieTb.Text)
cmd.Parameters.AddWithValue("@Key", key)
cmd.ExecuteNonQuery()
MessageBox.Show("Patient Updated Successfully")
LoadPatients()
ResetForm()
Catch ex As Exception
MessageBox.Show("Error updating data: " & ex.Message)
Finally
con.Close()
End Try
End If
End Sub

' Delete selected patient


Private Sub DeleteBtn_Click(sender As Object, e As EventArgs) Handles
DeleteBtn.Click
If key = 0 Then
MessageBox.Show("Select a Patient to Delete")
Else
Try
con.Open()
Dim query As String = "DELETE FROM PatientTbl WHERE PatId=@Key"
Dim cmd As New SqlCommand(query, con)
cmd.Parameters.AddWithValue("@Key", key)
cmd.ExecuteNonQuery()
MessageBox.Show("Patient Deleted Successfully")
LoadPatients()
ResetForm()
Catch ex As Exception
MessageBox.Show("Error deleting data: " & ex.Message)
Finally
con.Close()
End Try
End If
End Sub

' Handle row click in DataGridView


Private Sub PatientsDGV_CellContentClick(sender As Object, e As
DataGridViewCellEventArgs) Handles PatientsDGV.CellContentClick
If e.RowIndex >= 0 Then
Dim row As DataGridViewRow = PatientsDGV.Rows(e.RowIndex)
PatNameTb.Text = row.Cells("PatName").Value.ToString()
PatPhoneTb.Text = row.Cells("PatPhoneNo").Value.ToString()
PatAddtb.Text = row.Cells("PatAdd").Value.ToString()
DOBDate.Value = Convert.ToDateTime(row.Cells("PatDateAndTime").Value)
GenCb.SelectedItem = row.Cells("PatGen").Value.ToString()
AllergieTb.Text = row.Cells("PatAll").Value.ToString()
key = Convert.ToInt32(row.Cells("Patid").Value.ToString())
End If
End Sub

' Clear input fields


Private Sub ResetForm()
PatNameTb.Text = ""
PatPhoneTb.Text = ""
PatAddtb.Text = ""
AllergieTb.Text = ""
GenCb.SelectedIndex = -1
DOBDate.Value = DateTime.Today
key = 0
End Sub

Private Sub lblReceipt_Click(sender As Object, e As EventArgs) Handles


lblReceipt.Click
Dim Receipt As New Receipt()
Receipt.Show()
Me.Close()
End Sub

Private Sub LblWalkin_Click(sender As Object, e As EventArgs) Handles


LblWalkin.Click
Dim Walkin As New Walkin()
Walkin.Show()
Me.Close()
End Sub
Private Sub LblLogout_Click(sender As Object, e As EventArgs) Handles
lblLogout.Click
Dim result As DialogResult = MessageBox.Show("Are you sure you want to log
out?", "Logout Confirmation", MessageBoxButtons.YesNo,
MessageBoxIcon.Question)
If result = DialogResult.Yes Then
Me.Close()
Dim obj As New Login()
obj.Show()
End If
End Sub

End Class

Imports System.Data.SqlClient
Imports System.IO
Imports System.Text

Public Class Receipt


Dim con As New SqlConnection("Data Source=.\SQLEXPRESS02;Initial
Catalog=DentalDbVb;Integrated Security=True;Encrypt=False")

Private Sub Receipt_Load(sender As Object, e As EventArgs) Handles


MyBase.Load
LoadPrescriptions()
End Sub
Private Sub LoadPrescriptions()
Try
If con.State = ConnectionState.Open Then con.Close()
con.Open()
Dim query As String = "SELECT * FROM PrescriptionTbl"
Dim adapter As New SqlDataAdapter(query, con)
Dim table As New DataTable()
adapter.Fill(table)
DataGridView1.DataSource = table
Catch ex As Exception
MsgBox("Error: " & ex.Message)
Finally
con.Close()
End Try
End Sub

Private Sub lblLogout_Click(sender As Object, e As EventArgs) Handles


lblLogout.Click
Dim loginForm As New Login()
loginForm.Show()
Me.Close()
End Sub

Private Sub lblReceptionist_Click(sender As Object, e As EventArgs) Handles


lblReceptionist.Click
Dim receptionistForm As New Receptionist()
receptionistForm.Show()
Me.Close()
End Sub

Dim selectedTreatment As String = ""


Dim selectedTransactionID As String = ""
Dim selectedCustomer As String = ""
Dim selectedAmount As String = ""
Dim selectedMedicine As String = ""
Dim Other As String = ""

Private Sub DataGridView1_CellClick(sender As Object, e As


DataGridViewCellEventArgs) Handles DataGridView1.CellClick
If e.RowIndex >= 0 Then
Dim row As DataGridViewRow = DataGridView1.Rows(e.RowIndex)

selectedTransactionID = If(row.Cells(0).Value?.ToString(), "")


selectedCustomer = If(row.Cells(1).Value?.ToString(), "")
selectedTreatment = If(row.Cells(2).Value?.ToString(), "")
selectedAmount = If(row.Cells(3).Value?.ToString(), "")
selectedMedicine = If(row.Cells(4).Value?.ToString(), "")
Other = If(row.Cells(6).Value?.ToString(), "")
End If
End Sub

Private Sub PrintBtn_Click(sender As Object, e As EventArgs) Handles


PrintBtn.Click
Dim currentDateTime As String = DateTime.Now.ToString("yyyy-MM-dd
HH:mm:ss")

Dim receipt As New StringBuilder()


receipt.AppendLine("==================================")
receipt.AppendLine(" DENTAL RECEIPT ")
receipt.AppendLine("==================================")
receipt.AppendLine("Date: " & currentDateTime)
receipt.AppendLine("Treatment: " & selectedTreatment)
receipt.AppendLine("Transaction ID: " & selectedTransactionID)
receipt.AppendLine("Customer: " & selectedCustomer)
receipt.AppendLine("Other: " & Other)
receipt.AppendLine("----------------------------------")
receipt.AppendLine(String.Format("Medicine: {0,-15}", selectedMedicine))
receipt.AppendLine("Price: " & selectedAmount)
receipt.AppendLine("----------------------------------")
receipt.AppendLine("Total Amount: " & selectedAmount)
receipt.AppendLine("==================================")
receipt.AppendLine(" Thank you for your visit! ")

Dim receiptPath As String = "C:\Temp\DentalReceipt.txt"


If Not Directory.Exists("C:\Temp") Then
Directory.CreateDirectory("C:\Temp")
End If
File.WriteAllText(receiptPath, receipt.ToString())
Process.Start("notepad.exe", receiptPath)
End Sub

Private Sub Deletebtn_Click(sender As Object, e As EventArgs) Handles


Deletebtn.Click
If String.IsNullOrEmpty(selectedTransactionID) Then
MessageBox.Show("Please select a transaction to delete.", "No Selection",
MessageBoxButtons.OK, MessageBoxIcon.Warning)
Return
End If
Dim result As DialogResult = MessageBox.Show("Are you sure you want to
delete and archive this transaction?", "Confirm Deletion",
MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = DialogResult.Yes Then
Try
If con.State = ConnectionState.Closed Then con.Open()

' Archive to TransactionHistory


Using insertCmd As New SqlCommand("INSERT INTO TransactionHistory
(TransactionID, Treatment, Customer, Medicine, Amount) VALUES (@TransactionID,
@Treatment, @Customer, @Medicine, @Amount)", con)
insertCmd.Parameters.AddWithValue("@TransactionID",
selectedTransactionID)
insertCmd.Parameters.AddWithValue("@Treatment",
selectedTreatment)
insertCmd.Parameters.AddWithValue("@Customer", selectedCustomer)
insertCmd.Parameters.AddWithValue("@Medicine", selectedMedicine)
insertCmd.Parameters.AddWithValue("@Amount", selectedAmount)
insertCmd.ExecuteNonQuery()
End Using

' Delete from PrescriptionTbl using TransactionID


Using deleteCmd As New SqlCommand("DELETE FROM PrescriptionTbl
WHERE PId = @TransactionID", con)
deleteCmd.Parameters.AddWithValue("@TransactionID",
selectedTransactionID)
deleteCmd.ExecuteNonQuery()
End Using

' Remove from UI


If DataGridView1.SelectedRows.Count > 0 Then
DataGridView1.Rows.Remove(DataGridView1.SelectedRows(0))
End If

MessageBox.Show("Transaction archived and deleted successfully.",


"Success", MessageBoxButtons.OK, MessageBoxIcon.Information)

Catch ex As Exception
MessageBox.Show("Error: " & ex.Message, "Database Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Finally
If con.State = ConnectionState.Open Then con.Close()
End Try
End If
End Sub
End Class

Imports System.Data.SqlClient
Imports System.IO
Imports System.Text

Public Class Receipt


Dim con As New SqlConnection("Data Source=.\SQLEXPRESS02;Initial
Catalog=DentalDbVb;Integrated Security=True;Encrypt=False")

Private Sub Receipt_Load(sender As Object, e As EventArgs) Handles


MyBase.Load
LoadPrescriptions()
End Sub

Private Sub LoadPrescriptions()


Try
If con.State = ConnectionState.Open Then con.Close()
con.Open()
Dim query As String = "SELECT * FROM PrescriptionTbl"
Dim adapter As New SqlDataAdapter(query, con)
Dim table As New DataTable()
adapter.Fill(table)
DataGridView1.DataSource = table
Catch ex As Exception
MsgBox("Error: " & ex.Message)
Finally
con.Close()
End Try
End Sub

Private Sub lblLogout_Click(sender As Object, e As EventArgs) Handles


lblLogout.Click
Dim loginForm As New Login()
loginForm.Show()
Me.Close()
End Sub

Private Sub lblReceptionist_Click(sender As Object, e As EventArgs) Handles


lblReceptionist.Click
Dim receptionistForm As New Receptionist()
receptionistForm.Show()
Me.Close()
End Sub

Dim selectedTreatment As String = ""


Dim selectedTransactionID As String = ""
Dim selectedCustomer As String = ""
Dim selectedAmount As String = ""
Dim selectedMedicine As String = ""
Dim Other As String = ""

Private Sub DataGridView1_CellClick(sender As Object, e As


DataGridViewCellEventArgs) Handles DataGridView1.CellClick
If e.RowIndex >= 0 Then
Dim row As DataGridViewRow = DataGridView1.Rows(e.RowIndex)

selectedTransactionID = If(row.Cells(0).Value?.ToString(), "")


selectedCustomer = If(row.Cells(1).Value?.ToString(), "")
selectedTreatment = If(row.Cells(2).Value?.ToString(), "")
selectedAmount = If(row.Cells(3).Value?.ToString(), "")
selectedMedicine = If(row.Cells(4).Value?.ToString(), "")
Other = If(row.Cells(6).Value?.ToString(), "")
End If
End Sub

Private Sub PrintBtn_Click(sender As Object, e As EventArgs) Handles


PrintBtn.Click
Dim currentDateTime As String = DateTime.Now.ToString("yyyy-MM-dd
HH:mm:ss")

Dim receipt As New StringBuilder()


receipt.AppendLine("==================================")
receipt.AppendLine(" DENTAL RECEIPT ")
receipt.AppendLine("==================================")
receipt.AppendLine("Date: " & currentDateTime)
receipt.AppendLine("Treatment: " & selectedTreatment)
receipt.AppendLine("Transaction ID: " & selectedTransactionID)
receipt.AppendLine("Customer: " & selectedCustomer)
receipt.AppendLine("Other: " & Other)
receipt.AppendLine("----------------------------------")
receipt.AppendLine(String.Format("Medicine: {0,-15}", selectedMedicine))
receipt.AppendLine("Price: " & selectedAmount)
receipt.AppendLine("----------------------------------")
receipt.AppendLine("Total Amount: " & selectedAmount)
receipt.AppendLine("==================================")
receipt.AppendLine(" Thank you for your visit! ")

Dim receiptPath As String = "C:\Temp\DentalReceipt.txt"


If Not Directory.Exists("C:\Temp") Then
Directory.CreateDirectory("C:\Temp")
End If
File.WriteAllText(receiptPath, receipt.ToString())
Process.Start("notepad.exe", receiptPath)
End Sub

Private Sub Deletebtn_Click(sender As Object, e As EventArgs) Handles


Deletebtn.Click
If String.IsNullOrEmpty(selectedTransactionID) Then
MessageBox.Show("Please select a transaction to delete.", "No Selection",
MessageBoxButtons.OK, MessageBoxIcon.Warning)
Return
End If

Dim result As DialogResult = MessageBox.Show("Are you sure you want to


delete and archive this transaction?", "Confirm Deletion",
MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = DialogResult.Yes Then
Try
If con.State = ConnectionState.Closed Then con.Open()

' Archive to TransactionHistory


Using insertCmd As New SqlCommand("INSERT INTO TransactionHistory
(TransactionID, Treatment, Customer, Medicine, Amount) VALUES (@TransactionID,
@Treatment, @Customer, @Medicine, @Amount)", con)
insertCmd.Parameters.AddWithValue("@TransactionID",
selectedTransactionID)
insertCmd.Parameters.AddWithValue("@Treatment",
selectedTreatment)
insertCmd.Parameters.AddWithValue("@Customer", selectedCustomer)
insertCmd.Parameters.AddWithValue("@Medicine", selectedMedicine)
insertCmd.Parameters.AddWithValue("@Amount", selectedAmount)
insertCmd.ExecuteNonQuery()
End Using

' Delete from PrescriptionTbl using TransactionID


Using deleteCmd As New SqlCommand("DELETE FROM PrescriptionTbl
WHERE PId = @TransactionID", con)
deleteCmd.Parameters.AddWithValue("@TransactionID",
selectedTransactionID)
deleteCmd.ExecuteNonQuery()
End Using

' Remove from UI


If DataGridView1.SelectedRows.Count > 0 Then
DataGridView1.Rows.Remove(DataGridView1.SelectedRows(0))
End If

MessageBox.Show("Transaction archived and deleted successfully.",


"Success", MessageBoxButtons.OK, MessageBoxIcon.Information)

Catch ex As Exception
MessageBox.Show("Error: " & ex.Message, "Database Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Finally
If con.State = ConnectionState.Open Then con.Close()
End Try
End If
End Sub
End Class

Public Class Admin

Private Sub LblLogout_Click(sender As Object, e As EventArgs) Handles


lblLogout.Click
Dim result As DialogResult = MessageBox.Show("Are you sure you want to log
out?", "Logout Confirmation", MessageBoxButtons.YesNo,
MessageBoxIcon.Question)
If result = DialogResult.Yes Then
Me.Close()
Dim obj As New Login()
obj.Show()
End If
End Sub

Private Sub LblInventory_Click(sender As Object, e As EventArgs) Handles


LblInventory.Click
Dim InventoryForm As New Inventory
InventoryForm.Show()
Close()
End Sub
Private Sub Admin_Load(sender As Object, e As EventArgs) Handles
MyBase.Load

End Sub

Private Sub Label3_Click(sender As Object, e As EventArgs) Handles


Label3.Click
Dim obj As New Services
obj.Show()
Me.Close()

End Sub
End Class

Imports System.Data.SqlClient

Public Class Inventory


Dim connectionString As String = "Data Source=.\SQLEXPRESS02;Initial
Catalog=DentalDbVb;Integrated Security=True;Encrypt=False"

Private Sub Inventory_Load(sender As Object, e As EventArgs) Handles


MyBase.Load
ExpirationDate.Format = DateTimePickerFormat.Custom
ExpirationDate.CustomFormat = "yyyy-MM-dd"
LoadDataGridView()
LoadItemNamesToComboBox()
End Sub

Private Sub LoadDataGridView()


Dim query As String = "SELECT * FROM InventoryTbl"
Using conn As New SqlConnection(connectionString)
Using cmd As New SqlCommand(query, conn)
Dim adapter As New SqlDataAdapter(cmd)
Dim table As New DataTable()
Try
conn.Open()
adapter.Fill(table)
ItemListDGV.DataSource = table
Catch ex As Exception
MessageBox.Show("Error loading data: " & ex.Message)
End Try
End Using
End Using
End Sub
Private Sub SaveBtn_Click(sender As Object, e As EventArgs) Handles
SaveBtn.Click
If String.IsNullOrWhiteSpace(ItemName.Text) OrElse
String.IsNullOrWhiteSpace(ItemPrice.Text) OrElse
String.IsNullOrWhiteSpace(Quantity.Text) Then
MessageBox.Show("Please fill in all fields before saving.")
Return
End If

Dim query As String = "INSERT INTO InventoryTbl (ItemName, ItemPrice,


ExpirationDate, Quantity) VALUES (@ItemName, @ItemPrice, @ExpirationDate,
@Quantity)"
Using conn As New SqlConnection(connectionString)
Using cmd As New SqlCommand(query, conn)
cmd.Parameters.AddWithValue("@ItemName", ItemName.Text)
cmd.Parameters.AddWithValue("@ItemPrice",
Convert.ToDecimal(ItemPrice.Text))
cmd.Parameters.AddWithValue("@ExpirationDate", ExpirationDate.Value)
cmd.Parameters.AddWithValue("@Quantity",
Convert.ToInt32(Quantity.Text))
Try
conn.Open()
cmd.ExecuteNonQuery()
MessageBox.Show("Item added successfully.")
LoadDataGridView()
LoadItemNamesToComboBox()
Catch ex As Exception
MessageBox.Show("Error saving data: " & ex.Message)
End Try
End Using
End Using
End Sub
Private Sub LoadItemNamesToComboBox()
Dim query As String = "SELECT DISTINCT ItemName FROM InventoryTbl"
Using conn As New SqlConnection(connectionString)
Using cmd As New SqlCommand(query, conn)
Try
conn.Open()
Using reader As SqlDataReader = cmd.ExecuteReader()
SelectItemlist.Items.Clear()
While reader.Read()
SelectItemlist.Items.Add(reader("ItemName").ToString())
End While
End Using
Catch ex As Exception
MessageBox.Show("Failed to load item names: " & ex.Message)
End Try
End Using
End Using
End Sub

Private Sub SelectItemlist_SelectedIndexChanged(sender As Object, e As


EventArgs) Handles SelectItemlist.SelectedIndexChanged
Dim selectedItem = SelectItemlist.SelectedItem.ToString()
Dim query As String = "SELECT ItemPrice FROM InventoryTbl WHERE
ItemName = @ItemName"
Using conn As New SqlConnection(connectionString)
Using cmd As New SqlCommand(query, conn)
cmd.Parameters.AddWithValue("@ItemName", selectedItem)
Try
conn.Open()
Dim result = cmd.ExecuteScalar()
If result IsNot Nothing Then
NewAmountTextBox.Text = result.ToString()
Else
NewAmountTextBox.Clear()
End If
Catch ex As Exception
MessageBox.Show("Failed to load item amount: " & ex.Message)
End Try
End Using
End Using
End Sub

Private Sub EditBtn_Click(sender As Object, e As EventArgs) Handles


EditBtn.Click
If SelectItemlist.SelectedIndex = -1 OrElse
String.IsNullOrWhiteSpace(NewAmountTextBox.Text) Then
MessageBox.Show("Please select an item and enter a new amount.")
Return
End If

Dim newAmount As Decimal


If Not Decimal.TryParse(NewAmountTextBox.Text, newAmount) Then
MessageBox.Show("Please enter a valid number for the new amount.")
Return
End If
Dim selectedItem = SelectItemlist.SelectedItem.ToString()
Dim query As String = "UPDATE InventoryTbl SET ItemPrice = @ItemPrice
WHERE ItemName = @ItemName"
Using conn As New SqlConnection(connectionString)
Using cmd As New SqlCommand(query, conn)
cmd.Parameters.AddWithValue("@ItemPrice", newAmount)
cmd.Parameters.AddWithValue("@ItemName", selectedItem)
Try
conn.Open()
cmd.ExecuteNonQuery()
MessageBox.Show("Item updated successfully.")
LoadDataGridView()
LoadItemNamesToComboBox()
Catch ex As Exception
MessageBox.Show("Error updating item: " & ex.Message)
End Try
End Using
End Using
End Sub

Private Sub DeleteBtn_Click(sender As Object, e As EventArgs) Handles


DeleteBtn.Click
If SelectItemlist.SelectedIndex = -1 Then
MessageBox.Show("Please select an item to delete.")
Return
End If

Dim selectedItem = SelectItemlist.SelectedItem.ToString()


Dim confirm = MessageBox.Show("Are you sure you want to delete this item?",
"Confirm Delete", MessageBoxButtons.YesNo)
If confirm <> DialogResult.Yes Then Return

Dim query As String = "DELETE FROM InventoryTbl WHERE ItemName =


@ItemName"
Using conn As New SqlConnection(connectionString)
Using cmd As New SqlCommand(query, conn)
cmd.Parameters.AddWithValue("@ItemName", selectedItem)
Try
conn.Open()
cmd.ExecuteNonQuery()
MessageBox.Show("Item deleted successfully.")
LoadDataGridView()
LoadItemNamesToComboBox()
NewAmountTextBox.Clear()
Catch ex As Exception
MessageBox.Show("Error deleting item: " & ex.Message)
End Try
End Using
End Using
End Sub
Private Sub LblLogout_Click(sender As Object, e As EventArgs) Handles
lblLogout.Click
Dim result = MessageBox.Show("Are you sure you want to log out?", "Logout
Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = DialogResult.Yes Then
Close()
Dim loginForm As New Login()
loginForm.Show()
End If
End Sub

Private Sub Label14_Click(sender As Object, e As EventArgs) Handles


Label14.Click
Dim servicesForm As New Services()
servicesForm.Show()
Me.Close()
End Sub
End Class

Imports System.Data.SqlClient
Public Class Services
Dim con As New SqlConnection("Data Source=.\SQLEXPRESS02;Initial
Catalog=DentalDbVb;Integrated Security=True;Encrypt=False")

Private Sub Services_Load(sender As Object, e As EventArgs) Handles


MyBase.Load
ServicesDGV.Columns.Clear()
ServicesDGV.Columns.Add("ServiceName", "ServiceName")
LoadServices()
End Sub
Private Sub LoadServices()
Try
ServicesDGV.Rows.Clear()
SelectServices.Items.Clear()

con.Open()
Dim cmd As New SqlCommand("SELECT * FROM Services", con)
Dim reader As SqlDataReader = cmd.ExecuteReader()

While reader.Read()
Dim name As String = reader("ServiceName").ToString()
ServicesDGV.Rows.Add(name)
SelectServices.Items.Add(name)
End While

reader.Close()
con.Close()
Catch ex As Exception
MessageBox.Show("Error loading services: " & ex.Message)
con.Close()
End Try
End Sub
Private Sub savebtn_Click(sender As Object, e As EventArgs) Handles
SaveBtn.Click
Dim serviceName As String = ServicesName.Text.Trim()

If serviceName = "" Then


MessageBox.Show("Please enter a ServiceName.")
Return
End If
Try
con.Open()
Dim cmd As New SqlCommand("INSERT INTO Services ([ServiceName])
VALUES (@name)", con)
cmd.Parameters.AddWithValue("@name", serviceName)
cmd.ExecuteNonQuery()
con.Close()
MessageBox.Show("Service saved successfully.")
ServicesName.Clear()
LoadServices()
Catch ex As Exception
MessageBox.Show("Error saving service: " & ex.Message)
con.Close()
End Try
End Sub
Private Sub editbtn_Click(sender As Object, e As EventArgs) Handles
EditBtn.Click
If SelectServices.SelectedItem Is Nothing Then
MessageBox.Show("Please select a service to edit.")
Return
End If
Dim newName As String = ServicesName.Text.Trim()
If newName = "" Then
MessageBox.Show("Please enter the new ServiceName.")
Return
End If
Try
con.Open()
Dim cmd As New SqlCommand("UPDATE Services SET [ServiceName] =
@newName WHERE [ServiceName] = @oldName", con)
cmd.Parameters.AddWithValue("@newName", newName)
cmd.Parameters.AddWithValue("@oldName",
SelectServices.SelectedItem.ToString())
cmd.ExecuteNonQuery()
con.Close()

MessageBox.Show("Service updated successfully.")


ServicesName.Clear()
SelectServices.SelectedIndex = -1
LoadServices()
Catch ex As Exception
MessageBox.Show("Error editing service: " & ex.Message)
con.Close()
End Try
End Sub
Private Sub deletebtn_Click(sender As Object, e As EventArgs) Handles
DeleteBtn.Click
If SelectServices.SelectedItem Is Nothing Then
MessageBox.Show("Please select a service to delete.")
Return
End If

Try
con.Open()
Dim cmd As New SqlCommand("DELETE FROM Services WHERE
[ServiceName] = @name", con)
cmd.Parameters.AddWithValue("@name",
SelectServices.SelectedItem.ToString())
cmd.ExecuteNonQuery()
con.Close()

MessageBox.Show("Service deleted successfully.")


ServicesName.Clear()
SelectServices.SelectedIndex = -1
LoadServices()
Catch ex As Exception
MessageBox.Show("Error deleting service: " & ex.Message)
con.Close()
End Try
End Sub
Private Sub selectservices_SelectedIndexChanged(sender As Object, e As
EventArgs) Handles SelectServices.SelectedIndexChanged
If SelectServices.SelectedIndex >= 0 Then
ServicesName.Text = SelectServices.SelectedItem.ToString()
End If
End Sub

Private Sub LblReceptionist_Click(sender As Object, e As EventArgs) Handles


LblReceptionist.Click
Dim AdminForm As Admin
Admin.Show()
Me.Close()

End Sub

Private Sub Label14_Click(sender As Object, e As EventArgs) Handles


Label14.Click
Dim InventoryForm As Inventory
Inventory.Show()
Me.Close()
End Sub

Private Sub Panel1_Paint(sender As Object, e As PaintEventArgs) Handles


Panel1.Paint

End Sub

Private Sub LblLogout_Click(sender As Object, e As EventArgs) Handles


lblLogout.Click
Dim result As DialogResult = MessageBox.Show("Are you sure you want to log
out?", "Logout Confirmation", MessageBoxButtons.YesNo,
MessageBoxIcon.Question)
If result = DialogResult.Yes Then
Me.Close()
Dim obj As New Login()
obj.Show()
End If
End Sub
End Class

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class Doctor1
Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list.


<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer


'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager =
New System.ComponentModel.ComponentResourceManager(GetType(Doctor1))
DataGridView1 = New DataGridView()
Label10 = New Label()
Panel2 = New Panel()
Label2 = New Label()
Panel1 = New Panel()
lblInventory = New Label()
PictureBox3 = New PictureBox()
lblLogout = New Label()
PictureBox5 = New PictureBox()
lblDashBoard = New Label()
lblPrescription = New Label()
PictureBox4 = New PictureBox()
PictureBox2 = New PictureBox()
Label1 = New Label()
Label6 = New Label()
PictureBox1 = New PictureBox()
CType(DataGridView1, ComponentModel.ISupportInitialize).BeginInit()
Panel2.SuspendLayout()
Panel1.SuspendLayout()
CType(PictureBox3, ComponentModel.ISupportInitialize).BeginInit()
CType(PictureBox5, ComponentModel.ISupportInitialize).BeginInit()
CType(PictureBox4, ComponentModel.ISupportInitialize).BeginInit()
CType(PictureBox2, ComponentModel.ISupportInitialize).BeginInit()
CType(PictureBox1, ComponentModel.ISupportInitialize).BeginInit()
SuspendLayout()
'
' DataGridView1
'
DataGridView1.ColumnHeadersHeightSizeMode =
DataGridViewColumnHeadersHeightSizeMode.AutoSize
DataGridView1.Location = New Point(283, 221)
DataGridView1.Margin = New Padding(4, 3, 4, 3)
DataGridView1.Name = "DataGridView1"
DataGridView1.Size = New Size(811, 312)
DataGridView1.TabIndex = 54
'
' Label10
'
Label10.AutoSize = True
Label10.BackColor = SystemColors.ControlLight
Label10.Font = New Font("Century Gothic", 14.25F, FontStyle.Bold,
GraphicsUnit.Point, CByte(0))
Label10.ForeColor = Color.Black
Label10.Location = New Point(626, 195)
Label10.Margin = New Padding(4, 0, 4, 0)
Label10.Name = "Label10"
Label10.Size = New Size(106, 23)
Label10.TabIndex = 53
Label10.Text = "Patient List"
'
' Panel2
'
Panel2.Controls.Add(Label2)
Panel2.Dock = DockStyle.Top
Panel2.Location = New Point(200, 0)
Panel2.Margin = New Padding(4, 3, 4, 3)
Panel2.Name = "Panel2"
Panel2.Size = New Size(974, 42)
Panel2.TabIndex = 48
'
' Label2
'
Label2.AutoSize = True
Label2.BackColor = SystemColors.ControlLight
Label2.Font = New Font("Century Gothic", 14.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label2.ForeColor = Color.DodgerBlue
Label2.Location = New Point(36, 10)
Label2.Margin = New Padding(4, 0, 4, 0)
Label2.Name = "Label2"
Label2.Size = New Size(73, 22)
Label2.TabIndex = 7
Label2.Text = "Doctor"
'
' Panel1
'
Panel1.BackColor = Color.LightSlateGray
Panel1.Controls.Add(lblInventory)
Panel1.Controls.Add(PictureBox3)
Panel1.Controls.Add(lblLogout)
Panel1.Controls.Add(PictureBox5)
Panel1.Controls.Add(lblDashBoard)
Panel1.Controls.Add(lblPrescription)
Panel1.Controls.Add(PictureBox4)
Panel1.Controls.Add(PictureBox2)
Panel1.Controls.Add(Label1)
Panel1.Controls.Add(Label6)
Panel1.Controls.Add(PictureBox1)
Panel1.Dock = DockStyle.Left
Panel1.Location = New Point(0, 0)
Panel1.Margin = New Padding(4, 3, 4, 3)
Panel1.Name = "Panel1"
Panel1.Size = New Size(200, 646)
Panel1.TabIndex = 47
'
' lblInventory
'
lblInventory.AutoSize = True
lblInventory.BackColor = Color.LightSlateGray
lblInventory.Font = New Font("Century Gothic", 14.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
lblInventory.ForeColor = Color.Black
lblInventory.Location = New Point(60, 374)
lblInventory.Margin = New Padding(4, 0, 4, 0)
lblInventory.Name = "lblInventory"
lblInventory.Size = New Size(100, 22)
lblInventory.TabIndex = 19
lblInventory.Text = "Inventory"
'
' PictureBox3
'
PictureBox3.Image = CType(resources.GetObject("PictureBox3.Image"),
Image)
PictureBox3.Location = New Point(-29, 323)
PictureBox3.Margin = New Padding(4, 3, 4, 3)
PictureBox3.Name = "PictureBox3"
PictureBox3.Size = New Size(116, 112)
PictureBox3.SizeMode = PictureBoxSizeMode.Zoom
PictureBox3.TabIndex = 18
PictureBox3.TabStop = False
'
' lblLogout
'
lblLogout.AutoSize = True
lblLogout.BackColor = Color.LightSlateGray
lblLogout.Font = New Font("Century Gothic", 14.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
lblLogout.ForeColor = Color.Red
lblLogout.Location = New Point(60, 592)
lblLogout.Margin = New Padding(4, 0, 4, 0)
lblLogout.Name = "lblLogout"
lblLogout.Size = New Size(75, 22)
lblLogout.TabIndex = 17
lblLogout.Text = "Logout"
'
' PictureBox5
'
PictureBox5.Image = CType(resources.GetObject("PictureBox5.Image"),
Image)
PictureBox5.Location = New Point(11, 578)
PictureBox5.Margin = New Padding(4, 3, 4, 3)
PictureBox5.Name = "PictureBox5"
PictureBox5.Size = New Size(41, 54)
PictureBox5.SizeMode = PictureBoxSizeMode.Zoom
PictureBox5.TabIndex = 15
PictureBox5.TabStop = False
'
' lblDashBoard
'
lblDashBoard.AutoSize = True
lblDashBoard.BackColor = Color.LightSlateGray
lblDashBoard.Font = New Font("Century Gothic", 14.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
lblDashBoard.ForeColor = Color.Black
lblDashBoard.Location = New Point(64, 263)
lblDashBoard.Margin = New Padding(4, 0, 4, 0)
lblDashBoard.Name = "lblDashBoard"
lblDashBoard.Size = New Size(104, 22)
lblDashBoard.TabIndex = 14
lblDashBoard.Text = "OverView"
'
' lblPrescription
'
lblPrescription.AutoSize = True
lblPrescription.BackColor = Color.LightSlateGray
lblPrescription.Font = New Font("Century Gothic", 14.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
lblPrescription.ForeColor = Color.Black
lblPrescription.Location = New Point(60, 159)
lblPrescription.Margin = New Padding(4, 0, 4, 0)
lblPrescription.Name = "lblPrescription"
lblPrescription.Size = New Size(108, 22)
lblPrescription.TabIndex = 12
lblPrescription.Text = "Presciption"
'
' PictureBox4
'
PictureBox4.Image = CType(resources.GetObject("PictureBox4.Image"),
Image)
PictureBox4.Location = New Point(-29, 221)
PictureBox4.Margin = New Padding(4, 3, 4, 3)
PictureBox4.Name = "PictureBox4"
PictureBox4.Size = New Size(116, 112)
PictureBox4.SizeMode = PictureBoxSizeMode.Zoom
PictureBox4.TabIndex = 11
PictureBox4.TabStop = False
'
' PictureBox2
'
PictureBox2.Image = CType(resources.GetObject("PictureBox2.Image"),
Image)
PictureBox2.Location = New Point(-29, 112)
PictureBox2.Margin = New Padding(4, 3, 4, 3)
PictureBox2.Name = "PictureBox2"
PictureBox2.Size = New Size(116, 112)
PictureBox2.SizeMode = PictureBoxSizeMode.Zoom
PictureBox2.TabIndex = 7
PictureBox2.TabStop = False
'
' Label1
'
Label1.AutoSize = True
Label1.BackColor = Color.LightSlateGray
Label1.Font = New Font("Century Gothic", 12F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label1.ForeColor = Color.White
Label1.Location = New Point(79, 80)
Label1.Margin = New Padding(4, 0, 4, 0)
Label1.Name = "Label1"
Label1.Size = New Size(56, 21)
Label1.TabIndex = 6
Label1.Text = "Home"
'
' Label6
'
Label6.AutoSize = True
Label6.Font = New Font("Century Gothic", 15.75F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label6.ForeColor = SystemColors.ActiveCaptionText
Label6.Location = New Point(60, 36)
Label6.Margin = New Padding(4, 0, 4, 0)
Label6.Name = "Label6"
Label6.Size = New Size(140, 24)
Label6.TabIndex = 5
Label6.Text = "Tooth Haven"
'
' PictureBox1
'
PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"),
Image)
PictureBox1.Location = New Point(-29, -33)
PictureBox1.Margin = New Padding(4, 3, 4, 3)
PictureBox1.Name = "PictureBox1"
PictureBox1.Size = New Size(141, 147)
PictureBox1.SizeMode = PictureBoxSizeMode.Zoom
PictureBox1.TabIndex = 3
PictureBox1.TabStop = False
'
' Doctor1
'
AutoScaleDimensions = New SizeF(7F, 17F)
AutoScaleMode = AutoScaleMode.Font
BackColor = SystemColors.ControlLight
ClientSize = New Size(1174, 646)
Controls.Add(DataGridView1)
Controls.Add(Label10)
Controls.Add(Panel2)
Controls.Add(Panel1)
Font = New Font("Century Gothic", 9F, FontStyle.Regular, GraphicsUnit.Point,
CByte(0))
FormBorderStyle = FormBorderStyle.None
Name = "Doctor1"
StartPosition = FormStartPosition.CenterScreen
Text = "Treatments"
CType(DataGridView1, ComponentModel.ISupportInitialize).EndInit()
Panel2.ResumeLayout(False)
Panel2.PerformLayout()
Panel1.ResumeLayout(False)
Panel1.PerformLayout()
CType(PictureBox3, ComponentModel.ISupportInitialize).EndInit()
CType(PictureBox5, ComponentModel.ISupportInitialize).EndInit()
CType(PictureBox4, ComponentModel.ISupportInitialize).EndInit()
CType(PictureBox2, ComponentModel.ISupportInitialize).EndInit()
CType(PictureBox1, ComponentModel.ISupportInitialize).EndInit()
ResumeLayout(False)
PerformLayout()
End Sub
Friend WithEvents DataGridView1 As DataGridView
Friend WithEvents Label10 As Label
Friend WithEvents Panel2 As Panel
Friend WithEvents Label2 As Label
Friend WithEvents Panel1 As Panel
Friend WithEvents lblLogout As Label
Friend WithEvents PictureBox5 As PictureBox
Friend WithEvents lblDashBoard As Label
Friend WithEvents lblPrescription As Label
Friend WithEvents PictureBox4 As PictureBox
Friend WithEvents PictureBox2 As PictureBox
Friend WithEvents Label1 As Label
Friend WithEvents Label6 As Label
Friend WithEvents PictureBox1 As PictureBox
Friend WithEvents lblInventory As Label
Friend WithEvents PictureBox3 As PictureBox

End Class

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Receptionist
Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list.


<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer


'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager =
New
System.ComponentModel.ComponentResourceManager(GetType(Receptionist))
PictureBox1 = New PictureBox()
Label6 = New Label()
Panel1 = New Panel()
LblWalkin = New Label()
PictureBox4 = New PictureBox()
lblReceipt = New Label()
lblLogout = New Label()
PictureBox5 = New PictureBox()
PictureBox2 = New PictureBox()
Label1 = New Label()
Panel2 = New Panel()
Label2 = New Label()
Label3 = New Label()
PatNameTb = New TextBox()
Label4 = New Label()
PatPhoneTb = New TextBox()
Label5 = New Label()
PatAddtb = New TextBox()
Label7 = New Label()
Label8 = New Label()
DOBDate = New DateTimePicker()
GenCb = New ComboBox()
Label9 = New Label()
AllergieTb = New TextBox()
Label10 = New Label()
PatientsDGV = New DataGridView()
SaveBtn = New Button()
EditBtn = New Button()
DeleteBtn = New Button()
CType(PictureBox1, ComponentModel.ISupportInitialize).BeginInit()
Panel1.SuspendLayout()
CType(PictureBox4, ComponentModel.ISupportInitialize).BeginInit()
CType(PictureBox5, ComponentModel.ISupportInitialize).BeginInit()
CType(PictureBox2, ComponentModel.ISupportInitialize).BeginInit()
Panel2.SuspendLayout()
CType(PatientsDGV, ComponentModel.ISupportInitialize).BeginInit()
SuspendLayout()
'
' PictureBox1
'
PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"),
Image)
PictureBox1.Location = New Point(-29, -33)
PictureBox1.Name = "PictureBox1"
PictureBox1.Size = New Size(141, 147)
PictureBox1.SizeMode = PictureBoxSizeMode.Zoom
PictureBox1.TabIndex = 3
PictureBox1.TabStop = False
'
' Label6
'
Label6.AutoSize = True
Label6.Font = New Font("Century Gothic", 15.75F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label6.ForeColor = SystemColors.ActiveCaptionText
Label6.Location = New Point(60, 34)
Label6.Name = "Label6"
Label6.Size = New Size(140, 24)
Label6.TabIndex = 5
Label6.Text = "Tooth Haven"
'
' Panel1
'
Panel1.BackColor = Color.LightSlateGray
Panel1.Controls.Add(LblWalkin)
Panel1.Controls.Add(PictureBox4)
Panel1.Controls.Add(lblReceipt)
Panel1.Controls.Add(lblLogout)
Panel1.Controls.Add(PictureBox5)
Panel1.Controls.Add(PictureBox2)
Panel1.Controls.Add(Label1)
Panel1.Controls.Add(Label6)
Panel1.Controls.Add(PictureBox1)
Panel1.Dock = DockStyle.Left
Panel1.Location = New Point(0, 0)
Panel1.Name = "Panel1"
Panel1.Size = New Size(200, 646)
Panel1.TabIndex = 0
'
' LblWalkin
'
LblWalkin.AutoSize = True
LblWalkin.BackColor = Color.LightSlateGray
LblWalkin.Font = New Font("Century Gothic", 14.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
LblWalkin.ForeColor = Color.Black
LblWalkin.Location = New Point(62, 264)
LblWalkin.Margin = New Padding(4, 0, 4, 0)
LblWalkin.Name = "LblWalkin"
LblWalkin.Size = New Size(68, 22)
LblWalkin.TabIndex = 22
LblWalkin.Text = "Walkin"
'
' PictureBox4
'
PictureBox4.Image = CType(resources.GetObject("PictureBox4.Image"),
Image)
PictureBox4.Location = New Point(-28, 221)
PictureBox4.Margin = New Padding(4, 3, 4, 3)
PictureBox4.Name = "PictureBox4"
PictureBox4.Size = New Size(116, 112)
PictureBox4.SizeMode = PictureBoxSizeMode.Zoom
PictureBox4.TabIndex = 21
PictureBox4.TabStop = False
'
' lblReceipt
'
lblReceipt.AutoSize = True
lblReceipt.BackColor = Color.LightSlateGray
lblReceipt.Font = New Font("Century Gothic", 14.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
lblReceipt.ForeColor = Color.Black
lblReceipt.Location = New Point(62, 159)
lblReceipt.Name = "lblReceipt"
lblReceipt.Size = New Size(81, 22)
lblReceipt.TabIndex = 20
lblReceipt.Text = "Receipt"
'
' lblLogout
'
lblLogout.AutoSize = True
lblLogout.BackColor = Color.LightSlateGray
lblLogout.Font = New Font("Century Gothic", 14.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
lblLogout.ForeColor = Color.Red
lblLogout.Location = New Point(59, 603)
lblLogout.Name = "lblLogout"
lblLogout.Size = New Size(75, 22)
lblLogout.TabIndex = 17
lblLogout.Text = "Logout"
'
' PictureBox5
'
PictureBox5.Image = CType(resources.GetObject("PictureBox5.Image"),
Image)
PictureBox5.Location = New Point(12, 589)
PictureBox5.Name = "PictureBox5"
PictureBox5.Size = New Size(41, 54)
PictureBox5.SizeMode = PictureBoxSizeMode.Zoom
PictureBox5.TabIndex = 15
PictureBox5.TabStop = False
'
' PictureBox2
'
PictureBox2.Image = CType(resources.GetObject("PictureBox2.Image"),
Image)
PictureBox2.Location = New Point(-29, 112)
PictureBox2.Name = "PictureBox2"
PictureBox2.Size = New Size(117, 112)
PictureBox2.SizeMode = PictureBoxSizeMode.Zoom
PictureBox2.TabIndex = 7
PictureBox2.TabStop = False
'
' Label1
'
Label1.AutoSize = True
Label1.BackColor = Color.LightSlateGray
Label1.Font = New Font("Century Gothic", 12F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label1.ForeColor = Color.White
Label1.Location = New Point(77, 78)
Label1.Name = "Label1"
Label1.Size = New Size(107, 21)
Label1.TabIndex = 6
Label1.Text = "Receptionist"
'
' Panel2
'
Panel2.Controls.Add(Label2)
Panel2.Dock = DockStyle.Top
Panel2.Location = New Point(200, 0)
Panel2.Name = "Panel2"
Panel2.Size = New Size(974, 42)
Panel2.TabIndex = 1
'
' Label2
'
Label2.AutoSize = True
Label2.BackColor = SystemColors.ControlLight
Label2.Font = New Font("Century Gothic", 14.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label2.ForeColor = Color.DodgerBlue
Label2.Location = New Point(36, 10)
Label2.Name = "Label2"
Label2.Size = New Size(127, 22)
Label2.TabIndex = 7
Label2.Text = "Receptionist "
'
' Label3
'
Label3.AutoSize = True
Label3.BackColor = SystemColors.ControlLight
Label3.Font = New Font("Century Gothic", 11.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label3.ForeColor = Color.Black
Label3.Location = New Point(262, 74)
Label3.Name = "Label3"
Label3.Size = New Size(53, 20)
Label3.TabIndex = 8
Label3.Text = "Name"
'
' PatNameTb
'
PatNameTb.Font = New Font("Century Gothic", 9.75F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
PatNameTb.Location = New Point(262, 102)
PatNameTb.Name = "PatNameTb"
PatNameTb.Size = New Size(160, 23)
PatNameTb.TabIndex = 4
'
' Label4
'
Label4.AutoSize = True
Label4.BackColor = SystemColors.ControlLight
Label4.Font = New Font("Century Gothic", 11.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label4.ForeColor = Color.Black
Label4.Location = New Point(262, 156)
Label4.Name = "Label4"
Label4.Size = New Size(85, 20)
Label4.TabIndex = 10
Label4.Text = "Phone No."
'
' PatPhoneTb
'
PatPhoneTb.Font = New Font("Century Gothic", 9.75F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
PatPhoneTb.Location = New Point(262, 185)
PatPhoneTb.Name = "PatPhoneTb"
PatPhoneTb.Size = New Size(160, 23)
PatPhoneTb.TabIndex = 9
'
' Label5
'
Label5.AutoSize = True
Label5.BackColor = SystemColors.ControlLight
Label5.Font = New Font("Century Gothic", 11.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label5.ForeColor = Color.Black
Label5.Location = New Point(486, 74)
Label5.Name = "Label5"
Label5.Size = New Size(67, 20)
Label5.TabIndex = 12
Label5.Text = "Address"
'
' PatAddtb
'
PatAddtb.Font = New Font("Century Gothic", 9.75F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
PatAddtb.Location = New Point(486, 105)
PatAddtb.Multiline = True
PatAddtb.Name = "PatAddtb"
PatAddtb.Size = New Size(160, 103)
PatAddtb.TabIndex = 11
'
' Label7
'
Label7.AutoSize = True
Label7.BackColor = SystemColors.ControlLight
Label7.Font = New Font("Century Gothic", 11.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label7.ForeColor = Color.Black
Label7.Location = New Point(701, 156)
Label7.Name = "Label7"
Label7.Size = New Size(66, 20)
Label7.TabIndex = 16
Label7.Text = "Gender"
'
' Label8
'
Label8.AutoSize = True
Label8.BackColor = SystemColors.ControlLight
Label8.Font = New Font("Century Gothic", 11.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label8.ForeColor = Color.Black
Label8.Location = New Point(701, 74)
Label8.Name = "Label8"
Label8.Size = New Size(113, 20)
Label8.TabIndex = 14
Label8.Text = "Date and Time"
'
' DOBDate
'
DOBDate.CalendarFont = New Font("Century Gothic", 11.25F,
FontStyle.Regular, GraphicsUnit.Point, CByte(0))
DOBDate.Font = New Font("Century Gothic", 9.75F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
DOBDate.Format = DateTimePickerFormat.Short
DOBDate.Location = New Point(701, 102)
DOBDate.Name = "DOBDate"
DOBDate.Size = New Size(160, 23)
DOBDate.TabIndex = 17
'
' GenCb
'
GenCb.Font = New Font("Century Gothic", 9.75F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
GenCb.FormattingEnabled = True
GenCb.Items.AddRange(New Object() {"Male", "Female"})
GenCb.Location = New Point(701, 183)
GenCb.Name = "GenCb"
GenCb.Size = New Size(160, 25)
GenCb.TabIndex = 18
'
' Label9
'
Label9.AutoSize = True
Label9.BackColor = SystemColors.ControlLight
Label9.Font = New Font("Century Gothic", 11.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label9.ForeColor = Color.Black
Label9.Location = New Point(913, 83)
Label9.Name = "Label9"
Label9.Size = New Size(70, 20)
Label9.TabIndex = 20
Label9.Text = "Allergies"
'
' AllergieTb
'
AllergieTb.Font = New Font("Century Gothic", 9.75F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
AllergieTb.Location = New Point(913, 112)
AllergieTb.Multiline = True
AllergieTb.Name = "AllergieTb"
AllergieTb.Size = New Size(160, 103)
AllergieTb.TabIndex = 19
'
' Label10
'
Label10.AutoSize = True
Label10.BackColor = SystemColors.ControlLight
Label10.Font = New Font("Century Gothic", 14.25F, FontStyle.Bold,
GraphicsUnit.Point, CByte(0))
Label10.ForeColor = Color.Black
Label10.Location = New Point(599, 345)
Label10.Name = "Label10"
Label10.Size = New Size(106, 23)
Label10.TabIndex = 21
Label10.Text = "Patient List"
'
' PatientsDGV
'
PatientsDGV.ColumnHeadersHeightSizeMode =
DataGridViewColumnHeadersHeightSizeMode.AutoSize
PatientsDGV.Location = New Point(268, 371)
PatientsDGV.Name = "PatientsDGV"
PatientsDGV.Size = New Size(811, 231)
PatientsDGV.TabIndex = 22
'
' SaveBtn
'
SaveBtn.BackColor = Color.Green
SaveBtn.Font = New Font("Century Gothic", 11.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
SaveBtn.Location = New Point(463, 258)
SaveBtn.Name = "SaveBtn"
SaveBtn.Size = New Size(130, 36)
SaveBtn.TabIndex = 23
SaveBtn.Text = "Save"
SaveBtn.UseVisualStyleBackColor = False
'
' EditBtn
'
EditBtn.BackColor = SystemColors.ControlDarkDark
EditBtn.Font = New Font("Century Gothic", 11.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
EditBtn.Location = New Point(599, 259)
EditBtn.Name = "EditBtn"
EditBtn.Size = New Size(130, 36)
EditBtn.TabIndex = 24
EditBtn.Text = "Edit"
EditBtn.UseVisualStyleBackColor = False
'
' DeleteBtn
'
DeleteBtn.BackColor = Color.Brown
DeleteBtn.Font = New Font("Century Gothic", 11.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
DeleteBtn.Location = New Point(735, 259)
DeleteBtn.Name = "DeleteBtn"
DeleteBtn.Size = New Size(130, 36)
DeleteBtn.TabIndex = 25
DeleteBtn.Text = "Delete"
DeleteBtn.UseVisualStyleBackColor = False
'
' Receptionist
'
AutoScaleDimensions = New SizeF(7F, 17F)
AutoScaleMode = AutoScaleMode.Font
BackColor = SystemColors.ControlLight
ClientSize = New Size(1174, 646)
Controls.Add(DeleteBtn)
Controls.Add(EditBtn)
Controls.Add(SaveBtn)
Controls.Add(PatientsDGV)
Controls.Add(Label10)
Controls.Add(Label9)
Controls.Add(AllergieTb)
Controls.Add(GenCb)
Controls.Add(DOBDate)
Controls.Add(Label7)
Controls.Add(Label8)
Controls.Add(Label5)
Controls.Add(PatAddtb)
Controls.Add(Label4)
Controls.Add(PatPhoneTb)
Controls.Add(Label3)
Controls.Add(PatNameTb)
Controls.Add(Panel2)
Controls.Add(Panel1)
Font = New Font("Century Gothic", 9F, FontStyle.Regular, GraphicsUnit.Point,
CByte(0))
FormBorderStyle = FormBorderStyle.None
Name = "Receptionist"
StartPosition = FormStartPosition.CenterScreen
Text = "Patients"
CType(PictureBox1, ComponentModel.ISupportInitialize).EndInit()
Panel1.ResumeLayout(False)
Panel1.PerformLayout()
CType(PictureBox4, ComponentModel.ISupportInitialize).EndInit()
CType(PictureBox5, ComponentModel.ISupportInitialize).EndInit()
CType(PictureBox2, ComponentModel.ISupportInitialize).EndInit()
Panel2.ResumeLayout(False)
Panel2.PerformLayout()
CType(PatientsDGV, ComponentModel.ISupportInitialize).EndInit()
ResumeLayout(False)
PerformLayout()
End Sub

Friend WithEvents PictureBox1 As PictureBox


Friend WithEvents Label6 As Label
Friend WithEvents Panel1 As Panel
Friend WithEvents Label1 As Label
Friend WithEvents Panel2 As Panel
Friend WithEvents Label2 As Label
Friend WithEvents Label3 As Label
Friend WithEvents PatNameTb As TextBox
Friend WithEvents Label4 As Label
Friend WithEvents PatPhoneTb As TextBox
Friend WithEvents Label5 As Label
Friend WithEvents PatAddtb As TextBox
Friend WithEvents Label7 As Label
Friend WithEvents Label8 As Label
Friend WithEvents DOBDate As DateTimePicker
Friend WithEvents GenCb As ComboBox
Friend WithEvents Label9 As Label
Friend WithEvents AllergieTb As TextBox
Friend WithEvents Label10 As Label
Friend WithEvents PictureBox2 As PictureBox
Friend WithEvents PatientsDGV As DataGridView
Friend WithEvents SaveBtn As Button
Friend WithEvents EditBtn As Button
Friend WithEvents DeleteBtn As Button
Friend WithEvents PictureBox5 As PictureBox
Friend WithEvents lblLogout As Label
Friend WithEvents lblReceipt As Label
Friend WithEvents PictureBox4 As PictureBox
Friend WithEvents LblWalkin As Label
End Class

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Login
Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list.


<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer


'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager =
New System.ComponentModel.ComponentResourceManager(GetType(Login))
Panel1 = New Panel()
lblAbout = New Label()
PictureBox2 = New PictureBox()
Label1 = New Label()
PictureBox1 = New PictureBox()
UnnameTb = New TextBox()
Label2 = New Label()
Label3 = New Label()
LoginBtn = New Button()
ForgotBtn = New Button()
Close = New Button()
PasswordTb = New TextBox()
Panel1.SuspendLayout()
CType(PictureBox2, ComponentModel.ISupportInitialize).BeginInit()
CType(PictureBox1, ComponentModel.ISupportInitialize).BeginInit()
SuspendLayout()
'
' Panel1
'
Panel1.BackColor = SystemColors.ControlDark
Panel1.Controls.Add(lblAbout)
Panel1.Controls.Add(PictureBox2)
Panel1.Dock = DockStyle.Left
Panel1.Location = New Point(0, 0)
Panel1.Name = "Panel1"
Panel1.Size = New Size(185, 428)
Panel1.TabIndex = 0
'
' lblAbout
'
lblAbout.AutoSize = True
lblAbout.Font = New Font("Century Gothic", 12F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
lblAbout.Location = New Point(53, 380)
lblAbout.Name = "lblAbout"
lblAbout.Size = New Size(61, 21)
lblAbout.TabIndex = 9
lblAbout.Text = "About"
'
' PictureBox2
'
PictureBox2.Image = CType(resources.GetObject("PictureBox2.Image"),
Image)
PictureBox2.Location = New Point(23, 14)
PictureBox2.Name = "PictureBox2"
PictureBox2.Size = New Size(140, 127)
PictureBox2.SizeMode = PictureBoxSizeMode.Zoom
PictureBox2.TabIndex = 5
PictureBox2.TabStop = False
'
' Label1
'
Label1.AutoSize = True
Label1.Font = New Font("Century Gothic", 21.75F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label1.ForeColor = SystemColors.ActiveCaptionText
Label1.Location = New Point(344, 51)
Label1.Name = "Label1"
Label1.Size = New Size(199, 36)
Label1.TabIndex = 1
Label1.Text = "Dental Clinic"
'
' PictureBox1
'
PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"),
Image)
PictureBox1.Location = New Point(360, 95)
PictureBox1.Name = "PictureBox1"
PictureBox1.Size = New Size(157, 104)
PictureBox1.SizeMode = PictureBoxSizeMode.Zoom
PictureBox1.TabIndex = 2
PictureBox1.TabStop = False
'
' UnnameTb
'
UnnameTb.Font = New Font("Century Gothic", 12F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
UnnameTb.Location = New Point(344, 240)
UnnameTb.Name = "UnnameTb"
UnnameTb.Size = New Size(233, 27)
UnnameTb.TabIndex = 3
'
' Label2
'
Label2.AutoSize = True
Label2.BackColor = SystemColors.Control
Label2.Font = New Font("Century Gothic", 12F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label2.ForeColor = SystemColors.ActiveCaptionText
Label2.Location = New Point(244, 244)
Label2.Name = "Label2"
Label2.Size = New Size(102, 21)
Label2.TabIndex = 5
Label2.Text = "User Name :"
'
' Label3
'
Label3.AutoSize = True
Label3.Font = New Font("Century Gothic", 12F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label3.ForeColor = SystemColors.ActiveCaptionText
Label3.Location = New Point(256, 301)
Label3.Name = "Label3"
Label3.Size = New Size(90, 21)
Label3.TabIndex = 6
Label3.Text = "Password :"
'
' LoginBtn
'
LoginBtn.BackColor = SystemColors.ButtonShadow
LoginBtn.Font = New Font("Century Gothic", 11.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
LoginBtn.Location = New Point(323, 351)
LoginBtn.Name = "LoginBtn"
LoginBtn.Size = New Size(125, 28)
LoginBtn.TabIndex = 7
LoginBtn.Text = " Log in"
LoginBtn.UseVisualStyleBackColor = False
'
' ForgotBtn
'
ForgotBtn.BackColor = SystemColors.ControlDark
ForgotBtn.Font = New Font("Century Gothic", 9F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
ForgotBtn.Location = New Point(472, 351)
ForgotBtn.Name = "ForgotBtn"
ForgotBtn.Size = New Size(125, 28)
ForgotBtn.TabIndex = 8
ForgotBtn.Text = "Forgot Password"
ForgotBtn.UseVisualStyleBackColor = False
'
' Close
'
Close.BackColor = Color.Brown
Close.ForeColor = Color.Transparent
Close.Location = New Point(623, 12)
Close.Name = "Close"
Close.Size = New Size(32, 23)
Close.TabIndex = 9
Close.Text = "X"
Close.UseVisualStyleBackColor = False
'
' PasswordTb
'
PasswordTb.Font = New Font("Century Gothic", 12F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
PasswordTb.Location = New Point(344, 295)
PasswordTb.Name = "PasswordTb"
PasswordTb.PasswordChar = "*"c
PasswordTb.Size = New Size(233, 27)
PasswordTb.TabIndex = 10
'
' Login
'
AutoScaleDimensions = New SizeF(7F, 17F)
AutoScaleMode = AutoScaleMode.Font
ClientSize = New Size(667, 428)
Controls.Add(PasswordTb)
Controls.Add(Close)
Controls.Add(ForgotBtn)
Controls.Add(LoginBtn)
Controls.Add(Label3)
Controls.Add(Label2)
Controls.Add(UnnameTb)
Controls.Add(PictureBox1)
Controls.Add(Label1)
Controls.Add(Panel1)
Font = New Font("Century Gothic", 9F, FontStyle.Regular, GraphicsUnit.Point,
CByte(0))
FormBorderStyle = FormBorderStyle.None
Name = "Login"
StartPosition = FormStartPosition.CenterScreen
Text = "Login"
Panel1.ResumeLayout(False)
Panel1.PerformLayout()
CType(PictureBox2, ComponentModel.ISupportInitialize).EndInit()
CType(PictureBox1, ComponentModel.ISupportInitialize).EndInit()
ResumeLayout(False)
PerformLayout()
End Sub

Friend WithEvents Panel1 As Panel


Friend WithEvents Label1 As Label
Friend WithEvents PictureBox1 As PictureBox
Friend WithEvents UnnameTb As TextBox
Friend WithEvents Label2 As Label
Friend WithEvents Label3 As Label
Friend WithEvents LoginBtn As Button
Friend WithEvents PictureBox2 As PictureBox
Friend WithEvents ForgotBtn As Button
Friend WithEvents lblAbout As Label
Friend WithEvents Close As Button
Friend WithEvents PasswordTb As TextBox
End Class

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Admin
Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list.


<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer


'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager =
New System.ComponentModel.ComponentResourceManager(GetType(Admin))
Panel2 = New Panel()
Label2 = New Label()
Panel1 = New Panel()
Label3 = New Label()
LblInventory = New Label()
lblLogout = New Label()
PictureBox5 = New PictureBox()
Label1 = New Label()
Label6 = New Label()
PictureBox1 = New PictureBox()
Label10 = New Label()
Panel2.SuspendLayout()
Panel1.SuspendLayout()
CType(PictureBox5, ComponentModel.ISupportInitialize).BeginInit()
CType(PictureBox1, ComponentModel.ISupportInitialize).BeginInit()
SuspendLayout()
'
' Panel2
'
Panel2.Controls.Add(Label2)
Panel2.Dock = DockStyle.Top
Panel2.Location = New Point(200, 0)
Panel2.Name = "Panel2"
Panel2.Size = New Size(974, 42)
Panel2.TabIndex = 24
'
' Label2
'
Label2.AutoSize = True
Label2.BackColor = SystemColors.ControlLight
Label2.Font = New Font("Century Gothic", 14.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label2.ForeColor = Color.DodgerBlue
Label2.Location = New Point(36, 10)
Label2.Name = "Label2"
Label2.Size = New Size(70, 22)
Label2.TabIndex = 7
Label2.Text = "Admin"
'
' Panel1
'
Panel1.BackColor = Color.LightSlateGray
Panel1.Controls.Add(Label3)
Panel1.Controls.Add(LblInventory)
Panel1.Controls.Add(lblLogout)
Panel1.Controls.Add(PictureBox5)
Panel1.Controls.Add(Label1)
Panel1.Controls.Add(Label6)
Panel1.Controls.Add(PictureBox1)
Panel1.Dock = DockStyle.Left
Panel1.Location = New Point(0, 0)
Panel1.Name = "Panel1"
Panel1.Size = New Size(200, 646)
Panel1.TabIndex = 23
'
' Label3
'
Label3.AutoSize = True
Label3.BackColor = Color.LightSlateGray
Label3.Font = New Font("Century Gothic", 14.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label3.ForeColor = Color.Black
Label3.Location = New Point(50, 239)
Label3.Margin = New Padding(4, 0, 4, 0)
Label3.Name = "Label3"
Label3.Size = New Size(84, 22)
Label3.TabIndex = 70
Label3.Text = "Services"
'
' LblInventory
'
LblInventory.AutoSize = True
LblInventory.BackColor = Color.LightSlateGray
LblInventory.Font = New Font("Century Gothic", 14.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
LblInventory.ForeColor = Color.Black
LblInventory.Location = New Point(50, 155)
LblInventory.Margin = New Padding(4, 0, 4, 0)
LblInventory.Name = "LblInventory"
LblInventory.Size = New Size(100, 22)
LblInventory.TabIndex = 63
LblInventory.Text = "Inventory"
'
' lblLogout
'
lblLogout.AutoSize = True
lblLogout.BackColor = Color.LightSlateGray
lblLogout.Font = New Font("Century Gothic", 14.25F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
lblLogout.ForeColor = Color.Red
lblLogout.Location = New Point(59, 603)
lblLogout.Name = "lblLogout"
lblLogout.Size = New Size(75, 22)
lblLogout.TabIndex = 17
lblLogout.Text = "Logout"
'
' PictureBox5
'
PictureBox5.Image = CType(resources.GetObject("PictureBox5.Image"),
Image)
PictureBox5.Location = New Point(12, 589)
PictureBox5.Name = "PictureBox5"
PictureBox5.Size = New Size(41, 54)
PictureBox5.SizeMode = PictureBoxSizeMode.Zoom
PictureBox5.TabIndex = 15
PictureBox5.TabStop = False
'
' Label1
'
Label1.AutoSize = True
Label1.BackColor = Color.LightSlateGray
Label1.Font = New Font("Century Gothic", 12F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label1.ForeColor = Color.White
Label1.Location = New Point(77, 78)
Label1.Name = "Label1"
Label1.Size = New Size(62, 21)
Label1.TabIndex = 6
Label1.Text = "Admin"
'
' Label6
'
Label6.AutoSize = True
Label6.Font = New Font("Century Gothic", 15.75F, FontStyle.Regular,
GraphicsUnit.Point, CByte(0))
Label6.ForeColor = SystemColors.ActiveCaptionText
Label6.Location = New Point(60, 34)
Label6.Name = "Label6"
Label6.Size = New Size(140, 24)
Label6.TabIndex = 5
Label6.Text = "Tooth Haven"
'
' PictureBox1
'
PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"),
Image)
PictureBox1.Location = New Point(-29, -33)
PictureBox1.Name = "PictureBox1"
PictureBox1.Size = New Size(141, 147)
PictureBox1.SizeMode = PictureBoxSizeMode.Zoom
PictureBox1.TabIndex = 3
PictureBox1.TabStop = False
'
' Label10
'
Label10.AutoSize = True
Label10.BackColor = SystemColors.ControlLight
Label10.Font = New Font("Century Gothic", 14.25F, FontStyle.Bold,
GraphicsUnit.Point, CByte(0))
Label10.ForeColor = Color.Black
Label10.Location = New Point(548, 265)
Label10.Name = "Label10"
Label10.Size = New Size(169, 23)
Label10.TabIndex = 62
Label10.Text = "Welcome Admin!"
'
' Admin
'
AutoScaleDimensions = New SizeF(7F, 17F)
AutoScaleMode = AutoScaleMode.Font
BackColor = SystemColors.ControlLight
ClientSize = New Size(1174, 646)
Controls.Add(Label10)
Controls.Add(Panel2)
Controls.Add(Panel1)
Font = New Font("Century Gothic", 9F, FontStyle.Regular, GraphicsUnit.Point,
CByte(0))
FormBorderStyle = FormBorderStyle.None
Name = "Admin"
StartPosition = FormStartPosition.CenterScreen
Text = "Admin"
Panel2.ResumeLayout(False)
Panel2.PerformLayout()
Panel1.ResumeLayout(False)
Panel1.PerformLayout()
CType(PictureBox5, ComponentModel.ISupportInitialize).EndInit()
CType(PictureBox1, ComponentModel.ISupportInitialize).EndInit()
ResumeLayout(False)
PerformLayout()
End Sub
Friend WithEvents Panel2 As Panel
Friend WithEvents Label2 As Label
Friend WithEvents Panel1 As Panel
Friend WithEvents lblLogout As Label
Friend WithEvents PictureBox5 As PictureBox
Friend WithEvents Label1 As Label
Friend WithEvents Label6 As Label
Friend WithEvents PictureBox1 As PictureBox
Friend WithEvents Label10 As Label
Friend WithEvents LblInventory As Label
Friend WithEvents Label3 As Label
End Class

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class About_Us
Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list.


<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub

Friend WithEvents TableLayoutPanel As


System.Windows.Forms.TableLayoutPanel
Friend WithEvents LogoPictureBox As System.Windows.Forms.PictureBox
Friend WithEvents LabelProductName As System.Windows.Forms.Label
Friend WithEvents TextBoxDescription As System.Windows.Forms.TextBox
Friend WithEvents OKButton As System.Windows.Forms.Button

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer


'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager =
New System.ComponentModel.ComponentResourceManager(GetType(About_Us))
TableLayoutPanel = New TableLayoutPanel()
Label3 = New Label()
Label2 = New Label()
Label1 = New Label()
LogoPictureBox = New PictureBox()
LabelProductName = New Label()
TextBoxDescription = New TextBox()
OKButton = New Button()
TableLayoutPanel.SuspendLayout()
CType(LogoPictureBox, ComponentModel.ISupportInitialize).BeginInit()
SuspendLayout()
'
' TableLayoutPanel
'
TableLayoutPanel.ColumnCount = 2
TableLayoutPanel.ColumnStyles.Add(New ColumnStyle(SizeType.Percent,
33F))
TableLayoutPanel.ColumnStyles.Add(New ColumnStyle(SizeType.Percent,
67F))
TableLayoutPanel.Controls.Add(Label3, 1, 3)
TableLayoutPanel.Controls.Add(Label2, 1, 2)
TableLayoutPanel.Controls.Add(Label1, 1, 1)
TableLayoutPanel.Controls.Add(LogoPictureBox, 0, 0)
TableLayoutPanel.Controls.Add(LabelProductName, 1, 0)
TableLayoutPanel.Controls.Add(TextBoxDescription, 1, 4)
TableLayoutPanel.Controls.Add(OKButton, 1, 5)
TableLayoutPanel.Dock = DockStyle.Fill
TableLayoutPanel.Location = New Point(14, 14)
TableLayoutPanel.Margin = New Padding(6, 4, 6, 4)
TableLayoutPanel.Name = "TableLayoutPanel"
TableLayoutPanel.RowCount = 6
TableLayoutPanel.RowStyles.Add(New RowStyle(SizeType.Percent, 10F))
TableLayoutPanel.RowStyles.Add(New RowStyle(SizeType.Percent, 10F))
TableLayoutPanel.RowStyles.Add(New RowStyle(SizeType.Percent, 10F))
TableLayoutPanel.RowStyles.Add(New RowStyle(SizeType.Percent, 10F))
TableLayoutPanel.RowStyles.Add(New RowStyle(SizeType.Percent, 50F))
TableLayoutPanel.RowStyles.Add(New RowStyle(SizeType.Percent, 10F))
TableLayoutPanel.Size = New Size(662, 417)
TableLayoutPanel.TabIndex = 0
'
' Label3
'
Label3.Dock = DockStyle.Fill
Label3.Location = New Point(228, 123)
Label3.Margin = New Padding(10, 0, 6, 0)
Label3.MaximumSize = New Size(0, 28)
Label3.Name = "Label3"
Label3.Size = New Size(428, 28)
Label3.TabIndex = 3
Label3.Text = "Tooth Haven Dental Clinic"
Label3.TextAlign = ContentAlignment.MiddleLeft
'
' Label2
'
Label2.Dock = DockStyle.Fill
Label2.Location = New Point(228, 82)
Label2.Margin = New Padding(10, 0, 6, 0)
Label2.MaximumSize = New Size(0, 28)
Label2.Name = "Label2"
Label2.Size = New Size(428, 28)
Label2.TabIndex = 2
Label2.Text = "Tooth Haven Dental Clinic"
Label2.TextAlign = ContentAlignment.MiddleLeft
'
' Label1
'
Label1.Dock = DockStyle.Fill
Label1.Location = New Point(228, 41)
Label1.Margin = New Padding(10, 0, 6, 0)
Label1.MaximumSize = New Size(0, 28)
Label1.Name = "Label1"
Label1.Size = New Size(428, 28)
Label1.TabIndex = 1
Label1.Text = "Tooth Haven Dental Clinic"
Label1.TextAlign = ContentAlignment.MiddleLeft
'
' LogoPictureBox
'
LogoPictureBox.Dock = DockStyle.Fill
LogoPictureBox.Image =
CType(resources.GetObject("LogoPictureBox.Image"), Image)
LogoPictureBox.Location = New Point(6, 4)
LogoPictureBox.Margin = New Padding(6, 4, 6, 4)
LogoPictureBox.Name = "LogoPictureBox"
TableLayoutPanel.SetRowSpan(LogoPictureBox, 6)
LogoPictureBox.Size = New Size(206, 409)
LogoPictureBox.SizeMode = PictureBoxSizeMode.Zoom
LogoPictureBox.TabIndex = 0
LogoPictureBox.TabStop = False
'
' LabelProductName
'
LabelProductName.Dock = DockStyle.Fill
LabelProductName.Location = New Point(228, 0)
LabelProductName.Margin = New Padding(10, 0, 6, 0)
LabelProductName.MaximumSize = New Size(0, 28)
LabelProductName.Name = "LabelProductName"
LabelProductName.Size = New Size(428, 28)
LabelProductName.TabIndex = 0
LabelProductName.Text = "Tooth Haven Dental Clinic"
LabelProductName.TextAlign = ContentAlignment.MiddleLeft
'
' TextBoxDescription
'
TextBoxDescription.Dock = DockStyle.Fill
TextBoxDescription.Location = New Point(228, 168)
TextBoxDescription.Margin = New Padding(10, 4, 6, 4)
TextBoxDescription.Multiline = True
TextBoxDescription.Name = "TextBoxDescription"
TextBoxDescription.ReadOnly = True
TextBoxDescription.ScrollBars = ScrollBars.Both
TextBoxDescription.Size = New Size(428, 200)
TextBoxDescription.TabIndex = 0
TextBoxDescription.TabStop = False
TextBoxDescription.Text = resources.GetString("TextBoxDescription.Text")
'
' OKButton
'
OKButton.Anchor = AnchorStyles.Bottom Or AnchorStyles.Right
OKButton.DialogResult = DialogResult.Cancel
OKButton.Location = New Point(530, 376)
OKButton.Margin = New Padding(6, 4, 6, 4)
OKButton.Name = "OKButton"
OKButton.Size = New Size(126, 37)
OKButton.TabIndex = 0
OKButton.Text = "&OK"
'
' About_Us
'
AutoScaleDimensions = New SizeF(10F, 21F)
AutoScaleMode = AutoScaleMode.Font
CancelButton = OKButton
ClientSize = New Size(690, 445)
Controls.Add(TableLayoutPanel)
Font = New Font("Century Gothic", 12F, FontStyle.Regular, GraphicsUnit.Point,
CByte(0))
FormBorderStyle = FormBorderStyle.FixedDialog
Margin = New Padding(6, 4, 6, 4)
MaximizeBox = False
MinimizeBox = False
Name = "About_Us"
Padding = New Padding(14)
ShowInTaskbar = False
StartPosition = FormStartPosition.CenterScreen
Text = "About_Us"
TableLayoutPanel.ResumeLayout(False)
TableLayoutPanel.PerformLayout()
CType(LogoPictureBox, ComponentModel.ISupportInitialize).EndInit()
ResumeLayout(False)

End Sub

Friend WithEvents Label3 As Label


Friend WithEvents Label2 As Label
Friend WithEvents Label1 As Label

End Class

You might also like