SlideShare a Scribd company logo
1 of 26
Download to read offline
DiTec Esoft C# Project Free
DiTec Project Esoft (C#)
Cource: Diploma in Information Technology With E commerce
Obtained Grade B For This Project
Do not direct copy form this project. This project was uploaded to enhance your IT
knowledge.I think this project may be very helpful to understand procedure of C# project
for DiTEC.
Welcome Start & Window
Enter Button
private void BtnEnter_Click(object sender, EventArgs e)
{
FrmWelcome fr = new FrmWelcome();
fr.Show();
this.Hide();
}
Exit Button
private void BtnExit_Click(object sender, EventArgs e)
{
DialogResult d1;
d1 = MessageBox.Show("Are You Sure Do You Want To Exit
?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if (d1.ToString() == "Yes")
{
Application.Exit();
}
}
Welcome & Loading Window
Timer control
private void timer1_Tick(object sender, EventArgs e)
{
if (progressBar1.Value < 100)
{
progressBar1.Value = progressBar1.Value + 2;
}
else
{
timer1.Enabled=false;
FrmUser fr = new FrmUser();
fr.Show();
this.Hide();
}
Timer Properties
Login Window
Submit Button
string username = "kasun";
string password = "8620";
private void button1_Click(object sender, EventArgs e)
{
if (TxtUsername.Text == username && TxtPassword.Text == password)
{
DialogResult m2;
m2 = MessageBox.Show("Thank
You!", "Sucsess",MessageBoxButtons.OK, MessageBoxIcon.Information);
if (m2.ToString() == "OK")
{
MDISystem md1 = new MDISystem();
md1.Show();
this.Hide();
}
}
else
{
DialogResult m2;
m2 = MessageBox.Show("Incorrect Username & Password
","Error!", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
if (m2.ToString() == "Retry")
{
TxtUsername.Clear();
TxtPassword.Clear();
TxtUsername.Focus();
Clear Button
TxtUsername.Text = "";
TxtPassword.Text = "";
TxtUsername.Focus();
Exit Button
DialogResult d1;
d1 = MessageBox.Show("Are You Sure Do You Want To Exit
?","Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if (d1.ToString() == "Yes")
{
Application.Exit();
}
MDI Window (Inside Menu Bar)
Appointment Details Window
FrmAppoinment_Details frm = new FrmAppoinment_Details();
frm.MdiParent = this;
frm.Show();
Medical Details Window
FrmMedical_Detals frm= new FrmMedical_Detals();
frm.MdiParent = this;
frm.Show();
Patient Details Window
FrmPatient_Details frm = new FrmPatient_Details();
frm.MdiParent = this;
frm.Show();
Doctor Details Window
FrmDoctor frm = new FrmDoctor();
frm.MdiParent = this;
frm.Show();
Medical Packages Window
FrmDoctor frm = new FrmDoctor();
frm.MdiParent = this;
frm.Show();
Help Window
FrmHelp frm = new FrmHelp();
frm.MdiParent = this;
frm.Show();
Author Window
FrmAuthor frm = new FrmAuthor();
frm.MdiParent = this;
frm.Show();
Appointment Details Window
Add Button
string connectionstring,commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring="INSERT INTO app
VALUES('"+CboRef.Text+"','"+txtpatname.Text+"','"+txtcontact.Text+"','"+txtad
dress.Text+"','"+cbogender.Text+"','"+comboBox1.Text+"','"+txtamount.Text+"')
";
MessageBox.Show("OK","Add Data ?",MessageBoxButtons.OK,MessageBoxIcon.Error);
OleDbConnection conn=new OleDbConnection(connectionstring);
OleDbCommand comm=new OleDbCommand(commandstring,conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Click OK","Data Added Successfully",MessageBoxButtons.OK);
conn.Close();
Search Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "SELECT*FROM app WHERE rn='" + CboRef.Text + "'";
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
OleDbDataReader reader=null;
try
{ conn.Open(); }
catch (Exception ex)
{ MessageBox.Show("Completed !"); }
reader = comm.ExecuteReader();
while (reader.Read())
{
txtpatname.Text = reader[1].ToString();
txtcontact.Text = reader[2].ToString();
txtaddress.Text = reader[3].ToString();
cbogender.Text = reader[4].ToString();
comboBox1.Text = reader[5].ToString();
txtamount.Text = reader[6].ToString();
}
reader.Close();
Update Button
String connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "UPDATE app SET rn='" + CboRef.Text +"',pn='" +
txtpatname.Text + "',co='" + txtcontact.Text + "',ad='" + txtaddress.Text
+ "',gn='" + cbogender.Text + "',pt='" + comboBox1.Text + "',am='" +
txtamount.Text + "'";
MessageBox.Show("Are u Sure", "Do You Want Update
?",MessageBoxButtons.OK, MessageBoxIcon.Error);
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Success", "Data Added
Sucsessfully!",MessageBoxButtons.OK, MessageBoxIcon.Error);
conn.Close();
Clear Button
CboRef.Text = "";
txtpatname.Text = "";
txtcontact.Text = "";
txtaddress.Text = "";
cbogender.Text = "";
comboBox1.Text = "";
txtamount.Text = "";
Delete Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "DELETE*FROM app WHERE rn='"+CboRef.Text+ "'";
if (MessageBox.Show("Are You Sure Do You Want Delete This Record
?", "Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
== DialogResult.No)
{
return;
}
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Record Deleted Successfully");
CboRef.Text = "";
txtpatname.Clear();
txtcontact.Clear();
txtaddress.Clear();
cbogender.Text = "";
comboBox1.Text = "";
txtamount.Clear();
conn.Close();
Exit Button
this.Hide();
Medical Details Window
Add Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "INSERT INTO medical VALUES('" + comboBox1.Text
+ "','" + textBox3.Text + "','" + textBox2.Text +"','" + textBox1.Text
+ "','" + comboBox2.Text + "')";
MessageBox.Show("OK", "Add Data
?", MessageBoxButtons.OK,MessageBoxIcon.Error);
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Click OK", "Data Added
Successfully",MessageBoxButtons.OK);
conn.Close();
Search Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "SELECT*FROM medical WHERE pno='" +
comboBox1.Text + "'";
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
OleDbDataReader reader = null;
try
{ conn.Open(); }
catch (Exception ex)
{ MessageBox.Show("Completed !"); }
reader = comm.ExecuteReader();
while (reader.Read())
{
textBox3.Text = reader[1].ToString();
textBox2.Text = reader[2].ToString();
textBox1.Text = reader[3].ToString();
comboBox2.Text = reader[4].ToString();
}
reader.Close();
Update Button
String connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "UPDATE medical SET pno='" + comboBox1.Text
+ "',pn='" + textBox3.Text + "',q='" + textBox2.Text +"',pp='" +
textBox1.Text + "',de='" + comboBox2.Text + "'";
MessageBox.Show("Are u Sure", "Do You Want Update
?",MessageBoxButtons.OK, MessageBoxIcon.Error);
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Success", "Data Added
Sucsessfully!",MessageBoxButtons.OK, MessageBoxIcon.Error);
conn.Close();
Clear Button
comboBox1.Text = "";
textBox3.Text = "";
textBox2.Text = "";
textBox1.Text = "";
comboBox2.Text = "";
Delete Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "DELETE*FROM medical WHERE pno='" +
comboBox1.Text + "'";
if (MessageBox.Show("Are You Sure Do You Want Delete This Record
?", "Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
== DialogResult.No)
{
return;
}
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Record Deleted Successfully");
textBox3.Clear();
textBox2.Clear();
textBox1.Clear();
comboBox2.Text = "";
comboBox1.Text = "";
conn.Close();
Exit Button
this.Hide();
Patient Details Window
Add Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "INSERT INTO patient VALUES('" + comboBox1.Text
+ "','" + textBox1.Text + "','" + comboBox2.Text +"','" + textBox2.Text
+ "','" + textBox3.Text + "','" + textBox4.Text + "')";
MessageBox.Show("OK", "Add Data
?",MessageBoxButtons.OK, MessageBoxIcon.Error);
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Click OK", "Data Added
Successfully",MessageBoxButtons.OK);
conn.Close();
Search Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "SELECT*FROM patient WHERE pno='" +
comboBox1.Text + "'";
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
OleDbDataReader reader = null;
try
{ conn.Open(); }
catch (Exception ex)
{ MessageBox.Show("Completed !"); }
reader = comm.ExecuteReader();
while (reader.Read())
{
textBox1.Text = reader[1].ToString();
comboBox2.Text = reader[2].ToString();
textBox2.Text = reader[3].ToString();
textBox3.Text = reader[4].ToString();
textBox4.Text = reader[5].ToString();
}
reader.Close();
Update Button
String connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "UPDATE patient SET pno='" + comboBox1.Text
+ "',pn='" + textBox1.Text + "',db='" + comboBox2.Text + "',bg='" +
textBox2.Text + "',da='" + textBox3.Text + "',dr='" + textBox4.Text + "'";
MessageBox.Show("Are u Sure", "Do You Want Update
?",MessageBoxButtons.OK, MessageBoxIcon.Error);
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Success", "Data Added
Sucsessfully!",MessageBoxButtons.OK, MessageBoxIcon.Error);
conn.Close();
Clear Button
comboBox1.Text = "";
textBox1.Text = "";
comboBox2.Text = "";
textBox2.Text = "";
textBox3.Text = "";
textBox4.Text = "";
Delete Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "DELETE*FROM patient WHERE pno='" +
comboBox1.Text + "'";
if (MessageBox.Show("Are You Sure Do You Want Delete This Record
?", "Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
== DialogResult.No)
{
return;
}
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Record Deleted Successfully");
comboBox1.Text = "";
textBox1.Text = "";
comboBox2.Text = "";
textBox2.Clear();
textBox3.Clear();
textBox4.Text = "";
Exit Button
this.Hide();
Doctor Details Window
Add Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "INSERT INTO patient VALUES('" + comboBox1.Text
+ "','" + textBox1.Text + "','" + comboBox2.Text +"','" + textBox2.Text
+ "','" + textBox3.Text + "','" + textBox4.Text + "')";
MessageBox.Show("OK", "Add Data
?", MessageBoxButtons.OK,MessageBoxIcon.Error);
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Click OK", "Data Added
Successfully",MessageBoxButtons.OK);
conn.Close();
Search Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "SELECT*FROM patient WHERE pno='" +
comboBox1.Text + "'";
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
OleDbDataReader reader = null;
try
{ conn.Open(); }
catch (Exception ex)
{ MessageBox.Show("Completed !"); }
reader = comm.ExecuteReader();
while (reader.Read())
{
textBox1.Text = reader[1].ToString();
comboBox2.Text = reader[2].ToString();
textBox2.Text = reader[3].ToString();
textBox3.Text = reader[4].ToString();
textBox4.Text = reader[5].ToString();
}
reader.Close();
Update Button
String connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "UPDATE patient SET pno='" + comboBox1.Text
+ "',pn='" + textBox1.Text + "',db='" + comboBox2.Text + "',bg='" +
textBox2.Text + "',da='" + textBox3.Text + "',dr='" + textBox4.Text + "'";
MessageBox.Show("Are u Sure", "Do You Want Update
?",MessageBoxButtons.OK, MessageBoxIcon.Error);
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Success", "Data Added
Sucsessfully!",MessageBoxButtons.OK, MessageBoxIcon.Error);
conn.Close();
Exit Button
this.Hide();
Delete Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "DELETE*FROM patient WHERE pno='" +
comboBox1.Text + "'";
if (MessageBox.Show("Are You Sure Do You Want Delete This Record
?", "Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
== DialogResult.No)
{
return;
}
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Record Deleted Successfully");
comboBox1.Text = "";
textBox1.Text = "";
comboBox2.Text = "";
textBox2.Clear();
textBox3.Clear();
textBox4.Text = "";
Clear Button
comboBox1.Text = "";
textBox1.Text = "";
comboBox2.Text = "";
textBox2.Text = "";
textBox3.Text = "";
textBox4.Text = "";
Medical Packages Window
Add Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "INSERT INTO patient VALUES('" + comboBox1.Text
+ "','" + textBox1.Text + "','" + comboBox2.Text +"','" + textBox2.Text
+ "','" + textBox3.Text + "','" + textBox4.Text + "')";
MessageBox.Show("OK", "Add Data
?", MessageBoxButtons.OK,MessageBoxIcon.Error);
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Click OK", "Data Added
Successfully",MessageBoxButtons.OK);
conn.Close();
Search Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "SELECT*FROM patient WHERE pno='" +
comboBox1.Text + "'";
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
OleDbDataReader reader = null;
try
{ conn.Open(); }
catch (Exception ex)
{ MessageBox.Show("Completed !"); }
reader = comm.ExecuteReader();
while (reader.Read())
{
textBox1.Text = reader[1].ToString();
comboBox2.Text = reader[2].ToString();
textBox2.Text = reader[3].ToString();
textBox3.Text = reader[4].ToString();
textBox4.Text = reader[5].ToString();
}
reader.Close();
Update Button
String connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "UPDATE patient SET pno='" + comboBox1.Text
+ "',pn='" + textBox1.Text + "',db='" + comboBox2.Text + "',bg='" +
textBox2.Text + "',da='" + textBox3.Text + "',dr='" + textBox4.Text + "'";
MessageBox.Show("Are u Sure", "Do You Want Update
?",MessageBoxButtons.OK, MessageBoxIcon.Error);
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Success", "Data Added
Sucsessfully!",MessageBoxButtons.OK, MessageBoxIcon.Error);
conn.Close();
Clear Button
comboBox1.Text = "";
textBox1.Text = "";
comboBox2.Text = "";
textBox2.Text = "";
textBox3.Text = "";
textBox4.Text = "";
Delete Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "DELETE*FROM patient WHERE pno='" +
comboBox1.Text + "'";
if (MessageBox.Show("Are You Sure Do You Want Delete This Record
?", "Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
== DialogResult.No)
{
return;
}
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Record Deleted Successfully");
comboBox1.Text = "";
textBox1.Text = "";
comboBox2.Text = "";
textBox2.Clear();
textBox3.Clear();
textBox4.Text = "";
Exit Button
this.Hide();
Help Window
Select Button
string connectionstring, commandstring;
connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:Hosptal Management Systemesoft.mdb";
commandstring = "SELECT*FROM help WHERE se='" + comboBox1.Text
+ "'";
OleDbConnection conn = newOleDbConnection(connectionstring);
OleDbCommand comm = new OleDbCommand(commandstring, conn);
OleDbDataReader reader = null;
try
{ conn.Open(); }
catch (Exception ex)
{ MessageBox.Show("......"); }
reader = comm.ExecuteReader();
while (reader.Read())
{
textBox2.Text = reader[1].ToString();
}
reader.Close();
Exit Button
this.Hide();
Author Window
Exit Button
this.Hide();
Now I think you earned good knowledge about project . Now I hope to give you additional
codes to solve some problems. ( These are additional codes )
privatevoid btnadd_Click(object sender, EventArgs e)
{
string connectionString, commandString;
connectionString
=@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:Hospital
SystemHMS.mdb";
commandString = "INSERT INTO Appoinment VALUES ('"+
cborefno.Text + "','" + txtpatname.Text + "','" + txtcontact.Text
+ "','" + txtaddress.Text + "','" + cbogender.Text + "','" +
cboPayment.Text + "','" + txtamount.Text + "')";
OleDbConnection conn = newOleDbConnection(connectionString);
OleDbCommand comm = newOleDbCommand(commandString, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Record Added Succesfully");
cborefno.Items.Add(cborefno.Text);
Clear();
cborefno.Focus();
conn.Close();
}
privatevoid cborefno_SelectedIndexChanged(object sender,EventArgs e
)
{
string connectionString, commandString;
connectionString
=@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:Hospital
SystemHMS.mdb";
commandString = "SELECT * FROM Appoinment WHERE
RefNo='" + cborefno.Text + "'";
OleDbConnection conn = newOleDbConnection(connectionString);
OleDbCommand comm = newOleDbCommand(commandString, conn);
OleDbDataReader reader = null;
try
{ conn.Open(); }
catch (Exception ex)
{ MessageBox.Show(ex.Message); }
reader = comm.ExecuteReader();
while (reader.Read())
{
txtpatname.Text = reader[1].ToString();
txtcontact.Text = reader[2].ToString();
txtaddress.Text = reader[3].ToString();
cbogender.Text = reader[4].ToString();
cboPayment.Text = reader[5].ToString();
txtamount.Text = reader[6].ToString(); }
reader.Close();
conn.Close();
}
privatevoid Form1_Load(object sender, EventArgs e)
{
string connectionString, commandString;
connectionString
=@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:Hospital
SystemHMS.mdb";
commandString = "SELECT RefNo FROM Appoinment";
OleDbConnection conn = newOleDbConnection(connectionString);
OleDbCommand comm = newOleDbCommand(commandString, conn);
OleDbDataReader reader = null;
try
{
conn.Open();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
reader = comm.ExecuteReader();
while (reader.Read())
{
cborefno.Items.Add(reader[0]);
}
reader.Close();
conn.Close();
}
privatevoid btnupdate_Click(object sender, EventArgs e)
{
string connectionString, commandString;
connectionString
=@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:Hospital
SystemHMS.mdb";
commandString = "UPDATE Appoinment SET PatName = '"+
txtpatname.Text + "', Contact = '" + txtcontact.Text + "', Address
= '" + txtaddress.Text + "', Gender = '" + cbogender.Text
+ "',PayType = '" + cboPayment.Text +"',Amount='" + txtamount.Text
+ "' where RefNo = '" + cborefno.Text + "'";
if (MessageBox.Show("Are you sure, you want to Update this
record?", "Sure?", MessageBoxButtons.YesNo) == DialogResult.No)
{
return;
}
OleDbConnection conn = newOleDbConnection(connectionString);
OleDbCommand comm = newOleDbCommand(commandString, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Record Updated Succesfully");
Clear();
cborefno.Focus();
conn.Close();
}
privatevoid btndelete_Click(object sender, EventArgs e)
{
string connectionString, commandString;
connectionString
=@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:Hospital
SystemHMS.mdb";
commandString = "DELETE Appoinment.RefNo FROM
Appoinment where Appoinment.RefNo = '" + cborefno.Text + "'";
if (MessageBox.Show("Are you sure, you want to delete this
record?", "Sure?", MessageBoxButtons.YesNo) == DialogResult.No)
{
return;
}
OleDbConnection conn = newOleDbConnection(connectionString);
OleDbCommand comm = newOleDbCommand(commandString, conn);
conn.Open();
comm.ExecuteNonQuery();
MessageBox.Show("Record Deleted Successfully");
conn.Close();
cborefno.Items.Remove(cborefno.Text);
cborefno.Focus();
Clear();
}
privatevoid Clear()
{
cborefno.Text = "";
txtpatname.Clear();
txtcontact.Clear();
txtaddress.Clear();
cbogender.Text = "";
cboPayment.Text = "";
txtamount.Clear();
cborefno.Focus();
}
privatevoid btnclear_Click(object sender, EventArgs e)
{
Clear();
}
privatevoid btnexit_Click(object sender, EventArgs e)
{
this.Hide();
}
********************************
About Me !
********************************
Kasun Madhusanka
Phone:+94770597830
Email:kktmadhusanka@gmail.com
To Make likes me on facebook click below link
https://www.facebook.com/KKTMadhusanka
To make connection with me !
https://www.linkedin.com/in/kktmadhusanka
http://www.slideshare.net/kktmadhusanka
Posted by Kasun Madhusanka at 3:44 PM

More Related Content

What's hot

The Ring programming language version 1.5.3 book - Part 188 of 194
The Ring programming language version 1.5.3 book - Part 188 of 194The Ring programming language version 1.5.3 book - Part 188 of 194
The Ring programming language version 1.5.3 book - Part 188 of 194Mahmoud Samir Fayed
 
ES3-2020-07 Testing techniques
ES3-2020-07 Testing techniquesES3-2020-07 Testing techniques
ES3-2020-07 Testing techniquesDavid Rodenas
 
드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅
드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅
드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅재춘 노
 
The secret unit testing tools no one ever told you about
The secret unit testing tools no one ever told you aboutThe secret unit testing tools no one ever told you about
The secret unit testing tools no one ever told you aboutDror Helper
 
The Ring programming language version 1.5.2 book - Part 26 of 181
The Ring programming language version 1.5.2 book - Part 26 of 181The Ring programming language version 1.5.2 book - Part 26 of 181
The Ring programming language version 1.5.2 book - Part 26 of 181Mahmoud Samir Fayed
 
How to Start Test-Driven Development in Legacy Code
How to Start Test-Driven Development in Legacy CodeHow to Start Test-Driven Development in Legacy Code
How to Start Test-Driven Development in Legacy CodeDaniel Wellman
 
Data structures lab
Data structures labData structures lab
Data structures labRagu Ram
 
Database By Salman Mushtaq
Database By Salman MushtaqDatabase By Salman Mushtaq
Database By Salman MushtaqSalman Mushtaq
 
Csphtp1 05
Csphtp1 05Csphtp1 05
Csphtp1 05HUST
 

What's hot (18)

Soa lab
Soa lab   Soa lab
Soa lab
 
Ip project visual mobile
Ip project visual mobileIp project visual mobile
Ip project visual mobile
 
Vb file
Vb fileVb file
Vb file
 
The Ring programming language version 1.5.3 book - Part 188 of 194
The Ring programming language version 1.5.3 book - Part 188 of 194The Ring programming language version 1.5.3 book - Part 188 of 194
The Ring programming language version 1.5.3 book - Part 188 of 194
 
ES3-2020-07 Testing techniques
ES3-2020-07 Testing techniquesES3-2020-07 Testing techniques
ES3-2020-07 Testing techniques
 
Golang dot-testing
Golang dot-testingGolang dot-testing
Golang dot-testing
 
드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅
드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅
드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅
 
MaintainStaffTable
MaintainStaffTableMaintainStaffTable
MaintainStaffTable
 
The secret unit testing tools no one ever told you about
The secret unit testing tools no one ever told you aboutThe secret unit testing tools no one ever told you about
The secret unit testing tools no one ever told you about
 
The Ring programming language version 1.5.2 book - Part 26 of 181
The Ring programming language version 1.5.2 book - Part 26 of 181The Ring programming language version 1.5.2 book - Part 26 of 181
The Ring programming language version 1.5.2 book - Part 26 of 181
 
Bienvenida
BienvenidaBienvenida
Bienvenida
 
Specs2
Specs2Specs2
Specs2
 
How to Start Test-Driven Development in Legacy Code
How to Start Test-Driven Development in Legacy CodeHow to Start Test-Driven Development in Legacy Code
How to Start Test-Driven Development in Legacy Code
 
Data structures lab
Data structures labData structures lab
Data structures lab
 
JavaExamples
JavaExamplesJavaExamples
JavaExamples
 
Vaadin 7
Vaadin 7Vaadin 7
Vaadin 7
 
Database By Salman Mushtaq
Database By Salman MushtaqDatabase By Salman Mushtaq
Database By Salman Mushtaq
 
Csphtp1 05
Csphtp1 05Csphtp1 05
Csphtp1 05
 

Similar to Ditec esoft C# project

Inventory management
Inventory managementInventory management
Inventory managementRajeev Sharan
 
Membuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaMembuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaYusman Kurniadi
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docxAustinaGRPaigey
 
New text document
New text documentNew text document
New text documentTam Ngo
 
in order to save data from access database and search from it in c# .pdf
in order to save data from access database and search from it in c# .pdfin order to save data from access database and search from it in c# .pdf
in order to save data from access database and search from it in c# .pdfkalerottnerheissst52
 
C# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdfC# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdffathimalinks
 
The Ring programming language version 1.9 book - Part 18 of 210
The Ring programming language version 1.9 book - Part 18 of 210The Ring programming language version 1.9 book - Part 18 of 210
The Ring programming language version 1.9 book - Part 18 of 210Mahmoud Samir Fayed
 
Vb database connections
Vb database connectionsVb database connections
Vb database connectionsTharsikan
 
The Ring programming language version 1.3 book - Part 83 of 88
The Ring programming language version 1.3 book - Part 83 of 88The Ring programming language version 1.3 book - Part 83 of 88
The Ring programming language version 1.3 book - Part 83 of 88Mahmoud Samir Fayed
 
Advanced Java - Practical File
Advanced Java - Practical FileAdvanced Java - Practical File
Advanced Java - Practical FileFahad Shaikh
 
The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.3 book - Part 5 of 88The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.3 book - Part 5 of 88Mahmoud Samir Fayed
 

Similar to Ditec esoft C# project (20)

Quanlycanbo
QuanlycanboQuanlycanbo
Quanlycanbo
 
CRUD VB2010
CRUD VB2010CRUD VB2010
CRUD VB2010
 
Inventory management
Inventory managementInventory management
Inventory management
 
syed
syedsyed
syed
 
Membuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaMembuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhana
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docx
 
New text document
New text documentNew text document
New text document
 
Hems
HemsHems
Hems
 
Database connectivity with data reader by varun tiwari
Database connectivity with data reader by varun tiwariDatabase connectivity with data reader by varun tiwari
Database connectivity with data reader by varun tiwari
 
Tutorial 6.docx
Tutorial 6.docxTutorial 6.docx
Tutorial 6.docx
 
Q
QQ
Q
 
in order to save data from access database and search from it in c# .pdf
in order to save data from access database and search from it in c# .pdfin order to save data from access database and search from it in c# .pdf
in order to save data from access database and search from it in c# .pdf
 
C#
C#C#
C#
 
Insertarbotones en c
Insertarbotones en cInsertarbotones en c
Insertarbotones en c
 
C# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdfC# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdf
 
The Ring programming language version 1.9 book - Part 18 of 210
The Ring programming language version 1.9 book - Part 18 of 210The Ring programming language version 1.9 book - Part 18 of 210
The Ring programming language version 1.9 book - Part 18 of 210
 
Vb database connections
Vb database connectionsVb database connections
Vb database connections
 
The Ring programming language version 1.3 book - Part 83 of 88
The Ring programming language version 1.3 book - Part 83 of 88The Ring programming language version 1.3 book - Part 83 of 88
The Ring programming language version 1.3 book - Part 83 of 88
 
Advanced Java - Practical File
Advanced Java - Practical FileAdvanced Java - Practical File
Advanced Java - Practical File
 
The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.3 book - Part 5 of 88The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.3 book - Part 5 of 88
 

Recently uploaded

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 

Recently uploaded (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 

Ditec esoft C# project

  • 1. DiTec Esoft C# Project Free DiTec Project Esoft (C#) Cource: Diploma in Information Technology With E commerce Obtained Grade B For This Project Do not direct copy form this project. This project was uploaded to enhance your IT knowledge.I think this project may be very helpful to understand procedure of C# project for DiTEC.
  • 2.
  • 3.
  • 4. Welcome Start & Window Enter Button private void BtnEnter_Click(object sender, EventArgs e) { FrmWelcome fr = new FrmWelcome(); fr.Show(); this.Hide();
  • 5. } Exit Button private void BtnExit_Click(object sender, EventArgs e) { DialogResult d1; d1 = MessageBox.Show("Are You Sure Do You Want To Exit ?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (d1.ToString() == "Yes") { Application.Exit(); } } Welcome & Loading Window Timer control private void timer1_Tick(object sender, EventArgs e) { if (progressBar1.Value < 100) { progressBar1.Value = progressBar1.Value + 2; } else { timer1.Enabled=false; FrmUser fr = new FrmUser(); fr.Show(); this.Hide(); } Timer Properties
  • 6. Login Window Submit Button string username = "kasun"; string password = "8620"; private void button1_Click(object sender, EventArgs e) { if (TxtUsername.Text == username && TxtPassword.Text == password) { DialogResult m2; m2 = MessageBox.Show("Thank You!", "Sucsess",MessageBoxButtons.OK, MessageBoxIcon.Information); if (m2.ToString() == "OK") { MDISystem md1 = new MDISystem(); md1.Show(); this.Hide(); } }
  • 7. else { DialogResult m2; m2 = MessageBox.Show("Incorrect Username & Password ","Error!", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error); if (m2.ToString() == "Retry") { TxtUsername.Clear(); TxtPassword.Clear(); TxtUsername.Focus(); Clear Button TxtUsername.Text = ""; TxtPassword.Text = ""; TxtUsername.Focus(); Exit Button DialogResult d1; d1 = MessageBox.Show("Are You Sure Do You Want To Exit ?","Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (d1.ToString() == "Yes") { Application.Exit(); } MDI Window (Inside Menu Bar) Appointment Details Window FrmAppoinment_Details frm = new FrmAppoinment_Details(); frm.MdiParent = this; frm.Show(); Medical Details Window FrmMedical_Detals frm= new FrmMedical_Detals(); frm.MdiParent = this; frm.Show(); Patient Details Window FrmPatient_Details frm = new FrmPatient_Details(); frm.MdiParent = this; frm.Show(); Doctor Details Window
  • 8. FrmDoctor frm = new FrmDoctor(); frm.MdiParent = this; frm.Show(); Medical Packages Window FrmDoctor frm = new FrmDoctor(); frm.MdiParent = this; frm.Show(); Help Window FrmHelp frm = new FrmHelp(); frm.MdiParent = this; frm.Show(); Author Window FrmAuthor frm = new FrmAuthor(); frm.MdiParent = this; frm.Show(); Appointment Details Window Add Button string connectionstring,commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring="INSERT INTO app VALUES('"+CboRef.Text+"','"+txtpatname.Text+"','"+txtcontact.Text+"','"+txtad dress.Text+"','"+cbogender.Text+"','"+comboBox1.Text+"','"+txtamount.Text+"') "; MessageBox.Show("OK","Add Data ?",MessageBoxButtons.OK,MessageBoxIcon.Error); OleDbConnection conn=new OleDbConnection(connectionstring); OleDbCommand comm=new OleDbCommand(commandstring,conn);
  • 9. conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Click OK","Data Added Successfully",MessageBoxButtons.OK); conn.Close(); Search Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "SELECT*FROM app WHERE rn='" + CboRef.Text + "'"; OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); OleDbDataReader reader=null; try { conn.Open(); } catch (Exception ex) { MessageBox.Show("Completed !"); } reader = comm.ExecuteReader(); while (reader.Read()) { txtpatname.Text = reader[1].ToString(); txtcontact.Text = reader[2].ToString(); txtaddress.Text = reader[3].ToString(); cbogender.Text = reader[4].ToString(); comboBox1.Text = reader[5].ToString(); txtamount.Text = reader[6].ToString(); } reader.Close(); Update Button String connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "UPDATE app SET rn='" + CboRef.Text +"',pn='" + txtpatname.Text + "',co='" + txtcontact.Text + "',ad='" + txtaddress.Text + "',gn='" + cbogender.Text + "',pt='" + comboBox1.Text + "',am='" + txtamount.Text + "'"; MessageBox.Show("Are u Sure", "Do You Want Update ?",MessageBoxButtons.OK, MessageBoxIcon.Error); OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Success", "Data Added Sucsessfully!",MessageBoxButtons.OK, MessageBoxIcon.Error); conn.Close(); Clear Button CboRef.Text = ""; txtpatname.Text = "";
  • 10. txtcontact.Text = ""; txtaddress.Text = ""; cbogender.Text = ""; comboBox1.Text = ""; txtamount.Text = ""; Delete Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "DELETE*FROM app WHERE rn='"+CboRef.Text+ "'"; if (MessageBox.Show("Are You Sure Do You Want Delete This Record ?", "Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) { return; } OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Record Deleted Successfully"); CboRef.Text = ""; txtpatname.Clear(); txtcontact.Clear(); txtaddress.Clear(); cbogender.Text = ""; comboBox1.Text = ""; txtamount.Clear(); conn.Close(); Exit Button this.Hide(); Medical Details Window
  • 11. Add Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "INSERT INTO medical VALUES('" + comboBox1.Text + "','" + textBox3.Text + "','" + textBox2.Text +"','" + textBox1.Text + "','" + comboBox2.Text + "')"; MessageBox.Show("OK", "Add Data ?", MessageBoxButtons.OK,MessageBoxIcon.Error); OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Click OK", "Data Added Successfully",MessageBoxButtons.OK); conn.Close(); Search Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "SELECT*FROM medical WHERE pno='" + comboBox1.Text + "'"; OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); OleDbDataReader reader = null; try { conn.Open(); } catch (Exception ex) { MessageBox.Show("Completed !"); } reader = comm.ExecuteReader();
  • 12. while (reader.Read()) { textBox3.Text = reader[1].ToString(); textBox2.Text = reader[2].ToString(); textBox1.Text = reader[3].ToString(); comboBox2.Text = reader[4].ToString(); } reader.Close(); Update Button String connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "UPDATE medical SET pno='" + comboBox1.Text + "',pn='" + textBox3.Text + "',q='" + textBox2.Text +"',pp='" + textBox1.Text + "',de='" + comboBox2.Text + "'"; MessageBox.Show("Are u Sure", "Do You Want Update ?",MessageBoxButtons.OK, MessageBoxIcon.Error); OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Success", "Data Added Sucsessfully!",MessageBoxButtons.OK, MessageBoxIcon.Error); conn.Close(); Clear Button comboBox1.Text = ""; textBox3.Text = ""; textBox2.Text = ""; textBox1.Text = ""; comboBox2.Text = ""; Delete Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "DELETE*FROM medical WHERE pno='" + comboBox1.Text + "'"; if (MessageBox.Show("Are You Sure Do You Want Delete This Record ?", "Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) { return; } OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open();
  • 13. comm.ExecuteNonQuery(); MessageBox.Show("Record Deleted Successfully"); textBox3.Clear(); textBox2.Clear(); textBox1.Clear(); comboBox2.Text = ""; comboBox1.Text = ""; conn.Close(); Exit Button this.Hide(); Patient Details Window Add Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "INSERT INTO patient VALUES('" + comboBox1.Text + "','" + textBox1.Text + "','" + comboBox2.Text +"','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')"; MessageBox.Show("OK", "Add Data ?",MessageBoxButtons.OK, MessageBoxIcon.Error); OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open();
  • 14. comm.ExecuteNonQuery(); MessageBox.Show("Click OK", "Data Added Successfully",MessageBoxButtons.OK); conn.Close(); Search Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "SELECT*FROM patient WHERE pno='" + comboBox1.Text + "'"; OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); OleDbDataReader reader = null; try { conn.Open(); } catch (Exception ex) { MessageBox.Show("Completed !"); } reader = comm.ExecuteReader(); while (reader.Read()) { textBox1.Text = reader[1].ToString(); comboBox2.Text = reader[2].ToString(); textBox2.Text = reader[3].ToString(); textBox3.Text = reader[4].ToString(); textBox4.Text = reader[5].ToString(); } reader.Close(); Update Button String connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "UPDATE patient SET pno='" + comboBox1.Text + "',pn='" + textBox1.Text + "',db='" + comboBox2.Text + "',bg='" + textBox2.Text + "',da='" + textBox3.Text + "',dr='" + textBox4.Text + "'"; MessageBox.Show("Are u Sure", "Do You Want Update ?",MessageBoxButtons.OK, MessageBoxIcon.Error); OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Success", "Data Added Sucsessfully!",MessageBoxButtons.OK, MessageBoxIcon.Error); conn.Close(); Clear Button comboBox1.Text = ""; textBox1.Text = ""; comboBox2.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = "";
  • 15. Delete Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "DELETE*FROM patient WHERE pno='" + comboBox1.Text + "'"; if (MessageBox.Show("Are You Sure Do You Want Delete This Record ?", "Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) { return; } OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Record Deleted Successfully"); comboBox1.Text = ""; textBox1.Text = ""; comboBox2.Text = ""; textBox2.Clear(); textBox3.Clear(); textBox4.Text = ""; Exit Button this.Hide(); Doctor Details Window
  • 16. Add Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "INSERT INTO patient VALUES('" + comboBox1.Text + "','" + textBox1.Text + "','" + comboBox2.Text +"','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')"; MessageBox.Show("OK", "Add Data ?", MessageBoxButtons.OK,MessageBoxIcon.Error); OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Click OK", "Data Added Successfully",MessageBoxButtons.OK); conn.Close(); Search Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "SELECT*FROM patient WHERE pno='" + comboBox1.Text + "'"; OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); OleDbDataReader reader = null; try { conn.Open(); } catch (Exception ex) { MessageBox.Show("Completed !"); } reader = comm.ExecuteReader(); while (reader.Read()) { textBox1.Text = reader[1].ToString(); comboBox2.Text = reader[2].ToString(); textBox2.Text = reader[3].ToString(); textBox3.Text = reader[4].ToString(); textBox4.Text = reader[5].ToString(); } reader.Close(); Update Button String connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb";
  • 17. commandstring = "UPDATE patient SET pno='" + comboBox1.Text + "',pn='" + textBox1.Text + "',db='" + comboBox2.Text + "',bg='" + textBox2.Text + "',da='" + textBox3.Text + "',dr='" + textBox4.Text + "'"; MessageBox.Show("Are u Sure", "Do You Want Update ?",MessageBoxButtons.OK, MessageBoxIcon.Error); OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Success", "Data Added Sucsessfully!",MessageBoxButtons.OK, MessageBoxIcon.Error); conn.Close(); Exit Button this.Hide(); Delete Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "DELETE*FROM patient WHERE pno='" + comboBox1.Text + "'"; if (MessageBox.Show("Are You Sure Do You Want Delete This Record ?", "Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) { return; } OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Record Deleted Successfully"); comboBox1.Text = ""; textBox1.Text = ""; comboBox2.Text = ""; textBox2.Clear(); textBox3.Clear(); textBox4.Text = ""; Clear Button comboBox1.Text = ""; textBox1.Text = ""; comboBox2.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; Medical Packages Window
  • 18. Add Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "INSERT INTO patient VALUES('" + comboBox1.Text + "','" + textBox1.Text + "','" + comboBox2.Text +"','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')"; MessageBox.Show("OK", "Add Data ?", MessageBoxButtons.OK,MessageBoxIcon.Error); OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Click OK", "Data Added Successfully",MessageBoxButtons.OK); conn.Close(); Search Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "SELECT*FROM patient WHERE pno='" + comboBox1.Text + "'"; OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); OleDbDataReader reader = null; try { conn.Open(); } catch (Exception ex) { MessageBox.Show("Completed !"); }
  • 19. reader = comm.ExecuteReader(); while (reader.Read()) { textBox1.Text = reader[1].ToString(); comboBox2.Text = reader[2].ToString(); textBox2.Text = reader[3].ToString(); textBox3.Text = reader[4].ToString(); textBox4.Text = reader[5].ToString(); } reader.Close(); Update Button String connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "UPDATE patient SET pno='" + comboBox1.Text + "',pn='" + textBox1.Text + "',db='" + comboBox2.Text + "',bg='" + textBox2.Text + "',da='" + textBox3.Text + "',dr='" + textBox4.Text + "'"; MessageBox.Show("Are u Sure", "Do You Want Update ?",MessageBoxButtons.OK, MessageBoxIcon.Error); OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Success", "Data Added Sucsessfully!",MessageBoxButtons.OK, MessageBoxIcon.Error); conn.Close(); Clear Button comboBox1.Text = ""; textBox1.Text = ""; comboBox2.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; Delete Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "DELETE*FROM patient WHERE pno='" + comboBox1.Text + "'"; if (MessageBox.Show("Are You Sure Do You Want Delete This Record ?", "Sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) { return; } OleDbConnection conn = newOleDbConnection(connectionstring);
  • 20. OleDbCommand comm = new OleDbCommand(commandstring, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Record Deleted Successfully"); comboBox1.Text = ""; textBox1.Text = ""; comboBox2.Text = ""; textBox2.Clear(); textBox3.Clear(); textBox4.Text = ""; Exit Button this.Hide(); Help Window Select Button string connectionstring, commandstring; connectionstring =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Hosptal Management Systemesoft.mdb"; commandstring = "SELECT*FROM help WHERE se='" + comboBox1.Text + "'"; OleDbConnection conn = newOleDbConnection(connectionstring); OleDbCommand comm = new OleDbCommand(commandstring, conn); OleDbDataReader reader = null; try { conn.Open(); } catch (Exception ex) { MessageBox.Show("......"); } reader = comm.ExecuteReader();
  • 21. while (reader.Read()) { textBox2.Text = reader[1].ToString(); } reader.Close(); Exit Button this.Hide(); Author Window Exit Button this.Hide(); Now I think you earned good knowledge about project . Now I hope to give you additional codes to solve some problems. ( These are additional codes ) privatevoid btnadd_Click(object sender, EventArgs e) { string connectionString, commandString; connectionString =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:Hospital SystemHMS.mdb"; commandString = "INSERT INTO Appoinment VALUES ('"+ cborefno.Text + "','" + txtpatname.Text + "','" + txtcontact.Text
  • 22. + "','" + txtaddress.Text + "','" + cbogender.Text + "','" + cboPayment.Text + "','" + txtamount.Text + "')"; OleDbConnection conn = newOleDbConnection(connectionString); OleDbCommand comm = newOleDbCommand(commandString, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Record Added Succesfully"); cborefno.Items.Add(cborefno.Text); Clear(); cborefno.Focus(); conn.Close(); } privatevoid cborefno_SelectedIndexChanged(object sender,EventArgs e ) { string connectionString, commandString; connectionString =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:Hospital SystemHMS.mdb"; commandString = "SELECT * FROM Appoinment WHERE RefNo='" + cborefno.Text + "'"; OleDbConnection conn = newOleDbConnection(connectionString); OleDbCommand comm = newOleDbCommand(commandString, conn); OleDbDataReader reader = null; try { conn.Open(); } catch (Exception ex) { MessageBox.Show(ex.Message); } reader = comm.ExecuteReader(); while (reader.Read()) { txtpatname.Text = reader[1].ToString(); txtcontact.Text = reader[2].ToString(); txtaddress.Text = reader[3].ToString(); cbogender.Text = reader[4].ToString(); cboPayment.Text = reader[5].ToString(); txtamount.Text = reader[6].ToString(); } reader.Close(); conn.Close(); } privatevoid Form1_Load(object sender, EventArgs e) {
  • 23. string connectionString, commandString; connectionString =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:Hospital SystemHMS.mdb"; commandString = "SELECT RefNo FROM Appoinment"; OleDbConnection conn = newOleDbConnection(connectionString); OleDbCommand comm = newOleDbCommand(commandString, conn); OleDbDataReader reader = null; try { conn.Open(); } catch (Exception ex) { MessageBox.Show(ex.Message); } reader = comm.ExecuteReader(); while (reader.Read()) { cborefno.Items.Add(reader[0]); } reader.Close(); conn.Close(); } privatevoid btnupdate_Click(object sender, EventArgs e) { string connectionString, commandString; connectionString =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:Hospital SystemHMS.mdb"; commandString = "UPDATE Appoinment SET PatName = '"+ txtpatname.Text + "', Contact = '" + txtcontact.Text + "', Address = '" + txtaddress.Text + "', Gender = '" + cbogender.Text + "',PayType = '" + cboPayment.Text +"',Amount='" + txtamount.Text + "' where RefNo = '" + cborefno.Text + "'"; if (MessageBox.Show("Are you sure, you want to Update this record?", "Sure?", MessageBoxButtons.YesNo) == DialogResult.No) { return; } OleDbConnection conn = newOleDbConnection(connectionString); OleDbCommand comm = newOleDbCommand(commandString, conn);
  • 24. conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Record Updated Succesfully"); Clear(); cborefno.Focus(); conn.Close(); } privatevoid btndelete_Click(object sender, EventArgs e) { string connectionString, commandString; connectionString =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:Hospital SystemHMS.mdb"; commandString = "DELETE Appoinment.RefNo FROM Appoinment where Appoinment.RefNo = '" + cborefno.Text + "'"; if (MessageBox.Show("Are you sure, you want to delete this record?", "Sure?", MessageBoxButtons.YesNo) == DialogResult.No) { return; } OleDbConnection conn = newOleDbConnection(connectionString); OleDbCommand comm = newOleDbCommand(commandString, conn); conn.Open(); comm.ExecuteNonQuery(); MessageBox.Show("Record Deleted Successfully"); conn.Close(); cborefno.Items.Remove(cborefno.Text); cborefno.Focus(); Clear(); } privatevoid Clear() { cborefno.Text = ""; txtpatname.Clear(); txtcontact.Clear(); txtaddress.Clear(); cbogender.Text = ""; cboPayment.Text = ""; txtamount.Clear(); cborefno.Focus(); } privatevoid btnclear_Click(object sender, EventArgs e)
  • 25. { Clear(); } privatevoid btnexit_Click(object sender, EventArgs e) { this.Hide(); } ******************************** About Me ! ******************************** Kasun Madhusanka Phone:+94770597830 Email:kktmadhusanka@gmail.com To Make likes me on facebook click below link https://www.facebook.com/KKTMadhusanka To make connection with me ! https://www.linkedin.com/in/kktmadhusanka http://www.slideshare.net/kktmadhusanka
  • 26. Posted by Kasun Madhusanka at 3:44 PM