Sunteți pe pagina 1din 28

ONLINE HOSPITAL MANAGEMENT SYSTEM

ABSTRACT:

Our project Hospital Management system includes registration of patients, storing their details
into the system, making appointment, searching doctors, and adding and viewing blood donors.
Our software has the facility to give a unique id for every patient and stores the details of every
patient and can retrieve the information about the doctors available. User can search availability
of a doctor and the details of a patient using the id and the blood donors available. The Hospital
Management System can be entered using a username and password. The hospital payment
can be done through online. 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.

PROBLEM DESCRIPTION:

MODULES ADDED WITH SCREENSHOTS:

1. LOG IN PAGE:

2. SIGN UP PAGE:
3. PATIENT DATA ENTRY:

4. MAIN PAGE:
5. SEARCH DOCTOR:

6. DISPLAYING DOCTOR DETAILS:


7. SEARCH AND VIEW BLOOD DONOR DETAILS:

8. ADD A NEW BLOOD DONOR:


9. MAKE APPOINTMENT:

10.PAYMENT METHODS:
DATABASES CREATED:

1. LOGIN TABLE:
2. DOCTOR TABLE:

3. PATIENT TABLE:
4. BLOOD DONOR TABLE:

5. APPOINMENT TABLE:
SOURCE CODE:

LOGINPAGE.ASPX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using System.Windows.Forms;

namespace hospitalmanagement
{
public partial class doctormainpage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void TextBox2_TextChanged(object sender, EventArgs e)


{

}
protected void TextBox3_TextChanged(object sender, EventArgs e)
{

}
protected void Button2_Click(object sender, EventArgs e)
{
string username = TextBox2.Text;
string pass = TextBox3.Text;
hospitalmanagement.WebService1 obj = new hospitalmanagement.WebService1();
string output = obj.Validate(username, pass);
if (output == "login successful")
{
Response.Redirect("WebForm1.aspx");
}
else
{
MessageBox.Show("username or password is invalid!");
}

protected void Button3_Click(object sender, EventArgs e)


{
string username = TextBox2.Text;
Response.Redirect("signupWebForm2.aspx?username=" +username);
}

}
}

WEBSERVICE1.ASMX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Windows.Forms;
using System.Data.OleDb;
using System.Data;

