You are on page 1of 67

INDUSTRIAL TRAINING REPORT

ON
WEB DEVELOPMENT
BACHELOR OF TECHNOLOGY

COMPUTER SCIENCE & ENGINEERING

Submitted by :-
Ashish Kumar Agnihtori
(Roll no. 1904290100011)
Under the guidance of
Mr. Sarvesh Agrawal
Submitted by :-
Mr. Atul Mathur
(HOD CSE)
Naraina Vidyapeeth Engineering and management institute
2022-2023
ABSTRACT
A training report reflect the 6 weeks summer training at Internshala Pvt.ltd.

The report has details of the practical experience and the academic knowledge that I
have gained from INTERNSHALA during these 6 weeks as a student also it is also
include details of many project that I have conduct and involved .

I have the report of Web Development . I have tried my best elucidate all the relevant
details to be included in the report while in the beginning I have tried to give a general
view about this language.
ACKNOWLEDGEMENT

It is our priviledge and duty to acknowledge the kind of help and guidance received
from several people in preparation of this report .it would not have been possibleto
prepare this report in this from without their valuable help , cooperation and
guidance .
First and foremost , we wish to record our sincere graduate to prof. Mr.Atul Mathur
for his constant and encouragement in preparation of this report and for making
available library and laboratory facilities needed to prepare this report .
The seminar on web development was very helpful to us in giving the necessary
background information and inspiration in choosing this topic for the seminar . their
contribution and technical support in preparation this report are greatly
acknowledged .
Last but no the least , we wish to think our parent for financing our studies in this
collage as well as for constantly encouraging us to learn engineering . Their personal
sacrifies is providing this opportunity to learn engineering is greatefully
acknowledgement.
DECLARATION

I , Ayush Verma hereby declare that the report entitled “WEB


DEVELOPMENT” submitted by me in the partial fulfilment of
the requirements of the summer internship of Bachelor of
Technology (Computer Science and Engineering) of Dr. A P J
Abdul Kalam TECHNICAL UNIVERSITY , is the record of my
own work carried under supervision and guidance Saurav
Bhadauriya .To the best of my knowledge this seminar report has
not been submitted to any other university or institution for the
award of any degree .
Table of Content

1. Introduction

1.1 Problem Statement

1.2 Objective

1.3 Scope of Project

1.4 Tools Used

2. Project Management

2.1 Project Planning and Scheduling

2.1.1 Methodology

2.1.2 Project Management Life Cycle

2.1.3 Project Plan

2.1.4 Schedule Representation

2.2 Risk Management

3. System Analysis

3.1 Background Study

3.2 Software System Attributes

3.2.1 Reliability

3.2.2 Availability

3.2.3 Security

3.3 Scope of working


3.4 Feasibility study

3.4.1 Technical Feasibility

3.4.2 Operational Feasibility

3.4.3 Economic Feasibility

3.4.4 Management Feasibility

3.4.5 Social Feasibility

4. System Design

4.1 Database Design

4.2 E-R Diagram of Hospital Management System

4.3 Database Schema of Hospital Management System

4.4 Data flow diagram of Hospital Management System

4.5 User Interface

4.5.1 Home Page

4.5.2 Admin Panel Page

4.5.3 Doctor Panel

4.5.4 Reception Panel

5. System Implementation

5.1 Implementation

5.2 Implementation Environment

5.3 Functional Requirement

5.3.1 Administrator Interface

5.3.2 User Interface

6. System Testing

6.1 Integration Testing

6.2 Unit Testing

6.3 System Testing

6.4 Acceptance Testing


6.5 Recovery Testing

6.6 Functional Testing

6.7 Hardware/Software Testing

6.8 Security Testing

6.9 Advantages

7. Conclusion

7.1 Conclusion

7.2 Limitations of the system

7.3 Future Plan

8 . Certificate of Training
Intorduction
The project Hospital Management system includes registration of patients, storing their details into
the system, and also computerized billing in the pharmacy, and labs. The software has the facility to
give a unique id for every patient and stores the details of every patient and the staff automatically. It
includes a search facility to know the current status of each room.
User can search availability of a doctor and the details of a patient using the id. The Hospital
Management System can be entered using a username and password. It is accessible either by an
administrator or receptionist. Only they can add data into the database. The data can be retrieved
easily. The interface is very user-friendly. The data are well protected for personal use and makes the
data processing very fast.

1.1 Problem Statement

Since Hospital is associated with the lives of common people and their day-to-day routines so I decide
to work on this project. The manual handling of the record is time consuming and highly prone to
error. The purpose of this project is to automate or make online, the process of day-to-day activites
like Room activites, Admission of new patient , Discharge of patient , Assign a Doctor, and finally
compute the bill etc. I have tried my best to make the comlicated process Hospital Management
System as simple as possible using Structured & Modular technique & Menu oriented interface.

1.2 Objective

The purpose of the project entitled as “ HOSPITAL MANAGEMENT SYSTEM” is to computerize


