Appointments Scheduler asp.
net project
This is a web based application that allows registered users to store appointments in web. The
first advantage with this is they can access their appointments irrespective of the physical
location, once they have access to Internet. The other major advantage of this application is; it
notifies users about the appointments, if users want notification. The entire application is built
with .Net and used the following technologies of .Net.
[Link] 3.5
C# Language
SQL Server 2005
Visual [Link] 2008
Layered Architecture with Presentation Layer and Data Access Layer
All database manipulations are done with stored procedures.
Stored procedures are accessed using classes in DAL.
ObjectDataSource is used in presentation layer to talk to DAL.
GridView, FormView, TreeView, Calendar and other core controls are used for interface.
Membership and login controls are used to implement security.
Master page and themes are used
Site navigation is done using Site Map.
[Link] is used to access database
The following are the major operations in this application.
User Registration
Login
Password Recovery
Change password
List of upcoming appointments
Adding a new appointment
Searching for appointments
List of all appointments
List of appointments by date
List of users of the system
Deleting an existing appointment
Editing details of an existing appointment
Logout
Steps to download, deploy and run this project
The following are the steps to be taken to run the existing part of the application. This project
makes use of membership feature of [Link]. The download contains all tables and stored
procedures created by us as well as [Link].
So all that you have to do is download, unzip, open project in Visual [Link] and run
[Link] file. Here are the steps given below:
1. Download [Link] and unzip it into any directory in your system. For example,
if you extract to c:\ then it will create a directory c:\appointments.
2. Open Visual [Link] 2008 or Visual Web Developer 2008.
3. Open the project from the directory into which you extracted project. For example,
c:\appointments
4. Go to Solution Explorer and make [Link] the startup page.
5. Run project from Visual [Link] 2008 or Visual Web Developer 2008.
6. You should see [Link] page.
7. Create new user using registration page and then login with that user name
8. Test the rest of the options.
Appointments Administrator Application
The other application that is related to this requirement is notification application, which is run
for every one hour. It finds out whether there are any appointments that need notification and
sends mails to concerned users.
Here are the steps related to this project.
Create a new project using File->New -> Project. Select Visual C# as the language and
Console Application as the type of the project.
Enter name as appointmentsadmin
Rename [Link] to [Link] and Program class to
AppointmentsAdmin
Write the following code in Main() method of AppointmentsAdmin class
// program assumes database [Link] at c:\appointments\app_data
folder. If that is not the case, change the path in the code.
// It expects database to have GetAppointmentsToNotify stored
procedure, which retrieves appointments that are to be notified.
using
using
using
using
using
System;
[Link];
[Link];
[Link];
[Link];
namespace appointmentsadmin
{
class AppointmentsAdmin
{
static void Main(string[] args)
{
[Link]("Sending Appointment Reminders...");
Thread t = new Thread(SendMails);
[Link]();
}
public static void SendMails()
{
while (true)
{
// connect to database
SqlConnection con = new SqlConnection(@"Data
Source=.\SQLEXPRESS;AttachDbFilename=c:\appointments\app_data\ASPNETDB.M
DF;Integrated Security=True;User Instance=True");
try
{
[Link]();
SqlCommand cmd = new
SqlCommand("GetAppointmentsToNotify", con);
[Link] = [Link];
SqlDataReader dr = [Link]();
while ([Link]())
{
// send mail
MailMessage m = new MailMessage();
[Link](new
MailAddress(dr["email"].ToString()));
[Link] = new MailAddress("admin@[Link]");
// change from address accordingly
[Link] = "Appointment Reminder";
[Link] = true;
[Link] = "Hi" + dr["username"] + "<p/> This is
to remind you about the following appointment.<p/>"
+ "Title : " + dr["title"] + "<p/>" +
"Appointment Date : " + dr["appdate"] + "<p/>Admin,<br/>
[Link]";
SmtpClient server = new SmtpClient("classroom");
// change server name accordingly
try
{
[Link](m);
}
catch(Exception ex)
{
[Link]("Could not send mail to "
+ dr["email"]);
}
}
[Link]();
[Link]();
}
catch (Exception ex)
{
[Link]([Link]);
break;
}
[Link]("Sent reminders at : " +
[Link]);
[Link](1000 * 60 * 60);
// 60 min
}
}
}
}
Build the project and run [Link] file from bin\Debug directory. It
starts but never ends. It sends mails for every 1 hour. It uses an exclusive thread that
wakes up for every one hour and sends messages.