-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathModule1.bas
More file actions
122 lines (84 loc) · 3.07 KB
/
Module1.bas
File metadata and controls
122 lines (84 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Attribute VB_Name = "Module1"
'API declaration to create default pdf viewer
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public UserName As String
Public UID As String
Public Cn As New ADODB.Connection
Public Cm As New ADODB.Command
Public Rs As New ADODB.Recordset
Public Function ConnectDB()
DataLocation = App.Path & "\Database\Signup.accdb"
If Cn.State <> 1 Then ' if the database is not open
Cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & DataLocation & ";Persist Security Info=False"
Cn.Open
' Rs.Open "Select * from Signup", Cn, adOpenDynamic, adLockBatchOptimistic
' Cm.ActiveConnection = Cn
End If
'cm.Execute
End Function
Public Function switchoff()
With MDIForm1
.signup.Visible = True
.adminlogin.Visible = True
.hospitallogin.Visible = True
.Logout.Visible = False
.details.Enabled = False
.registration.Enabled = False
.release.Enabled = False
.reports.Enabled = False
.prescription.Enabled = False
.availability.Enabled = False
.doctorwisepatient.Enabled = False
.routinechart.Enabled = False
.Issuebill.Enabled = False
.totalbillingchart.Enabled = False
.remainingbeds.Enabled = False
.totalbookedbeds.Enabled = False
.patientbookinggraph.Enabled = False
.patientdepartmentgraph.Enabled = False
.patientdiseasegraph.Enabled = False
.doctordepartmentgraph.Enabled = False
.doctorpatientgraph.Enabled = False
.Label1.Visible = False
.UserButtonz1.Visible = False
.UserButtonz2.Visible = False
.UserButtonz3.Visible = False
.UserButtonz4.Visible = False
.UserButtonz5.Visible = False
.UserButtonz6.Visible = False
End With
End Function
Public Function switchon() 'called in login but the first 3 lines of code not working
With MDIForm1
.signup.Visible = False
.adminlogin.Visible = False
.hospitallogin.Visible = False
.Logout.Visible = True
.details.Enabled = True
.registration.Enabled = True
.release.Enabled = True
.reports.Enabled = True
.prescription.Enabled = True
.availability.Enabled = True
.doctorwisepatient.Enabled = True
.routinechart.Enabled = True
.Issuebill.Enabled = True
.totalbillingchart.Enabled = True
.remainingbeds.Enabled = True
.totalbookedbeds.Enabled = True
.patientbookinggraph.Enabled = True
.patientdepartmentgraph.Enabled = True
.patientdiseasegraph.Enabled = True
.doctordepartmentgraph.Enabled = True
.doctorpatientgraph.Enabled = True
.Label1.Visible = True
.UserButtonz1.Visible = True
.UserButtonz2.Visible = True
.UserButtonz3.Visible = True
.UserButtonz4.Visible = True
.UserButtonz5.Visible = True
End With
End Function
Function displayit()
'dashboard code here
End Function