the Front Office Management of Hospital to develop software which is user friendly, simple, fast, and
cost – effective. It deals with the collection of patient’ s information, diagnosis details, etc. A form is a
major part of Visual Basic application, which allows the user to enter the data as well as view the
result. A control is an object that we draw on a form to enable or enhance user interaction with an
application. 8 Hence a Visual Basic application is a combination of object like forms and controls,
procedures that can respond to Events and other general-purpose procedure. Event procedures are
where we do the actual computer programming and are saved with the form in the file with the form
extension. These procedures are where we write BASIC language statements.

1.3 Scope of Project

Hospitals and healthcare centre have undergone a change for its betterment. The administrations of
healthcare sector are opting IT solutions for the better management and patient care in their hospital
campus. Have a look at some salient features of hospital management software. Daily functions like
patient registration, monitoring blood bank, managing admission and overall management of various
departments can be easily performed with higher accuracy after the installation of hospital software.
Since, every hospital has some or the other points of worth those vary in comparison with to its
competitors. Hence, most of the IT companies give on-demand solutions or feature of customization. It
further implicates that hospital information management software can be customized by specifying
personal requirements of the campus. The automated functions of online hospital software make
productivity effective. This web based IT solution has automated operations and permit officials to
continue with their work in a swift manner. It further implicates that complete
automation of the hospital software makes productivity easily obtainable. All in all, this
enhances the infrastructure of hospital administration.

Tools Used
Software Tools:

Server Side : ASP.Net 4.5, C# 5.0 Client

Side : Java Script

Layout : HTML, CSS

Database : MS-SQL

Plateform:

Frontend : Visual Studio 2013

Backand : MS- SQL Server 2008 R2

Software Requirement:

Operating System : Windows XP/7/8/8.1/10

Language Used : C# with .NET Framework

Database : MS-SQL Server 2008 R2

Browser : Google Chrome

For Documentation : Microsoft Word 2007,2010,2013

Hardware Tools:

System : IBM compatible PC’s

Processor : Core 2 Duo Processor RAM

: 2 GB RAM

HDD : 160 G

Input Device : Keyboard Mouse


Project Management
2.1 Project planning and scheduling

Project planning is a part of project management which relates to the use of shedules such as Gantt
charts to plan and subsequently report progess within the project environment. Initially, the project
scope is defined and the appropriate methods for complete the project are determined . Following this
step, the durations for the various tasks necessary to complete the work are listed and grouped into a
work breakdown structure.

2.1.1. Methodology

We have used Iterative and Incremental Development model (IID) for our project development. This
development approach is also referred to as Iterative waterfall Development approach. Iterative and
Incremental Development is a software development process developed in response to the more
traditional waterfall model. This model is designed to take care of such big project. The large and
complicated project chiefly demand better development and testing procedure

Fig 2.1 Waterfall model

2.1.2. Project Management Life Cycle


The Project Management Life Cycle has four phases. Each project life cycle phase is describe along with
the tasks need to complete it.

The four phases is

1. Initiation

2. Planning

3.Execution

4.Closure

Fig 2.2: Iterative and Incremental Life Cycle

2.1.3 Project Plan

1 Task Name Duration Start Finish


2 Planning 31 days 1/3/2020 31/3/2020
3 Design 28 days 1/4/2020 28/4/2020
4 Coding 29 days 29/4/2020 27/5/2020
5 Delivery 8 days 28/5/2020 4/6/2020
2.1.4. Schedule Representation

Schedule the project tasks is an important project planning activity. It involves deciding which
tasks would be taken up when. In order to schedule the project activities, a software project
manager needs to do the following this rules.

Gantt chart:

Week 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Planning
Design
Coding
Testing
Delivery

Fig 2.3 Gantt Chart

2.2 Risk Management

Software Risk Management is a proactive approach for minimizing the uncertainly and potential
loss associated with a project . Some categories of risk included product size, business impact,
customer- related , process technology, development environment, staffing
,schedule, and cost. Risk Management is a practice with process , methods, and tools for
managing risk in a project.

Risk identification is a systematic attempt to specify threats to the project Plan. By identifying known
and predictable risks, we can take a first step toward avoiding them when possible and controlling
them when necessary. To perform the risk identification. We categorized the risk into different
categories as:

1. Project Risk

2. Technical Risk

3. Business Risk

4. Known Risk

5. Predictable Risk

6. Unpredictable

System Analysis
3.1 Background Study

System Analysis is a separation of a substance into parts for study and their implementation and
detailed examination. Before designing any system it is important that the nature of the business and
the currently operates are clearly understood. The detailed examination provides the specific data
required during designing in order to ensure that all the client’s requirement are fulfilled. The
investigation or the study conducted during to analysis and feasibility phase overlap. High level
analysis begins during the feasibility study. Though analysis is represented as one phase of the system
development life cycle (SDLC) , this is not true.
Analysis begins with system initialization and continues until its maintenance.