namespace hospitalmanagement
{
/// <summary>
/// Summary description for WebService1
/// </summary>
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment
the following line.
// [System.Web.Script.Services.ScriptService]
public class WebService1 : System.Web.Services.WebService
{

[WebMethod]
public string Validate(string user, string pass)
{
OleDbConnection con = new
OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=C:\\Users/HP/Documents/Visual Studio 2012/webserviceproject.accdb");
OleDbCommand cmd1 = new OleDbCommand("Select * from patientlogin where
username = @username and Password = @password", con);
cmd1.Parameters.AddWithValue("@username", user);
cmd1.Parameters.AddWithValue("@password", pass);

con.Open();

OleDbDataAdapter adapt = new OleDbDataAdapter();


adapt.SelectCommand = cmd1;
DataSet ds = new DataSet();

adapt.Fill(ds);
con.Close();
int count = ds.Tables[0].Rows.Count;
//If count is equal to 1, than show frmMain form
string ex="";
if (count == 1)
{
ex="login successful";

}
else
{
ex="login failed";
}

return ""+ex;
}
}
}

SIGNUP.ASPX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.OleDb;
using System.Windows.Forms;

namespace hospitalmanagement
{
public partial class signupWebForm2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}

protected void TextBox1_TextChanged(object sender, EventArgs e)


{

protected void TextBox2_TextChanged(object sender, EventArgs e)


{

protected void TextBox3_TextChanged(object sender, EventArgs e)


{

protected void TextBox4_TextChanged(object sender, EventArgs e)


{

protected void TextBox5_TextChanged(object sender, EventArgs e)


{

protected void TextBox6_TextChanged(object sender, EventArgs e)


{

protected void TextBox7_TextChanged(object sender, EventArgs e)


{

protected void Button7_Click(object sender, EventArgs e)


{
string txt1 = TextBox1.Text;
string txt2 = TextBox2.Text;
string txt3 = TextBox3.Text;
if (txt2 != txt3)
{
MessageBox.Show("password & confirm password doesnot match!");
Response.Redirect("signupWebForm2.aspx");
}
if ((txt1.Equals("") == true) || (txt2.Equals("") == true) ||
(txt3.Equals("") == true))
{
MessageBox.Show("All fields should be filled!");

}
else if (((txt1.Equals("") != true) || (txt2.Equals("") != true) ||
(txt3.Equals("") != true))&&(txt2==txt3))
{
hospitalmanagement.signupWebService3 obj = new
hospitalmanagement.signupWebService3();
obj.signup(txt1, txt2);
string data = txt1;
Response.Redirect("addpatientdetails.aspx?data=" +data);
}

}
}
}

PATIENTDETAILS.ASPX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.OleDb;
using System.Windows.Forms;

namespace hospitalmanagement
{
public partial class addpatientdetails : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)


{

protected void TextBox3_TextChanged(object sender, EventArgs e)


{

protected void RadioButton1_CheckedChanged(object sender, EventArgs e)


{

protected void RadioButton2_CheckedChanged(object sender, EventArgs e)


{

protected void TextBox4_TextChanged(object sender, EventArgs e)


{
}

protected void TextBox2_TextChanged(object sender, EventArgs e)


{

protected void TextBox1_TextChanged(object sender, EventArgs e)


{

protected void Button7_Click(object sender, EventArgs e)


{
string txt1 = TextBox1.Text;
int txt2 = int.Parse(TextBox2.Text);
string txt4 = TextBox3.Text;
string txt6 = TextBox4.Text;
string txt5 = DropDownList1.SelectedItem.ToString();
string txt3 = RadioButtonList1.SelectedItem.ToString();
string txt7 = Request.QueryString["data"];

OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;


Data Source=C:\\Users/HP/Documents/Visual Studio 2012/webserviceproject.accdb");
con.Open();

OleDbCommand cmd = new OleDbCommand("insert into patientdetails values(" +


"'" + txt7 + "','" + txt1 + "'," + txt2 + ",'" + txt3 + "','" + txt4 + "','" + txt5 +
"','" + txt6 + "'" + ")", con);

int c = cmd.ExecuteNonQuery();
if (c == 1)
{
MessageBox.Show("patient details added successfully!");
}
con.Close();
string value = txt7;
Response.Redirect("WebForm1.aspx?value=" +value);
}
}
}

PATIENTDETAILSWEBSERVICE.ASMX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.OleDb;
using System.Windows.Forms;

namespace hospitalmanagement
{
/// <summary>
/// Summary description for signupWebService3
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment
the following line.
// [System.Web.Script.Services.ScriptService]
public class signupWebService3 : System.Web.Services.WebService
{

[WebMethod]
public void signup(string txt1, string txt2)
{
OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=C:\\Users/HP/Documents/Visual Studio 2012/webserviceproject.accdb");
con.Open();

OleDbCommand cmd = new OleDbCommand("insert into patientlogin values(" + "'"


+ txt1 + "','" + txt2 + "'" + ")", con);

int c = cmd.ExecuteNonQuery();
if (c == 1)
{
MessageBox.Show("Signup :Successful");
}
con.Close();

}
}
}

MAINPAGE.ASPX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace hospitalmanagement
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void Button4_Click(object sender, EventArgs e)


{
Response.Redirect("viewdonor.aspx");
}

protected void Button3_Click(object sender, EventArgs e)


{
Response.Redirect("searchdoctorform.aspx");
}

protected void Button5_Click(object sender, EventArgs e)


{
Response.Redirect("makeappointform.aspx");
}

protected void Button6_Click(object sender, EventArgs e)


{
Response.Redirect("adddonorform.aspx");
}

protected void Button7_Click(object sender, EventArgs e)


{
Response.Redirect("doctormainpage.aspx");
}
}
}

SEARCHDOCTOR.ASPX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.OleDb;
using System.Windows.Forms;

namespace hospitalmanagement
{
public partial class searchdoctorform : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OleDbConnection con = new
OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=C:\\Users/HP/Documents/Visual Studio 2012/webserviceproject.accdb");
OleDbDataAdapter da = new OleDbDataAdapter("select DoctorName,Department from
doctortable", con);
DataSet DS = new DataSet();
da.Fill(DS);
GridView1.DataSource = DS.Tables[0].DefaultView;
GridView1.DataBind();
}

protected void TextBox1_TextChanged(object sender, EventArgs e)


{

protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)


{

protected void Button7_Click(object sender, EventArgs e)


{
string value = TextBox1.Text;
Response.Redirect("displaydoctor.aspx?value="+value);

}
}
}

DISPLAYDOCTOR.ASPX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.OleDb;
using System.Windows.Forms;

namespace hospitalmanagement
{
public partial class displaydoctor : System.Web.UI.Page
{

protected void Page_Load(object sender, EventArgs e)


{

}
protected void Button4_Click(object sender, EventArgs e)
{
hospitalmanagement.WebService2 obj=new hospitalmanagement.WebService2();
string data = Request.QueryString["value"];
DataSet mydata = obj.Retrieve(data);
GridView1.DataSource = mydata.Tables[0].DefaultView;
GridView1.DataBind();
}

protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)


{

protected void Button5_Click(object sender, EventArgs e)


{
Response.Redirect("WebForm1.aspx");
}
}
}

DISPLAYDOCTORWEBSERVICE.ASMX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.OleDb;
using System.Windows.Forms;

namespace hospitalmanagement
{
/// <summary>
/// Summary description for WebService2
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment
the following line.
// [System.Web.Script.Services.ScriptService]
public class WebService2 : System.Web.Services.WebService
{

[WebMethod]
public DataSet Retrieve(string value)
{
OleDbConnection con = new
OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=C:\\Users/HP/Documents/Visual Studio 2012/webserviceproject.accdb");
OleDbCommand cmd1 = new OleDbCommand("select * from doctortable where
DoctorName=@DoctorName", con);
cmd1.Parameters.AddWithValue("@DoctorName", value);
con.Open();
OleDbDataAdapter adapt = new OleDbDataAdapter();
adapt.SelectCommand = cmd1;
DataSet ds = new DataSet();
adapt.Fill(ds);
con.Close();

return ds;
}
}
}

VIWEDONOR.ASPX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.OleDb;
using System.Windows.Forms;

namespace hospitalmanagement
{
public partial class viewdonor : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)


{

protected void Button5_Click(object sender, EventArgs e)


{
hospitalmanagement.viewdonorserver obj1 = new
hospitalmanagement.viewdonorserver();
String txt4 = TextBox4.Text;
String txt5 = TextBox5.Text;
DataSet MyData = obj1.donordet(txt4, txt5);
//storing the dataset records to gridview table
GridView1.DataSource = MyData.Tables[0].DefaultView;
GridView1.DataBind();
}

protected void TextBox6_TextChanged(object sender, EventArgs e)


{

protected void Button4_Click(object sender, EventArgs e)


{
hospitalmanagement.viewdonorserver obj = new
hospitalmanagement.viewdonorserver();
String txt1 = TextBox4.Text;
String txt2 = TextBox5.Text;
String re = obj.donorsearch(txt1, txt2);
TextBox6.Text = re;
}

protected void TextBox5_TextChanged(object sender, EventArgs e)


{

protected void TextBox4_TextChanged(object sender, EventArgs e)


{

protected void Button6_Click(object sender, EventArgs e)


{
Response.Redirect("WebForm1.aspx");
}
}
}

VIEWDONORWEBSERVICE.ASMX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.OleDb;
using System.Windows.Forms;

namespace hospitalmanagement
{
/// <summary>
/// Summary description for viewdonorserver
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment
the following line.
// [System.Web.Script.Services.ScriptService]
public class viewdonorserver : System.Web.Services.WebService
{

[WebMethod]
public String donorsearch(String txt4,String txt5)
{
int flag = 0;
string t1 = txt4.ToUpper();
string t2 = txt5.ToLower();
OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=C:\\Users/HP/Documents/Visual Studio 2012/Database3.accdb");
OleDbCommand cmd = new OleDbCommand("Select * from donor where
bloodgrp=@bloodgrp and place=@place ",con);
cmd.Parameters.AddWithValue("@bloodgrp", t1);
cmd.Parameters.AddWithValue("@place", t2);

OleDbDataAdapter adapt = new OleDbDataAdapter();


adapt.SelectCommand = cmd;
DataSet ds = new DataSet();

adapt.Fill(ds);
con.Close();
int count = ds.Tables[0].Rows.Count;
if (count == 1)
{
flag = 1;
}
if (flag == 1)
{
return ("AVAILABLE");
}
else
{
return ("not available");
}

}
public DataSet donordet(String txt4,String txt5)
{
String t = txt4.ToUpper();
String p = txt5.ToLower();

OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;


Data Source=C:\\Users/HP/Documents/Visual Studio 2012/Database3.accdb");
OleDbCommand cmd1 = new OleDbCommand("select * from donor where
bloodgrp=@bloodgrp and place=@place",con);
cmd1.Parameters.AddWithValue("@bloodgrp", t);
cmd1.Parameters.AddWithValue("@place", p);
OleDbDataAdapter adapt = new OleDbDataAdapter();
adapt.SelectCommand = cmd1;
DataSet ds = new DataSet();

adapt.Fill(ds);
return ds;

}
}
}

ADDDONOR.ASPX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace hospitalmanagement
{
public partial class adddonorform : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void Button7_Click(object sender, EventArgs e)


{
hospitalmanagement.adddonorser obj = new hospitalmanagement.adddonorser();
String txt1 = TextBox7.Text;
int txt2 = int.Parse(TextBox8.Text);

String txt3 = TextBox9.Text;


String txt4 = TextBox10.Text;
txt4 = txt4.ToUpper();
String txt5 = TextBox11.Text;
String txt6 = TextBox12.Text;

obj.dadd(txt1, txt2, txt3, txt4, txt5, txt6);


Response.Redirect("WebForm1.aspx");
}

protected void TextBox12_TextChanged(object sender, EventArgs e)


{

protected void TextBox11_TextChanged(object sender, EventArgs e)


{
}

protected void TextBox10_TextChanged(object sender, EventArgs e)


{

protected void TextBox9_TextChanged(object sender, EventArgs e)


{

protected void TextBox8_TextChanged(object sender, EventArgs e)


{

protected void TextBox7_TextChanged(object sender, EventArgs e)


{

}
}
}

ADD_DONORWEBSERVICE.ASMX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.OleDb;
using System.Windows.Forms;

namespace hospitalmanagement
{
/// <summary>
/// Summary description for adddonorser
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment
the following line.
// [System.Web.Script.Services.ScriptService]
public class adddonorser : System.Web.Services.WebService
{

[WebMethod]
public void dadd(String txt1, int txt2, String txt3, String txt4, String txt5,
String txt6)
{

OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;


Data Source=C:\\Users/HP/Documents/Visual Studio 2012/Database3.accdb");
con.Open();

OleDbCommand cmd = new OleDbCommand("insert into donor values(" + "'" + txt1


+ "'," + txt2 + ",'" + txt3 + "','" + txt4 + "','" + txt5 + "','" + txt6 + "'" + ")",
con);

int c = cmd.ExecuteNonQuery();
if (c == 1)
{
MessageBox.Show("Registration Successful");
}
con.Close();
}
}
}

MAKEAPPOINTMENT.ASPX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace hospitalmanagement
{
public partial class makeappointform : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)


{

protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)


{

protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)


{

}
protected void Button8_Click(object sender, EventArgs e)
{
Response.Redirect("payment.aspx");
}

protected void Button9_Click(object sender, EventArgs e)


{
hospitalmanagement.makeappointser obj = new
hospitalmanagement.makeappointser();
string cn = DropDownList1.SelectedItem.Value;
string dn = DropDownList2.SelectedItem.Value;
string check = DropDownList3.SelectedItem.Value;
obj.makeapp(cn, dn, check);
Response.Redirect("WebForm1.aspx");
}
}
}

MAKEAPPOINTMENTWEBSERVICE.ASMX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.OleDb;
using System.Windows.Forms;

namespace hospitalmanagement
{
/// <summary>
/// Summary description for makeappointser
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment
the following line.
// [System.Web.Script.Services.ScriptService]
public class makeappointser : System.Web.Services.WebService
{

[WebMethod]
public void makeapp(String cn, String dn, string check)
{
try
{
OleDbConnection con = new OleDbConnection();
con.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=C:\\Users/HP/Documents/Visual Studio 2012/Database2.accdb;
Persist Security Info=False;";

OleDbCommand cmd = new OleDbCommand("insert into hospital values('" + cn


+ "','" + dn + "','" + check + "')", con);

con.Open();
int i = cmd.ExecuteNonQuery();

if (i != 0)
{
MessageBox.Show("The Appointment is confirmed!");
}
else
{
MessageBox.Show("SOMETHING WENT WRONG WITH THE SELECTION");
}
con.Close();

}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}

PAYMENT.ASPX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Windows.Forms;

namespace hospitalmanagement
{
public partial class payment : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void RadioButton2_CheckedChanged(object sender, EventArgs e)


{

protected void RadioButton4_CheckedChanged(object sender, EventArgs e)


{

}
protected void RadioButton3_CheckedChanged(object sender, EventArgs e)
{

protected void DropDownList4_SelectedIndexChanged(object sender, EventArgs e)


{

protected void Button10_Click(object sender, EventArgs e)


{
string nb = DropDownList4.SelectedItem.ToString();
if (RadioButton3.Checked == true)
{
if (nb == "Indian Bank")
{

Response.Redirect("https://www.indianbank.net.in/jsp/startIB.jsp;jsessionid=5f7cZLkS2whQy
JXK7HvhNxC8Nj16tFhJGJvYJh8mTJJ9yCnv6K7h!509900259");
}
if (nb == "SBI")
{
Response.Redirect("https://www.onlinesbi.com/");
}
if (nb == "CUB")
{
Response.Redirect("https://www.onlinecub.net/");
}
}
if (RadioButton2.Checked == true || RadioButton4.Checked == true)
{
Response.Redirect("cardform.aspx");
}

}
}
}

CARD.ASPX:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Windows.Forms;
using System.Web.UI.WebControls;

namespace hospitalmanagement
{
public partial class cardform : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}

protected void Button11_Click(object sender, EventArgs e)


{
string txt1 = TextBox1.Text;
string txt2 = TextBox2.Text;
string txt3 = TextBox3.Text;

if ((txt1.Equals("") == true) || (txt2.Equals("") == true) ||


(txt3.Equals("") == true))
{
MessageBox.Show("please fill all the credentials");

}
else
{
MessageBox.Show("payment successful");
Response.Redirect("makeappointform.aspx");
}

protected void TextBox3_TextChanged(object sender, EventArgs e)


{

protected void TextBox2_TextChanged(object sender, EventArgs e)


{

protected void TextBox1_TextChanged(object sender, EventArgs e)


{

}
}
}

S-ar putea să vă placă și