3.2 Software system attributes

3.2.1 Reliability: This application is a reliable product that produces fast & verified output
of all its process.

3.2.2 Availability: This application will be available to use and help them to carry their
operations conveniently.

3.2.3 Security: This application will be designed in a maintainable manner. It will be easy to
incorporate new requirements in the individual modules.

3.3 Scope of working:

The proposed software product is the Hospital Management System. The system will be used in any
hospital, clinic , dispensary or pathology labs. Clinic, dispensary or pathology to get the information
from the patients and then storing that data for future usage. The current system in use is a paper
based system. It is too slow and cannot provide update lists of patients within reasonable timeframe.
The intention of the system is to reduce over time pay and increase the number of patients that can be
treated accurately.

3.4 Feasibility study

3.4.1 Technical feasibility: This is concerned with specifying equipment and software that
will successfully satisfying the user requirement; the technical needs of the system may vary
considerably ,but might include: The facility to produce outputs in a given time:

1. Response time under conditions.

2. Ability to process a certain volume of transaction at a particular seep.

3. Facility to communicate data to distant location.

3.4.2 Operational Feasibility: It is mainly related to human organization and political


aspects. The points to be considered are:
1. What changes will be brought with the system?

2. What organizational structure are distributed?

3. What new skills will be required? Do the existing staff members have these skill ? If not,
can then the trained due course of time

3.4.3 Economic Feasibility: Economic analysis is the most frequently used technique for
evaluating the effectiveness off a propose system. More frequently used technique for
evaluating the effectiveness of a proposed system. More frequently known as cost benefit
system and compare them with costs. If benefits outweigh costs, a decision is taken to design
and implement the system.

3.4.4 Management Feasibility: it is a determination of weather a proposed project will be


acceptable to management. If does not accept a project of gives a negligible support to it; the
analyst will tend to view the project as a no feasible one.

3.4.5 Social Feasibility: Social Feasibility is a determination of whether the project will be
acceptable to the people or not. This determination typically examines the probability of the
project accepted by the group directly affected by the proposed system change.
System Design
4.1 Database Design

Database design is the process of producing a detailed data model of database. This data model
contains all the need logical and physical design choices and physics storage parameter needed to
generate a design in a data definition language, which can then be used to create a database. A fully
attributed data model contains detailed for each entity.

The term database design can be used to describe many different part of the design of an overall
database system. Principally, and most correctly, it can be thought of as the logical design of the base
data structure used to store the data. In the relational model these are the tables and views. In an object
database the entities and relationships map directly to object classes and named relationships.
However, the term database design could also be used to apply to the overall process of designing, not
just the base data structure, but also the forms and queries used as part of the overall database
application within the database management system.

4.2 E-R Diagram of Hospital Management System

Entity relationship diagram is used in modern database software engineering to illustrate logical
structure of database. It is a relational schema database modeling method used to model a system and
approach. This approach commonly used in database design. The diagram created using this method is
called E-R diagram.
Fig, 4.1 E-R Diagram

4.3 Database schema of Hospital management system

A database schema is the skeleton structure that represents the logical view of the entire database. It
defines how the data is organized and how the relations among them are associated. It formulates all
the constraints that are to be applied on the data. A database schema defines its entities and the
relationship among them. It contains a descriptive detail of the database, which can be depicted by
means of schema diagrams. It’s the database designers who design the schema to help programmers
understand the database and make it useful.
Fig. 4.2 Database Schema

A database schema can be divided broadly into two categories –

• Physical Database Schema − This schema pertains to the actual storage of data and its
form of storage like files, indices, etc. It defines how the data will be stored in a secondary
storage.

• Logical Database Schema − This schema defines all the logical constraints that need to be
applied on the data stored. It defines tables, views, and integrity constraints.

4.4 Data Flow Diagram Of Hospital Management System

Hospital Management System Data flow diagram is often used as a preliminary step to create an
overview of the Hospital without going into great detail, which can later be elaborated.it normally
consists of overall application dataflow and processes of the Hospital process.

In Software engineering DFD(data flow diagram) can be drawn to represent the system of different
levels of abstraction. Higher level DFDs are partitioned into low levels-hacking more information
and functional elements. Levels in DFD are numbered 0, 1, 2 or beyond.
Here, we will see mainly 3 levels in data flow diagram, which are: 0-level DFD, 1-level DFD, and 2-
level DFD.

0- level DFD: It is also known as context diagram. It’s designed to be an abstraction view,
showing the system as a single process with its relationship to external entities. It represent
the entire system as single bubble with input and output data indicated by incoming/outgoing
arrows.

Fig 4.3 0-level DFD

1- level DFD:

In 1-level DFD, context diagram is decomposed into multiple bubbles/processes.in this level we
highlight the main functions of the system and breakdown the high level process of 0-level DFD into
subprocesses.

Fig 4.4 Level DFD

2- level DFD:
2-level DFD goes one step deeper into parts of 1-level DFD. It can be used to plan or record the
specific/necessary detail about the system’s functioning.

Fig 4.5 level DFD

4.5 User Interface


4.5.1 Home Page

Actor: Admin

Doctor

Reception
Fig 4.5 Login Page

4.5.2 Admin Panel Page


Actor: Admin Users

Output: Admin Panel

Fig 4.6 Admin Panel

4.5.3 Doctor Panel


Actor: Doctor

Output: Doctor Panel

Fig 4.7 Doctor Panel

4.5.4 Reception Panel


Actor: receptionist

Output: Reception Panel

Fig .4.8 Reception Panel


Implementation
5.1 Implementation

Implemantation is the process of having system personal check out and provide new equipment’s
into, use train the user to install a new application and construct any files of data needed to use it.
There are three types of implementation . Implementation of computer system to replace a manual
system. To problem encountered are covering files, training user, creating accurate files and verifying
print outs for integrity. Implementation of a new computer system to replace an existing one. This is
usually difficult conversion. If not properly planned , there can be many problems. So large computer
system many take as long as a year to convert. This type of conversing is relatively easy to handle,
usually there are no major change in the file. Our project is yet to be implemented.

5.2 Implemenation Environment

The implementation view of softaware requirement present the real wordmanifestation of processing
function and information structure. This computerized system is specified in a manner that dictates
accommodation of certain implementation details. The implementation envoirnment of the developed
system facilities multiple user to use this system simultaneously. This user interface are designed
keeping in mind that the users of this system are familiar to using GUI – based system. Thus, we
restricted ourselves to developing a GUI- based system so that it becames easier for the end user to
get acquainted to the developed system.

5.3 Functional Requirement

This system interface is divided into two section

❖ Administrator interface
❖ Users interface.

5.3.1 Administrator Interface

❖ Administrator can delete any post.


❖ Administrator can verified user account.

5.3.2 User Interface

❖ User can browse all ads withoit any account.


❖ 2.For post an ad need to creat an account
❖ User can update edit their own account.
❖ Log in and Log out system.
❖ To create a new account user must be needs to verify his email with verification code.
System Testing
6.1 Integration Testing

Integration testing done befor during the after integration of a new module into the main software
package. The involves testing of each individual code module. One piece of software can contain several
module which are often created by several different programmers.

6.2 Unit Testing

Unit testing performed on each module or block of code during development.Unit testing is normally
done by the programmer who writes the code.

6.3 System Testing

System testing done by a professional testing agent on the completed software product before it is
introduced to the market.

6.4 Acceptance Testing

Acceptance testing is a beta testing of the product done by the actual end user.

6.5 Recovery Testing

Recovery testing is done to demonstrate a software salution is reliable, trustworthy and can
successfully recoup form possible crashes.

6.6 Functional Testing

Functional testing also known as functional testing. Functional Testing involves trying to think to any
possible missing functions. Testers might make a list of additional functionalities that a product could
to improve it during functional testing.

6.7 Hardware/Software Testing

IBM refers to Hardware/Software testing as “HW/SW Testing ”. This is when the tester focuses
his/her attention on the interactions between the hardware and software during system testing.

6.8 Security Testing

Security testing is a variant of software Testing which ensures, that system and applications in an
organization, are free from any loopholes that may cause a big loss. Sequrity testing of any system is
about finding all possible loopholes and weakness of the system which might result into a loss of
information at the hands of the employees or outsiders of the Organization.

6.9 Advantages

The software help to handle the entire administration of hospitals and healthcare facilities.
Typicallty, such a software includes various modules that help doctors manage their
assign,ents and schedules, carry out patient registration , maintain store inventory records, keep track
of medicine,administration, maintain blood bank (with available blood type) details, financial
information, including final billing & payment, insurance details and much more.

Login.cs

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Configuration; using

System.Data;

using System.Data.SqlClient;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;
namespace TryWindowsForm

public partial class Login : Form

static string con =


ConfigurationManager.ConnectionStrings["hospital"].ConnectionString;

SqlConnection cn = new SqlConnection(con);

public Login()

InitializeComponent();

private void btnexit_Click(object sender, EventArgs e)

Application.Exit();

private void btnlogin_Click(object sender, EventArgs e)

string id = txtid.Text; string

pass = txtpass.Text;

if(comboBox1.SelectedIndex==0)

if (id == "admin" && pass == "123")

{
administration admin = new administration(); this.Hide();

admin.Show();

else

MessageBox.Show("Error ...................................... ");

else if(comboBox1.SelectedIndex==1)

cn.Open();

SqlCommand cmd = new SqlCommand("select * from Add_doctor where id='" + txtid.Text +


"'and password='" + txtpass.Text + "'", cn);

SqlDataReader dr = cmd.ExecuteReader(); if

(dr.Read())

DoctorHome doc = new DoctorHome();

this.Hide();

doc.Show();

doc.DataTransfe(dr[0].ToString(),dr[1].ToString(),dr[2].ToString(),dr[3].ToString(),dr[4].ToS
tring(),dr[5].ToString(),dr[6].ToString(),dr[7].ToString(),dr[8].ToString());

else

MessageBox.Show("Admin id & Password not match !!! ");


}

cn.Close();

else if (comboBox1.SelectedIndex == 2)

if (id == "reception" && pass == "123")

Reception rec = new Reception();

this.Hide();

rec.Show();

else

MessageBox.Show("Error ...................................... ");

else

MessageBox.Show("Plese select any One Option ...................................................... ");

private void Login_Load(object sender, EventArgs e)

{
}

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)

if(comboBox1.SelectedIndex==0)

txtid.Text = "admin";

txtpass.Text = "123";

else if(comboBox1.SelectedIndex==1)

txtid.Text = "doctor";

txtpass.Text = "123";

else if(comboBox1.SelectedIndex==2)

txtid.Text = "reception";

txtpass.Text = "123";

administration.cs
using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq; using

System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace TryWindowsForm

public partial class administration : Form

public administration()

{
InitializeComponent();

private void btnadd_user_Click(object sender, EventArgs e)

add_user au = new add_user();

au.ShowDialog();

private void btnlogout_Click(object sender, EventArgs e)

DialogResult dialog = MessageBox.Show("Do You Really want to close the


program?", "Exit", MessageBoxButtons.YesNo);

if (dialog == DialogResult.Yes)

this.Hide();

Login l = new Login();

l.Show();

private void administration_FormClosing(object sender, FormClosingEventArgs e)

DialogResult dialog = MessageBox.Show("Do You Really want to close the


program?", "Exit", MessageBoxButtons.YesNo);

if (dialog == DialogResult.Yes)

Application.Exit();
}

else

e.Cancel = true;

private void btnadd_patient_Click(object sender, EventArgs e)

Add_patient ap = new Add_patient();

ap.ShowDialog();

private void btnDischarge_Patient_Click_1(object sender, EventArgs e)

Discharge_Patient dp = new Discharge_Patient();

dp.ShowDialog();

private void btnall_patient_Click(object sender, EventArgs e)

Patient_Information ai = new Patient_Information();

ai.ShowDialog();

private void btnAdd_Staff_Click(object sender, EventArgs e)


{

Add_Staff asa=new Add_Staff();

asa.ShowDialog();

private void btnall_Staff_Click(object sender, EventArgs e)

Staff_Information st = new Staff_Information();

st.ShowDialog();

private void btnAdddoctor_Click(object sender, EventArgs e)

Add_Doctor ad = new Add_Doctor();

ad.ShowDialog();

private void btnalldoctor_Click(object sender, EventArgs e)

Doctor_Information di = new Doctor_Information();

di.ShowDialog();

private void btndocsalary_Click(object sender, EventArgs e)

Doctor_Salary ds = new Doctor_Salary();


ds.ShowDialog();

private void btnstaffsalary_Click(object sender, EventArgs e)

Staff_Salary ss = new Staff_Salary();

ss.ShowDialog();

private void administration_Load(object sender, EventArgs e)

timer1.Start();

label2.Text = DateTime.Now.ToLongDateString(); label3.Text =

DateTime.Now.ToLongTimeString();

private void timer1_Tick(object sender, EventArgs e)

label3.Text = DateTime.Now.ToLongTimeString();

timer1.Start();

Add_user.cs
using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq; using

System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace TryWindowsForm

public partial class add_user : Form

public add_user()

InitializeComponent();
}

private void btnclose_Click(object sender, EventArgs e)

this.Hide();

private void btnsubmit_Click(object sender, EventArgs e)

private void add_user_Load(object sender, EventArgs e)

textBox1.Enabled = false;

textBox2.Enabled = false;

textBox3.Enabled = false;

Add_patient.cs
using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq; using

System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace TryWindowsForm

public partial class Add_patient : Form

static string gender,married_status;

public Add_patient()

{
InitializeComponent();

private void btn_add_Click(object sender, EventArgs e)

groupGender.Enabled = false;

groupMaritalS.Enabled = false;

txtaddress.Enabled = false;

txtcontact.Enabled = false;

txtdisease.Enabled = false;

txtname.Enabled = false;

Add_staff.cs

using System;

using System.Collections.Generic;
using System.ComponentModel;

using System.Configuration; using

System.Data;

using System.Data.SqlClient;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace TryWindowsForm

public partial class Add_Staff : Form

static string con =


ConfigurationManager.ConnectionStrings["hospital"].ConnectionString;

SqlConnection cn = new SqlConnection(con); string

gender;

public void Enabled1()

btnDelete.Enabled = true;

Btnupdate.Enabled = true;

public Add_Staff()

InitializeComponent();

public void ClearData()


{

txtadd.Text = txtemail.Text = txtid.Text = txtname.Text = txtnumber.Text =


txtsalary.Text = txtsearch.Text= "";

public void ShowData()

SqlCommand cmd = new SqlCommand("Select * from Add_staff", cn);

SqlDataAdapter da = new SqlDataAdapter(cmd);

DataTable dt = new DataTable();

da.Fill(dt); dataGridView1.DataSource =

dt;

private void btnloginAdddoctor_Click(object sender, EventArgs e)

if (txtid.Text == "")

MessageBox.Show("Plese Enter Id");

txtid.Focus();

else if (txtname.Text == "")

MessageBox.Show("Plese Enter Name");

txtname.Focus();

else if (txtadd.Text == "")

MessageBox.Show("Plese Enter Address"); txtadd.Focus();


}

else if (txtemail.Text == "")

MessageBox.Show("Plese Enter Email Id "); txtemail.Focus();

else if (txtnumber.Text == "")

MessageBox.Show("Plese Enter Number");

txtnumber.Focus();

else if (txtsalary.Text == "")

MessageBox.Show("Plese Enter Salary");

txtsalary.Focus();

else

cn.Open();

SqlCommand cmd1 = new SqlCommand("insert into Add_staff values('" + txtid.Text + "','"


+ txtname.Text + "','" + txtadd.Text + "','" + txtemail.Text + "','" + txtnumber.Text + "','" + gender +
"','" + dateTimePicker1.Text + "','" + txtsalary.Text + "')", cn);

int i = cmd1.ExecuteNonQuery(); if (i

> 0)

MessageBox.Show("Data Inserdddddddddd");
}

else

MessageBox.Show("Data Not Insertdddd");

cn.Close();

ShowData();

private void txtsearch_TextChanged(object sender, EventArgs e)

SqlDataAdapter da = new SqlDataAdapter("select * from Add_staff where id like '%"


+ txtsearch.Text + "%' or name like '%" + txtsearch.Text + "%'", cn);

DataTable dt = new DataTable();

da.Fill(dt);

dataGridView1.DataSource = dt;

private void radiomale_CheckedChanged(object sender, EventArgs e)

gender = radiomale.Text;

private void radiofemale_CheckedChanged(object sender, EventArgs e)

gender = radiofemale.Text;
}

private void Add_Staff_Load(object sender, EventArgs e)

ShowData();

btnDelete.Enabled = false;

Btnupdate.Enabled = false;

private void Btnupdate_Click(object sender, EventArgs e)

cn.Open();

SqlCommand cmd = new SqlCommand("update Add_staff set name='" + txtname.Text


+ "',address='" + txtadd.Text + "',email='" + txtemail.Text + "',number='" + txtnumber.Text +
"',gender='" + gender + "',JoingDate='" + dateTimePicker1.Text + "',salary='" + txtsalary.Text +
"' where id='" + txtid.Text + "'", cn);

int i = cmd.ExecuteNonQuery(); if

(i > 0)

MessageBox.Show("Data Updtedddddddddddddddddd");

ClearData();

btnDelete.Enabled = false;

Btnupdate.Enabled = false;

else

MessageBox.Show("Data Not Updtedddddddddddddddddd"); ClearData();

btnDelete.Enabled = false;

Btnupdate.Enabled = false;
}

ShowData();

cn.Close();

private void dataGridView1_RowHeaderMouseClick(object sender,


DataGridViewCellMouseEventArgs e)

txtid.Text = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();

txtname.Text = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();

txtadd.Text = dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString();

txtemail.Text = dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString();

txtnumber.Text = dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString();

txtsalary.Text = dataGridView1.Rows[e.RowIndex].Cells[7].Value.ToString();

Enabled1();

txtid.Enabled = false;

private void btnclose_Click(object sender, EventArgs e)

this.Close();

Add_doctor.cs
using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Configuration; using

System.Data;

using System.Data.SqlClient;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace TryWindowsForm

public partial class Add_Doctor : Form

{
static string con =
ConfigurationManager.ConnectionStrings["hospital"].ConnectionString;

SqlConnection cn = new SqlConnection(con); string

gender;

public Add_Doctor()

InitializeComponent();

public void Enabled1()

btnDelete.Enabled = true;

Btnupdate.Enabled = true;

private Boolean checkDoctorId()

Boolean Id_Doctor_Id = false;

SqlCommand cmd = new SqlCommand("Select * from Add_doctor where id='" + txtid.Text + "'
or email='" + txtemail.Text + "'or number='" + txtnumber.Text + "'", cn);

cn.Open();

SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet

ds = new DataSet();

da.Fill(ds);

if (ds.Tables[0].Rows.Count > 0)

Id_Doctor_Id = true;

}
cn.Close();

return Id_Doctor_Id;

public void ShowData()

SqlCommand cmd = new SqlCommand("Select * from Add_doctor", cn); SqlDataAdapter da =

new SqlDataAdapter(cmd);

DataTable dt = new DataTable();

da.Fill(dt); dataGridView1.DataSource =

dt;

public void ClearData()

txtadd.Text = txtemail.Text = txtid.Text = txtname.Text = txtnumber.Text =


txtpass.Text = txtsalary.Text = txtsearch.Text = txtspecialist.Text = "";

btnDelete.Enabled = false;

Btnupdate.Enabled = false;

txtid.BackColor = Color.White;

private void btnloginAdddoctor_Click(object sender, EventArgs e)

if (txtid.Text == "")

MessageBox.Show("Plese Enter Doctor Id");

txtid.Focus();

else if (txtname.Text == "")

{
MessageBox.Show("Plese Enter Doctor Name");

txtname.Focus();

else if (txtadd.Text == "")

MessageBox.Show("Plese Enter Doctor Address");

txtadd.Focus();

else if (txtemail.Text == "")

MessageBox.Show("Plese Enter Doctor Email Id ");

txtemail.Focus();

else if (txtnumber.Text == "")

MessageBox.Show("Plese Enter Doctor Number");

txtnumber.Focus();

else if (txtspecialist.Text == "")

MessageBox.Show("Plese Enter Doctor Specialist In "); txtspecialist.Focus();

else if (txtsalary.Text == "")

MessageBox.Show("Plese Enter Doctor Salary");

txtsalary.Focus();
}

else if (txtpass.Text == "")

txtpass.Focus();

MessageBox.Show("Plese Enter Doctor PassWord");

else

if (checkDoctorId() == true)

MessageBox.Show("This ID Already Registered");

txtid.BackColor = System.Drawing.Color.Red;

else

cn.Open();

SqlCommand cmd1 = new SqlCommand("insert into Add_doctor values('" +


txtid.Text + "','" + txtname.Text + "','" + txtadd.Text + "','" + txtemai…

Doctor_information.cs
using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Configuration; using

System.Data;

using System.Data.SqlClient;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace TryWindowsForm

public partial class Doctor_Information : Form

{
static string con =
ConfigurationManager.ConnectionStrings["hospital"].ConnectionString;

SqlConnection cn = new SqlConnection(con);

public Doctor_Information()

InitializeComponent();

public void ShowData()

SqlCommand cmd = new SqlCommand("Select * from Add_doctor", cn); SqlDataAdapter da =

new SqlDataAdapter(cmd);

DataTable dt = new DataTable();

da.Fill(dt); dataGridView1.DataSource =

dt;

private void Doctor_Information_Load(object sender, EventArgs e)

ShowData();

private void txtid_TextChanged(object sender, EventArgs e)

SqlDataAdapter da = new SqlDataAdapter("select * from Add_doctor where id like '%" +


txtid.Text + "%' or name like '%" + txtid.Text + "%'", cn);

DataTable dt = new DataTable();

da.Fill(dt); dataGridView1.DataSource =

dt;
}

Staff_Information.cs

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Configuration; using

System.Data;

using System.Data.SqlClient;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace TryWindowsForm
{

public partial class Staff_Information : Form

static string con =


ConfigurationManager.ConnectionStrings["hospital"].ConnectionString;

SqlConnection cn = new SqlConnection(con);

public Staff_Information()

InitializeComponent();

public void ShowData()

SqlCommand cmd = new SqlCommand("Select * from Add_staff", cn);

SqlDataAdapter da = new SqlDataAdapter(cmd);

DataTable dt = new DataTable();

da.Fill(dt); dataGridView1.DataSource =

dt;

private void txtid_TextChanged(object sender, EventArgs e)

SqlDataAdapter da = new SqlDataAdapter("select * from Add_staff where id like '%"


+ txtid.Text + "%' or name like '%" + txtid.Text + "%'", cn);

DataTable dt = new DataTable();

da.Fill(dt);

dataGridView1.DataSource = dt;

private void Staff_Information_Load(object sender, EventArgs e)


{

ShowData();

Patient_Information.cs

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Configuration; using

System.Data;

using System.Data.SqlClient;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;
namespace TryWindowsForm

public partial class Patient_Information : Form

static string con =


ConfigurationManager.ConnectionStrings["hospital"].ConnectionString;

SqlConnection cn = new SqlConnection(con);

public void ShowData()

SqlCommand cmd = new SqlCommand("Select * from Add_Patient", cn);

SqlDataAdapter da = new SqlDataAdapter(cmd);

DataTable dt = new DataTable();

da.Fill(dt); dataGridView1.DataSource =

dt;

public Patient_Information()

InitializeComponent();

private void Patient_Information_Load(object sender, EventArgs e)

ShowData();

private void txtid_TextChanged(object sender, EventArgs e)

{
SqlDataAdapter da = new SqlDataAdapter("select * from Add_Patient where id like '%" +
txtid.Text + "%' or name like '%" + txtid.Text + "%'", cn);

DataTable dt = new DataTable();

da.Fill(dt); dataGridView1.DataSource =

dt;

Administration.cs

Reception.cs
using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq; using

System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace TryWindowsForm

public partial class Reception : Form

public Reception()

InitializeComponent();
}

private void Reception_Load(object sender, EventArgs e)

timer1.Start();

label2.Text = DateTime.Now.ToLongDateString(); label3.Text =

DateTime.Now.ToLongTimeString();

private void btnalldoctor_Click(object sender, EventArgs e)

Doctor_Information di = new Doctor_Information();

di.ShowDialog();

private void Reception_FormClosing(object sender, FormClosingEventArgs e)

DialogResult dialog = MessageBox.Show("Do You Really want to close the


program?", "Exit", MessageBoxButtons.YesNo);

if (dialog == DialogResult.Yes)

Application.Exit();

else

e.Cancel = true;

}
}

private void btnlogout_Click(object sender, EventArgs e)

DialogResult dialog = MessageBox.Show("Do You Really want to close the


program?", "Exit", MessageBoxButtons.YesNo);

if (dialog == DialogResult.Yes)

Application.Exit();

private void timer1_Tick(object sender, EventArgs e)

label3.Text = DateTime.Now.ToLongTimeString();

timer1.Start();

private void btnall_patient_Click(object sender, EventArgs e)

Patient_Information pi = new Patient_Information();

pi.ShowDialog();

private void btnall_Staff_Click(object sender, EventArgs e)

Staff_Information si = new Staff_Information();

si.ShowDialog();
}

private void btnDischarge_Patient_Click(object sender, EventArgs e)

Discharge_Patient dp = new Discharge_Patient();

dp.ShowDialog();

private void btnadd_patient_Click(object sender, EventArgs e)

Add_patient ap = new Add_patient();

ap.ShowDialog();

Reception.cs(logout)
Home_Doctor.cs
When id 101 login

When id 102 login

using System;
using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq; using

System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace TryWindowsForm

public partial class DoctorHome : Form

public void DataTransfe(string a,string b,string c,string d,string e,string f,string g,string h,string i)

labid.Text = a.ToString();

labname.Text = b.ToString();

labadd.Text = c.ToString();

labemail.Text = d.ToString();

labnumber.Text = e.ToString();

labgenger.Text = f.ToString();

labspecialist.Text =h.ToString();

labsalary.Text = i.ToString();

labjoingdate.Text = g.ToString();

public DoctorHome()

{
InitializeComponent();

private void btnall_Staff_Click(object sender, EventArgs e)

panel4.Hide();

doctor_change_password dcp = new doctor_change_password();

dcp.ShowDialog();

private void btnlogout_Click(object sender, EventArgs e)

DialogResult dialog = MessageBox.Show("Do You Really want to close the


program?", "Exit", MessageBoxButtons.YesNo);

if (dialog == DialogResult.Yes)

Login l = new Login();

this.Hide();

l.Show();

private void DoctorHome_FormClosing(object sender, FormClosingEventArgs e)

DialogResult dialog = MessageBox.Show("Do You Really want to close the


program?", "Exit", MessageBoxButtons.YesNo);
if (dialog == DialogResult.Yes)

Application.Exit();

else

e.Cancel = true;

private void btnall_patient_Click(object sender, EventArgs e)

panel4.Hide();

Patient_Information pi = new Patient_Information();

pi.ShowDialog();

private void btnalldoctor_Click(object sender, EventArgs e)

panel4.Show();

private void DoctorHome_Load(object sender, EventArgs e)

timer1.Start();

label20.Text = DateTime.Now.ToLongDateString();
label19.Text = DateTime.Now.ToLongTimeString();

private void timer1_Tick(object sender, EventArgs e)

label19.Text = DateTime.Now.ToLongTimeString();

timer1.Start();

Doctor_change_password.cs

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Configuration; using

System.Data;

using System.Data.SqlClient;
using System.Drawing;

using System.Linq; using

System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace TryWindowsForm

public partial class doctor_change_password : Form

static string con =


ConfigurationManager.ConnectionStrings["hospital"].ConnectionString;

SqlConnection cn = new SqlConnection(con);

public doctor_change_password()

InitializeComponent();

private void btnChange_Password_Click(object sender, EventArgs e)

SqlDataAdapter SQLAdapter = new SqlDataAdapter("select * from Add_doctor where


password='" + txtoldpass.Text + "'", cn);

DataTable dt = new DataTable();

SQLAdapter.Fill(dt);

if (dt.Rows.Count == 0)

MessageBox.Show("Invalid current password");


txtoldpass.Text = txtnewpass.Text = string.Empty;

else

SqlDataAdapter da = new SqlDataAdapter("update Add_doctor set password='" +


txtnewpass.Text + "' where password=" + txtoldpass.Text, cn);

da.Fill(dt);

MessageBox.Show("Password changed successfully !!!");

txtoldpass.Text = txtnewpass.Text = string.Empty; this.Close();

You might also like