Professional Documents
Culture Documents
on
Name of Project
At
College logo
Submitted by:
Name: ______________
MCA VI Semester
Project Manager
(Lecturer)
Dehradun
CERTIFICATE
DECLARATION
ACKNOWLEGEMENT
CHAPTER.1
iNTRODUCTIO
N
1. INTRODUCTION
a. ABOUT COMPANY
b. ABOUT PROJECT
The system covers all the tasks starting from the new patient registration up
to his investigation by the doctor and his billing. Contains facility to store
current as well as history records and getting proper reports based on them.
The system has been divided into 3 modules:
Billing:
- OPD bill
- Laboratory bill
Medicine Inventory:
- Deals with small-scale medicine inventories, which are run, together with
the dispensary
for selling medicines.
Scope:-
It can be used in any Hospital, Clinic, Dispensary or Pathology labs for
maintaining patient details and their test results.
CHAPTER.2
Project Analysis
2. PROJECT ANALYSIS
i. ECONOMICAL
It deals with the cost benefit analysis. It includes the expenses like
H/W, S/W, installation cost, Medicines’ , MR, wages, salaries etc.
ii. TECHNICAL (H/W & S/W SPECIFICATION)
Component Requirement
Software MSAccess 2000 or 2001 or 2003 or ant new version of MS
office
Hard Disk Disk space requirements will vary with the MS Access
components you install. Minimum 4 GB memory .
iii. OPERATIONAL
3.1 ER DIAGRAMs:-
3.2DFD’s:-
3.3DATABASE DESIGN TABLES:-
CHAPTER.4
coding
1. Login Form
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace DispensoryMGTSystem
{
public partial class frm_LogIn : Form
OleDbConnection connection;
OleDbCommand command;
OleDbDataAdapter da;
DataSet ds;
public string username;
public frm_LogIn()
InitializeComponent();
cmb_username.Focus();
try
{
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "UserDetail");
int i = 0;
do
cmb_username.Items.Add(ds.Tables[0].Rows[i]
[0].ToString().ToString());
cmb_username.Text = ds.Tables[0].Rows[0][0].ToString();
i++;
catch (Exception)
finally
connection.Close();
}
// Cmb_OPDYear.Text = Convert.ToString(DateTime.Now.Year);
obj_AdminLogIn.Password = txt_userpassword.Text;
obj_AdminLogIn.Show();
this.Hide();
else
try
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
da = new OleDbDataAdapter(command);
command.Parameters.AddWithValue("@UserName",
cmb_username.Text);
ds = new DataSet();
da.Fill(ds, "UserDetail");
command.ExecuteNonQuery();
if (cmb_username.Text == ds.Tables[0].Rows[0]
[0].ToString().Trim() && txt_userpassword.Text == ds.Tables[0].Rows[0]
[1].ToString().Trim())
{
userid = Convert.ToInt32(ds.Tables[0].Rows[0][2]);
username = cmb_username.Text;
obj_DispensoryMGT.username = username;
obj_DispensoryMGT.userid = userid;
this.Hide();
obj_DispensoryMGT.Show();
else
txt_userpassword.ResetText();
}
catch (Exception)
finally
connection.Close();
}
}
this.Hide();
Application.Exit();
if (e.KeyChar == 13)
btnlogin_Click(sender, e);
txt_userpassword.Focus();
}
private void cmb_username_KeyUp(object sender, KeyEventArgs e)
if (e.KeyCode == Keys.Enter)
cmb_username_Leave(sender, e);
2. Select_option form
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace DispensoryMGTSystem
OleDbConnection connection;
OleDbCommand command;
OleDbDataAdapter da;
DataSet ds;
public frm_SelectOptions()
InitializeComponent();
if (SendingType == "PatientReport")
cmb_selecttype.Items.Add("Yearly");
cmb_selecttype.Items.Add("Monthly");
cmb_selecttype.Items.Add("Date Wise");
cmb_Nowselect.Text = "-Select-";
cmb_selecttype.Items.Add("Yearly");
cmb_selecttype.Items.Add("Monthly");
cmb_selecttype.Items.Add("Date Wise");
cmb_Nowselect.Text = "-Select-";
if (SendingType == "PatientReport")
{
cmb_Nowselect.Items.Clear();
cmb_Nowselect.Text = "-Select-";
if (cmb_selecttype.Text == "Monthly")
cmb_Nowselect.Items.Add("1");
cmb_Nowselect.Items.Add("2");
cmb_Nowselect.Items.Add("3");
cmb_Nowselect.Items.Add("4");
cmb_Nowselect.Items.Add("5");
cmb_Nowselect.Items.Add("6");
cmb_Nowselect.Items.Add("7");
cmb_Nowselect.Items.Add("8");
cmb_Nowselect.Items.Add("9");
cmb_Nowselect.Items.Add("10");
cmb_Nowselect.Items.Add("11");
cmb_Nowselect.Items.Add("12");
}
cmb_Nowselect.Items.Add("2009");
cmb_Nowselect.Items.Add("2010");
cmb_Nowselect.Items.Add("2011");
cmb_Nowselect.Text = "-Select-";
try
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@SelectYear",
DateTime.Now.Year);
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "PatientRecord");
int j = 0;
do
cmb_Nowselect.Items.Add(Convert.ToDateTime(ds.Tables[
0].Rows[j][0]).ToShortDateString());
j++;
catch (IndexOutOfRangeException)
//finally
//{
// connection.Close();
//}
cmb_Nowselect.Items.Clear();
cmb_Nowselect.Text = "-Select-";
if (cmb_selecttype.Text == "Monthly")
cmb_Nowselect.Items.Add("2");
cmb_Nowselect.Items.Add("3");
cmb_Nowselect.Items.Add("4");
cmb_Nowselect.Items.Add("5");
cmb_Nowselect.Items.Add("6");
cmb_Nowselect.Items.Add("7");
cmb_Nowselect.Items.Add("8");
cmb_Nowselect.Items.Add("9");
cmb_Nowselect.Items.Add("10");
cmb_Nowselect.Items.Add("11");
cmb_Nowselect.Items.Add("12");
cmb_Nowselect.Items.Add("2009");
cmb_Nowselect.Items.Add("2010");
cmb_Nowselect.Items.Add("2011");
cmb_Nowselect.Text = "-Select-";
try
{
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@SelectYear",
DateTime.Now.Year);
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "PatientRecord");
int j = 0;
do
cmb_Nowselect.Items.Add(Convert.ToDateTime(ds.Tables[
0].Rows[j][0]).ToShortDateString());
j++;
catch (IndexOutOfRangeException)
//finally
//{
// connection.Close();
//}
if (SendingType == "PatientReport")
{
try
obj_PatientReport.Puser_ID = SendPuser_ID;
ds = new DataSet();
ds =
obj_PatientReport.SendDataSet(cmb_selecttype.Text.Trim(),
cmb_Nowselect.Text.Trim());
if (ds.Tables[0].Rows[0][0].ToString() == "")
else
ds.WriteXml("C:\\Program Files\\My
Project\\Dispensory\\Xml\\PatientRecord.xml");
obj_Reports.Show();
this.Hide();
catch (IndexOutOfRangeException)
}
}
try
obj_MedicineReport.Puser_ID = SendPuser_ID;
ds = new DataSet();
ds =
obj_MedicineReport.SendDataSetMedicine(cmb_selecttype.Text.Trim(),
cmb_Nowselect.Text.Trim());
if (ds.Tables[0].Rows[0][0].ToString() == "")
else
{
ds.WriteXml("C:\\Program Files\\My
Project\\Dispensory\\Xml\\MedicineStock.xml");
obj_Reports.ReportName = "PatientRecord";
obj_Reports.Show();
this.Hide();
catch (IndexOutOfRangeException)
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace DispensoryMGTSystem
OleDbConnection connection;
OleDbCommand command;
OleDbDataAdapter da;
DataSet ds;
public int Puser_ID = 0;
DataSet Public_DS;
public frm_PatientDetails()
InitializeComponent();
//
try
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@SelectMonthDate",
DateTime.Now.Month);
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "PatientRecord");
Public_DS = ds;
int j = 0;
do
Start_Date = Convert.ToDateTime(ds.Tables[0].Rows[0][0]);
cmb_datefrom.Items.Add(Convert.ToDateTime(ds.Tables
[0].Rows[j][0]).ToShortDateString());
cmb_dateto.Items.Add(Convert.ToDateTime(ds.Tables[0]
.Rows[j][0]).ToShortDateString());
j++;
catch (IndexOutOfRangeException)
{
}
//finally
//{
// connection.Close();
//}
//try
//{
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@UID", Puser_ID);
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "PatientRecord");
Public_DS = ds;
//_DataSet.Tables["Titles"];
lv_PatientDetails.Items.Clear();
if (drow.RowState != DataRowState.Deleted)
lvi.SubItems.Add(drow[1].ToString());
lvi.SubItems.Add(drow[2].ToString());
lvi.SubItems.Add(drow[3].ToString());
lvi.SubItems.Add(drow[4].ToString());
lvi.SubItems.Add(drow[5].ToString());
lvi.SubItems.Add(drow[6].ToString());
lvi.SubItems.Add(drow[7].ToString());
lvi.SubItems.Add(drow[8].ToString());
//}
//catch (Exception)
//{
//}
//finally
//{
// connection.Close();
//}
if (rd_SingleDay.Checked == true)
panel1.Enabled = true;
label4.Visible = true;
cmb_datefrom.Visible = true;
label5.Visible = false;
cmb_dateto.Visible = false;
{
panel1.Enabled = true;
label5.Visible = true;
cmb_dateto.Visible = true;
else
panel1.Enabled = false;
//try
//{
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@UID", Puser_ID);
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "MedicineStockRecord");
Public_DS = ds;
lv_PatientDetails.Items.Clear();
if (drow.RowState != DataRowState.Deleted)
lvi.SubItems.Add(drow[1].ToString());
lvi.SubItems.Add(drow[2].ToString());
lvi.SubItems.Add(drow[3].ToString());
lvi.SubItems.Add(drow[4].ToString());
lvi.SubItems.Add(drow[5].ToString());
lvi.SubItems.Add(drow[6].ToString());
lvi.SubItems.Add(drow[7].ToString());
lvi.SubItems.Add(drow[8].ToString());
//}
//catch (Exception)
//{
//}
//finally
//{
// connection.Close();
//}
if (rd_SingleDay.Checked == true)
if (cmb_datefrom.Text == "-Select-")
else
{
//try
//{
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@PUserID", Puser_ID);
command.Parameters.AddWithValue("@PTreatmentDate1",
Convert.ToDateTime(cmb_datefrom.Text).AddDays(-
1).ToShortDateString()); //@PTreatmentDate
command.Parameters.AddWithValue("@PTreatmentDate2",
Convert.ToDateTime(cmb_datefrom.Text).AddDays(1).ToShortDateString()); /
/@PTreatmentDate
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "PatientRecord");
Public_DS = ds;
//_DataSet.Tables["Titles"];
lv_PatientDetails.Items.Clear();
{
DataRow drow = dtable.Rows[i];
if (drow.RowState != DataRowState.Deleted)
lvi.SubItems.Add(drow[1].ToString());
lvi.SubItems.Add(drow[2].ToString());
lvi.SubItems.Add(drow[3].ToString());
lvi.SubItems.Add(drow[4].ToString());
lvi.SubItems.Add(drow[5].ToString());
lvi.SubItems.Add(drow[6].ToString());
lvi.SubItems.Add(drow[7].ToString());
lvi.SubItems.Add(drow[8].ToString());
// Add the list items to the ListView
lv_PatientDetails.Items.Add(lvi);
//}
//catch (Exception)
//{
//}
//finally
//{
// connection.Close();
//}
else
//try
//{
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@PUserID", Puser_ID);
command.Parameters.AddWithValue("@PTreatmentDate1",
Convert.ToDateTime(cmb_datefrom.Text).AddDays(-
1).ToShortDateString()); //@PTreatmentDate
command.Parameters.AddWithValue("@PTreatmentDate2",
Convert.ToDateTime(cmb_dateto.Text).AddDays(1).ToShortDateString());
//@PTreatmentDate
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "PatientRecord");
Public_DS = ds;
//_DataSet.Tables["Titles"];
// Clear the ListView control
lv_PatientDetails.Items.Clear();
lvi.SubItems.Add(drow[1].ToString());
lvi.SubItems.Add(drow[2].ToString());
lvi.SubItems.Add(drow[3].ToString());
lvi.SubItems.Add(drow[4].ToString());
lvi.SubItems.Add(drow[5].ToString());
lvi.SubItems.Add(drow[6].ToString());
lvi.SubItems.Add(drow[7].ToString());
lvi.SubItems.Add(drow[8].ToString());
lv_PatientDetails.Items.Add(lvi);
}
}
//}
//catch (Exception)
//{
//}
//finally
//{
// connection.Close();
//}
else
//try
//{
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@PUserID", Puser_ID);
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "PatientRecord");
Public_DS = ds;
//_DataSet.Tables["Titles"];
lv_PatientDetails.Items.Clear();
if (drow.RowState != DataRowState.Deleted)
lvi.SubItems.Add(drow[1].ToString());
lvi.SubItems.Add(drow[2].ToString());
lvi.SubItems.Add(drow[3].ToString());
lvi.SubItems.Add(drow[4].ToString());
lvi.SubItems.Add(drow[5].ToString());
lvi.SubItems.Add(drow[6].ToString());
lvi.SubItems.Add(drow[7].ToString());
lvi.SubItems.Add(drow[8].ToString());
lv_PatientDetails.Items.Add(lvi);
//}
//catch (Exception)
//{
//}
//finally
//{
// connection.Close();
//}
}
private void btn_print_Click(object sender, EventArgs e)
Public_DS.WriteXml("C:\\Program Files\\My
Project\\Dispensory\\Xml\\PatientRecord.xml");
obj_Reports.ReportName = "PatientRecord";
obj_Reports.Show();
this.Hide();
4.Patient_record details
//------------------------------------------------------------------------------
// <auto-generated>
// Runtime Version:2.0.50727.4959
//
// Changes to this file may cause incorrect behavior and will be lost if
// </auto-generated>
//------------------------------------------------------------------------------
namespace DispensoryMGTSystem {
using System;
using System.ComponentModel;
using CrystalDecisions.Shared;
using CrystalDecisions.ReportSource;
using CrystalDecisions.CrystalReports.Engine;
public rpt_PatientRecord() {
get {
return "rpt_PatientRecord.rpt";
set {
// Do nothing
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.Desig
nerSerializationVisibility.Hidden)]
return this.ReportDefinition.Sections[0];
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.Desig
nerSerializationVisibility.Hidden)]
return this.ReportDefinition.Sections[1];
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.Desig
nerSerializationVisibility.Hidden)]
get {
return this.ReportDefinition.Sections[2];
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.Desig
nerSerializationVisibility.Hidden)]
get {
return this.ReportDefinition.Sections[3];
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.Desig
nerSerializationVisibility.Hidden)]
get {
return this.ReportDefinition.Sections[4];
[System.Drawing.ToolboxBitmapAttribute(typeof(CrystalDecisions.Shared.
ExportOptions), "report.bmp")]
public Cachedrpt_PatientRecord() {
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.Desig
nerSerializationVisibility.Hidden)]
get {
return true;
}
set {
//
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.Desig
nerSerializationVisibility.Hidden)]
return false;
set {
//
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.Desig
nerSerializationVisibility.Hidden)]
get {
return CachedReportConstants.DEFAULT_TIMEOUT;
set {
//
}
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument
CreateReport() {
rpt.Site = this.Site;
return rpt;
// // be generated.
//
// key = RequestContext.BuildCompleteCacheKey(
// request,
// null, // sReportFilename
// this.GetType(),
// this.ShareDBLogonInfo );
return key;
5.Find_patient Form:-
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace DispensoryMGTSystem
OleDbConnection connection;
OleDbCommand command;
OleDbDataAdapter da;
OleDbCommand command1;
OleDbDataAdapter da1;
DataSet ds;
public frm_FindPatient()
InitializeComponent();
{
if (rd_OPDNo.Checked == true)
try
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@PatientOPDNo",
txt_Find.Text);
command.Parameters.AddWithValue("@Year_Treatment",Select
edYear);
// command.Parameters.AddWithValue("@PDepartment",
txt_Find.Text);
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "MedicineIssued");
//
command1.Parameters.Clear();
command1.Parameters.AddWithValue("@PatientOPDNo",
txt_Find.Text);
command1.Parameters.AddWithValue("@PDate_Year",
SelectedYear);
// command.Parameters.AddWithValue("@PDepartment",
txt_Find.Text);
da1.Fill(ds, "PatientRecord");
lv_PatientDetails.Items.Clear();
if (drow.RowState != DataRowState.Deleted)
lvi.SubItems.Add(drow[1].ToString());
lvi.SubItems.Add(drow[2].ToString());
lvi.SubItems.Add(ds.Tables[1].Rows[0][1].ToString());
lvi.SubItems.Add(ds.Tables[1].Rows[0][2].ToString());
lvi.SubItems.Add(ds.Tables[1].Rows[0][3].ToString());
lv_PatientDetails.Items.Add(lvi);
catch (NullReferenceException)
catch (InvalidCastException)
//catch (Exception)
//{
//}
finally
connection.Close();
//{
// try
// {
// connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
// connection.Open();
// command.Parameters.Clear();
// command.Parameters.AddWithValue("@PName",
txt_Find.Text);
// //command.Parameters.AddWithValue("@PName",
txt_Find.Text);
// // command.Parameters.AddWithValue("@PDepartment",
txt_Find.Text);
// da = new OleDbDataAdapter(command);
// ds = new DataSet();
// da.Fill(ds, "PatientRecord");
// //_DataSet.Tables["Titles"];
// lv_PatientDetails.Items.Clear();
// // Display items in the ListView control
// {
// if (drow.RowState != DataRowState.Deleted)
// {
// lvi.SubItems.Add(drow[3].ToString());
// lvi.SubItems.Add(drow[5].ToString());
// lvi.SubItems.Add(drow[7].ToString());
// lvi.SubItems.Add(drow[12].ToString());
// lv_PatientDetails.Items.Add(lvi);
// }
// }
// }
// catch (NullReferenceException)
// {
// }
// catch (InvalidCastException)
// {
// }
// //catch (Exception)
// //{
// //}
// finally
// {
// connection.Close();
// }
//}
// OPDNumber = Convert.ToInt32();
string FindFileName =
"P_"+lv_PatientDetails.SelectedItems[0].SubItems[0].Text + "_" +
Convert.ToDateTime(lv_PatientDetails.SelectedItems[0].SubItems[2].Text).D
ay.ToString() + "_" +
Convert.ToDateTime(lv_PatientDetails.SelectedItems[0].SubItems[2].Text).M
onth.ToString() + "_" +
Convert.ToDateTime(lv_PatientDetails.SelectedItems[0].SubItems[2].Text).Ye
ar.ToString() + ".pdf";
if (System.IO.File.Exists(FindFileName))
// System.IO.File.Open(FindFileName, System.IO.FileMode.Open);
System.Diagnostics.Process.Start(FindFileName);
else
{
MessageBox.Show("File Not Found.");
if (e.KeyCode == Keys.Enter)
btn_Search_Click(sender, e);
6.Add_Medicene form
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace DispensoryMGTSystem
OleDbConnection connection;
OleDbCommand command;
OleDbDataAdapter da;
DataSet ds;
public frm_AddMedicineToStock()
InitializeComponent();
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@MUserID", mdusrid);
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "MedicineStockRecord");
int i = 0;
do
MmedicineNewCollection.Add(ds.Tables[0].Rows[i]
[0].ToString().ToString());
i++;
catch (IndexOutOfRangeException)
//catch (Exception)
//{
//}
finally
connection.Close();
txt_mname.AutoCompleteMode =
AutoCompleteMode.SuggestAppend;
txt_mname.AutoCompleteSource =
AutoCompleteSource.CustomSource;
txt_mname.AutoCompleteCustomSource = MmedicineNewCollection;
//Validations
if (txt_mname.Text == "")
lbl_Vmname.Visible = true;
if (cmb_mtype.Text == "-Select-")
lbl_Vmtype.Visible = true;
if (txt_mBatchNo.Text == "")
{
lbl_Vmbatch.Visible = true;
if (dtp_mExpiryDate.Value.ToShortDateString() ==
DateTime.Now.ToShortDateString())
lbl_Vmexpirydate.Visible = true;
if (txt_mquantity.Text == "")
{
lbl_VmQuantity.Visible = true;
if (cmb_mSupplierName.Text == "-Select-")
lbl_VmSupplierName.Visible = true;
MessageBox.Show("Enter Details.");
else
int result = 0;
int MedicineRemaining = 0;
try
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.AddWithValue("@MName",
txt_mname.Text);
command.Parameters.AddWithValue("@MType",
cmb_mtype.Text);
command.Parameters.AddWithValue("@MBatchNo",
txt_mBatchNo.Text);
command.Parameters.AddWithValue("@MExpiryDate",
dtp_mExpiryDate.Value.ToShortDateString());
command.Parameters.AddWithValue("@MQuantity",
txt_mquantity.Text);
MedicineRemaining = Convert.ToInt32(txt_mquantity.Text);
command.Parameters.AddWithValue("@MQuantityRemaining",
MedicineRemaining);
command.Parameters.AddWithValue("@MSupplierName",
cmb_mSupplierName.Text);
command.Parameters.AddWithValue("@MDate",
dtp_Date.Value.ToString());
command.Parameters.AddWithValue("@MRemark",
txt_remarks.Text);
command.Parameters.AddWithValue("@MUserID", mdusrid);
command.Parameters.AddWithValue("@IsDeleted",
IsDeletedMD);
result = command.ExecuteNonQuery();
if (result > 0)
{
MessageBox.Show("Medicine " + (txt_mname.Text).ToUpper()
+ " is Saved Successfully.");
else
catch (Exception)
{
finally
connection.Close();
txt_mname.ResetText();
cmb_mtype.Refresh();
cmb_mtype.Text = "-Select-";
txt_mBatchNo.ResetText();
txt_mquantity.ResetText();
cmb_mSupplierName.Refresh();
cmb_mSupplierName.Text = "-Select-";
dtp_Date.Refresh();
txt_remarks.ResetText();
}
txt_mname.ResetText();
cmb_mtype.Refresh();
cmb_mtype.Text = "-Select-";
txt_mBatchNo.ResetText();
txt_mquantity.ResetText();
cmb_mSupplierName.Refresh();
cmb_mSupplierName.Text = "-Select-";
dtp_Date.Refresh();
txt_remarks.ResetText();
this.Hide();
if (txt_mname.Text != "")
lbl_Vmname.Visible = false;
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace DispensoryMGTSystem
{
public partial class frm_UpdateMedicineStock : Form
OleDbConnection connection;
OleDbCommand command;
OleDbDataAdapter da;
int MedicineID = 0;
public int TotalQuantity = 0;
public frm_UpdateMedicineStock()
InitializeComponent();
try
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@MUserID",
MedicineUserID);
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "MedicineStockRecord");
int i = 0;
do
cmb_MedName.Items.Add(ds.Tables[0].Rows[i][0].ToString());
i++;
catch (Exception)
finally
connection.Close();
LoadListView_Medicines();
{
if (cmb_MedName.Text == "--All Medicines--")
LoadListView_Medicines();
else
try
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@MUserID",
MedicineUserID);
command.Parameters.AddWithValue("@MName",
cmb_MedName.Text);
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "MedicineStockRecord");
da.Fill(Glb_DS,"MedicineStockRecord");
//_DataSet.Tables["Titles"];
lv_MedicalStock.Items.Clear();
if (drow.RowState != DataRowState.Deleted)
lvi.SubItems.Add(drow[1].ToString());
lvi.SubItems.Add(drow[2].ToString());
lvi.SubItems.Add(drow[3].ToString());
lvi.SubItems.Add(drow[4].ToString());
lvi.SubItems.Add(drow[5].ToString());
lvi.SubItems.Add(drow[6].ToString());
lvi.SubItems.Add(drow[7].ToString());
lvi.SubItems.Add(drow[8].ToString());
lv_MedicalStock.Items.Add(lvi);
catch (Exception)
{
}
finally
connection.Close();
txt_mquantity.Enabled = true;
txt_mname.Text =
lv_MedicalStock.SelectedItems[0].SubItems[1].Text;
cmb_mtype.Text =
lv_MedicalStock.SelectedItems[0].SubItems[2].Text;
dtp_mExpiryDate.Value =
Convert.ToDateTime(lv_MedicalStock.SelectedItems[0].SubItems[3].Text);
txt_mBatchNo.Text =
lv_MedicalStock.SelectedItems[0].SubItems[4].Text;
txt_mquantity.Text =
lv_MedicalStock.SelectedItems[0].SubItems[5].Text;
txt_mRemaining.Text =
lv_MedicalStock.SelectedItems[0].SubItems[6].Text;
cmb_mSupplierName.Text =
lv_MedicalStock.SelectedItems[0].SubItems[7].Text;
MedicineID =
Convert.ToInt32(lv_MedicalStock.SelectedItems[0].SubItems[8].Text);
TotalQuantity = Convert.ToInt32(txt_mquantity.Text);
}
int result = 0;
try
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.AddWithValue("@MName",
txt_mname.Text);
command.Parameters.AddWithValue("@MType", cmb_mtype.Text);
command.Parameters.AddWithValue("@MBatchNo",
txt_mBatchNo.Text);
command.Parameters.AddWithValue("@MExpiryDate",
dtp_mExpiryDate.Value.ToShortDateString());
command.Parameters.AddWithValue("@MQuantity",
txt_mquantity.Text);
command.Parameters.AddWithValue("@MQuantityRemaining",
txt_mRemaining.Text);
command.Parameters.AddWithValue("@MSupplierName",
cmb_mSupplierName.Text);
command.Parameters.AddWithValue("@ID", MedicineID);
result = command.ExecuteNonQuery();
if (result > 0)
else
catch (Exception)
finally
{
connection.Close();
LoadListView_Medicines();
{
this.Hide();
int result = 0;
try
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.AddWithValue("@ID", MedicineID);
result = command.ExecuteNonQuery();
if (result > 0)
txt_mname.Text = "";
cmb_mtype.Refresh();
cmb_mtype.Text = "-Select-";
txt_mBatchNo.ResetText();
txt_mquantity.Text = "";
cmb_mSupplierName.Refresh();
cmb_mSupplierName.Text = "-Select-";
dtp_mExpiryDate.Refresh();
txt_mRemaining.Text = "";
else
catch (Exception)
}
finally
connection.Close();
LoadListView_Medicines();
//try
//{
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@MUserID", MedicineUserID);
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "MedicineStockRecord");
da.Fill(Glb_DS,"MedicineStockRecord");
//_DataSet.Tables["Titles"];
lv_MedicalStock.Items.Clear();
if (drow.RowState != DataRowState.Deleted)
lvi.SubItems.Add(drow[1].ToString());
lvi.SubItems.Add(drow[2].ToString());
lvi.SubItems.Add(drow[3].ToString());
lvi.SubItems.Add(drow[4].ToString());
lvi.SubItems.Add(drow[5].ToString());
lvi.SubItems.Add(drow[6].ToString());
lvi.SubItems.Add(drow[7].ToString());
lvi.SubItems.Add(drow[8].ToString());
lv_MedicalStock.Items.Add(lvi);
//}
//catch (Exception)
//{
//}
//finally
//{
// connection.Close();
//}
int newquan = 0;
else
txt_mRemaining.Text =
Convert.ToString(Convert.ToInt32(txt_mRemaining.Text) - newquan);
txt_mquantity.Enabled = false;
}
Glb_DS.WriteXml("C:\\Program Files\\My
Project\\Dispensory\\Xml\\MedicineStock.xml");
obj_Reports.ReportName = "MedicineStock";
obj_Reports.Show();
8.Update_Delete_patient form
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace DispensoryMGTSystem
{
public partial class frm_UpdateDeletePatient : Form
OleDbConnection connection;
OleDbCommand command;
OleDbDataAdapter da;
DataSet ds;
int Patient_ID = 0;
public frm_UpdateDeletePatient()
InitializeComponent();
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "PatientRecord");
int i = 0;
do
cmb_PatientOPD.Items.Add(ds.Tables[0].Rows[i][0].ToString());
P_OPDCollection.Add(ds.Tables[0].Rows[i][0].ToString());
i++;
catch (IndexOutOfRangeException)
}
//finally
//{
// connection.Close();
//}
///LoadListView_Medicines();
cmb_PatientOPD.AutoCompleteMode = AutoCompleteMode.Suggest;
cmb_PatientOPD.AutoCompleteSource =
AutoCompleteSource.CustomSource;
cmb_PatientOPD.AutoCompleteCustomSource = P_OPDCollection;
LoadListView_Patient();
//frm_UpdateDeletdPatientTreatment
obj_UpdateDeletdPatientTreatment = new
frm_UpdateDeletdPatientTreatment();
//obj_UpdateDeletdPatientTreatment.Show();
//try
//{
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.Clear();
command.Parameters.AddWithValue("@PUserID", Puser_ID);
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "PatientRecord");
//_DataSet.Tables["Titles"];
lv_PatientDetails.Items.Clear();
{
DataRow drow = dtable.Rows[i];
if (drow.RowState != DataRowState.Deleted)
lvi.SubItems.Add(drow[1].ToString());
lvi.SubItems.Add(drow[2].ToString());
lvi.SubItems.Add(drow[3].ToString());
lvi.SubItems.Add(drow[4].ToString());
lvi.SubItems.Add(drow[5].ToString());
lvi.SubItems.Add(drow[6].ToString());
lvi.SubItems.Add(drow[7].ToString());
lvi.SubItems.Add(drow[8].ToString());
lvi.SubItems.Add(drow[9].ToString());
lvi.SubItems.Add(drow[10].ToString());
lvi.SubItems.Add(drow[11].ToString());
lvi.SubItems.Add(drow[12].ToString());
lvi.SubItems.Add(drow[13].ToString());
lv_PatientDetails.Items.Add(lvi);
//}
//catch (Exception)
//{
//}
//finally
//{
// connection.Close();
//}
txt_PatientOPD_No.Text =
lv_PatientDetails.SelectedItems[0].SubItems[1].Text;
txt_OPD_NO_Monthly.Text =
lv_PatientDetails.SelectedItems[0].SubItems[2].Text;
txt_pname.Text =
lv_PatientDetails.SelectedItems[0].SubItems[3].Text;
SexIs = lv_PatientDetails.SelectedItems[0].SubItems[4].Text;
if (SexIs == "Male")
rd_pmale.Checked = true;
else
rd_pfemale.Checked = true;
}
cmb_pAge.Text =
lv_PatientDetails.SelectedItems[0].SubItems[5].Text;
txt_pDiagnosis.Text =
lv_PatientDetails.SelectedItems[0].SubItems[6].Text;
txt_pAddress.Text =
lv_PatientDetails.SelectedItems[0].SubItems[7].Text;
cmb_ptype.Text =
lv_PatientDetails.SelectedItems[0].SubItems[8].Text;
cmb_pDept.Text =
lv_PatientDetails.SelectedItems[0].SubItems[9].Text;
txt_pcontractorName.Text =
lv_PatientDetails.SelectedItems[0].SubItems[10].Text;
txt_pSiteInjury.Text =
lv_PatientDetails.SelectedItems[0].SubItems[11].Text;
txt_premarks.Text =
lv_PatientDetails.SelectedItems[0].SubItems[12].Text;
Patient_ID =
Convert.ToInt32(lv_PatientDetails.SelectedItems[0].SubItems[13].Text);
LoadListView_Patient();
else
//{
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
//
command.Parameters.Clear();
command.Parameters.AddWithValue("@PUserID", Puser_ID);
command.Parameters.AddWithValue("@POPDNoYearly",
cmb_PatientOPD.Text.Trim());
da = new OleDbDataAdapter(command);
ds = new DataSet();
da.Fill(ds, "PatientRecord");
//_DataSet.Tables["Titles"];
if (drow.RowState != DataRowState.Deleted)
{
lvi.SubItems.Add(drow[1].ToString());
lvi.SubItems.Add(drow[2].ToString());
lvi.SubItems.Add(drow[3].ToString());
lvi.SubItems.Add(drow[4].ToString());
lvi.SubItems.Add(drow[5].ToString());
lvi.SubItems.Add(drow[6].ToString());
lvi.SubItems.Add(drow[7].ToString());
lvi.SubItems.Add(drow[8].ToString());
lvi.SubItems.Add(drow[9].ToString());
lvi.SubItems.Add(drow[10].ToString());
lvi.SubItems.Add(drow[11].ToString());
lvi.SubItems.Add(drow[12].ToString());
lvi.SubItems.Add(drow[13].ToString());
//}
//catch (Exception)
//{
//}
//finally
//{
// connection.Close();
//}
panel3.Enabled = true;
btn_UpdateDeleteAppointments.Enabled = true;
if (rd_pmale.Checked == true)
{
PGender = "Male";
else
PGender = "Female";
//try
// {
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command.Parameters.AddWithValue("@POPDNoYearly",
txt_PatientOPD_No.Text);
command.Parameters.AddWithValue("@POPDNoMonthly",
txt_OPD_NO_Monthly.Text);
// command.Parameters.AddWithValue("@PVisitNo", txt_VisitNo.Text);
command.Parameters.AddWithValue("@PName", txt_pname.Text);
command.Parameters.AddWithValue("@PSex", PGender);
command.Parameters.AddWithValue("@PAge", cmb_pAge.Text);
command.Parameters.AddWithValue("@PType", cmb_ptype.Text);
command.Parameters.AddWithValue("@PAddress",
txt_pAddress.Text);
command.Parameters.AddWithValue("@PDepartment",
cmb_pDept.Text);
command.Parameters.AddWithValue("@PDiagnosis",
txt_pDiagnosis.Text);
command.Parameters.AddWithValue("@PSiteInjury",
txt_pSiteInjury.Text);
command.Parameters.AddWithValue("@PContractorName",
txt_pcontractorName.Text);
command.Parameters.AddWithValue("@PUserID", Puser_ID);
command.Parameters.AddWithValue("@IsDeleted", IsDeletedPatient);
command.Parameters.AddWithValue("@PRemark",
txt_premarks.Text);
command.Parameters.AddWithValue("@ID", Patient_ID);
result = command.ExecuteNonQuery();
if (result > 0)
else
}
//}
//catch (Exception)
//{
//}
//finally
//{
// connection.Close();
//}
LoadListView_Patient();
if (rd_pmale.Checked == true)
PGender = "Male";
else
PGender = "Female";
}
//Save Patient Details in DataBase
int result = 0;
try
connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
connection.Open();
command = new OleDbCommand("Update PatientRecord Set
IsDeleted = 1 Where (PUserID = @PUserID) AND (ID = @ID) AND (IsDeleted
= 0)", connection);
command.Parameters.AddWithValue("@PUserID", Puser_ID);
command.Parameters.AddWithValue("@ID", Patient_ID);
result = command.ExecuteNonQuery();
if (result > 0)
else
catch (Exception)
{
MessageBox.Show("There is Some Problems in Saving Treatment,
Please Again Login the System.");
finally
connection.Close();
LoadListView_Patient();
}
}
9.Import_patient_From_excel Form
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace DispensoryMGTSystem
{
OleDbConnection Connection;
OleDbCommand Command;
OleDbDataAdapter da;
DataSet ds;
OleDbConnection ConnectionP;
OleDbCommand CommandP;
int resultimport ;
public frm_ImportPatientfromExcel()
InitializeComponent();
System.Diagnostics.Process.Start(@"C:\Program Files\My
Project\Dispensory\Excel Templete\ExcelTempletePatientData.xls");
if (OFD.ShowDialog() == DialogResult.OK)
{
try
Connection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" +
OFD.FileName + ";Extended Properties=Excel 8.0");
Connection.Open();
da = new OleDbDataAdapter(Command);
ds = new DataSet();
da.Fill(ds, "[PaitiantDetails$]");
int i =0;
if (ds.Tables[0].Rows.Count > 0)
do
resultimport = 0;
ConnectionP = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\Program Files\\My
Project\\Dispensory\\Data\\DispensaryMgtSystem.mdb;Persist Security
Info=False");
ConnectionP.Open();
CommandP.Parameters.AddWithValue("@POPDNoYearly",
ds.Tables[0].Rows[i][0].ToString().Trim());
CommandP.Parameters.AddWithValue("@POPDNoMonthly",
ds.Tables[0].Rows[i][1].ToString().Trim());
CommandP.Parameters.AddWithValue("@PName",
ds.Tables[0].Rows[i][3].ToString().Trim());
CommandP.Parameters.AddWithValue("@PSex",
ds.Tables[0].Rows[i][5].ToString().Trim());
CommandP.Parameters.AddWithValue("@PAge",
ds.Tables[0].Rows[i][4].ToString().Trim());
CommandP.Parameters.AddWithValue("@PType",
ds.Tables[0].Rows[i][7].ToString().Trim());
CommandP.Parameters.AddWithValue("@PAddress",
ds.Tables[0].Rows[i][6].ToString().Trim());
CommandP.Parameters.AddWithValue("@PDepartment",
ds.Tables[0].Rows[i][8].ToString().Trim());
CommandP.Parameters.AddWithValue("@PDiagnosis",
ds.Tables[0].Rows[i][10].ToString().Trim());
CommandP.Parameters.AddWithValue("@PSiteInjury",
ds.Tables[0].Rows[i][21].ToString().Trim());
CommandP.Parameters.AddWithValue("@PContractorName
", ds.Tables[0].Rows[i][9].ToString().Trim());
CommandP.Parameters.AddWithValue("@PTreatmentDate"
, Convert.ToDateTime(ds.Tables[0].Rows[i][2]));
CommandP.Parameters.AddWithValue("@UID", USR_ID);
CommandP.Parameters.AddWithValue("@IsDeleted",
IsDeletedPatient);
CommandP.Parameters.AddWithValue("@TMedicineName1
", ds.Tables[0].Rows[i][11].ToString().Trim());
CommandP.Parameters.AddWithValue("@TMedicineName2
", ds.Tables[0].Rows[i][13].ToString().Trim());
CommandP.Parameters.AddWithValue("@TMedicineName3
", ds.Tables[0].Rows[i][15].ToString().Trim());
CommandP.Parameters.AddWithValue("@TMedicineName4
", ds.Tables[0].Rows[i][17].ToString().Trim());
CommandP.Parameters.AddWithValue("@TMedicineName5
", ds.Tables[0].Rows[i][19].ToString().Trim());
//command.Parameters.AddWithValue("@TMedicineName6
", cmb_md6.Text);
//command.Parameters.AddWithValue("@TMedicineName7
", cmb_md7.Text);
//command.Parameters.AddWithValue("@TMedicineName8
", cmb_md8.Text);
//command.Parameters.AddWithValue("@TMedicineName9
", cmb_md9.Text);
//command.Parameters.AddWithValue("@TMedicineName1
0", cmb_md10.Text);
CommandP.Parameters.AddWithValue("@TMedicineQNT1",
ds.Tables[0].Rows[i][12].ToString().Trim());
CommandP.Parameters.AddWithValue("@TMedicineQNT2",
ds.Tables[0].Rows[i][14].ToString().Trim());
CommandP.Parameters.AddWithValue("@TMedicineQNT3",
ds.Tables[0].Rows[i][16].ToString().Trim());
CommandP.Parameters.AddWithValue("@TMedicineQNT4",
ds.Tables[0].Rows[i][18].ToString().Trim());
CommandP.Parameters.AddWithValue("@TMedicineQNT5",
ds.Tables[0].Rows[i][20].ToString().Trim());
//command.Parameters.AddWithValue("@TMedicineQNT6",
cmb_mdquan6.Text);
//command.Parameters.AddWithValue("@TMedicineQNT7",
cmb_mdquan7.Text);
//command.Parameters.AddWithValue("@TMedicineQNT8",
cmb_mdquan8.Text);
//command.Parameters.AddWithValue("@TMedicineQNT9",
cmb_mdquan9.Text);
//command.Parameters.AddWithValue("@TMedicineQNT10"
, cmb_mdquan10.Text);
resultimport = CommandP.ExecuteNonQuery();
i++;
gdv_PatientData.DataSource = ds.Tables[0];
if (resultimport > 0)
{
else
catch (Exception)
finally
ConnectionP.Close();
Connection.Close();
}
this.Hide();
}
CHAPTER.5
testing
5.1 System Testing:-
5.1.1Unit Testing:
In the unit testing the analyst tests the program making up a system. The
software units in a system are the modules and routines that are assembled
and integrated to perform a specific function. In a large system, many
modules on different levels are needed.
Unit testing can be performed from the bottom up starting with the
smallest and lowest level modules and proceeding one at a time. For each
module in a bottom-up testing, a short program executes the module and
provides the needed data.
This method treats the coded module as a black box. The module runs with
inputs that are likely to cause errors. Then the output is checked to see if
any error occurred. This method cannot be used to test all errors, because
some errors may depend on the code or algorithm used to implement the
module. This method treats the coded module as a black box. The module
runs with inputs that are likely to cause errors. Then the output is checked to
see if any error occurred. This method cannot be used to test all errors,
because some errors may depend on the code or algorithm used to
implement the module.
For example in this project white box testing is performed against inpatient
module. Without entering text if we apply it displays the message “First add
record then save it” else it should be saved.
This method treats the coded module as a black box. The module runs with
inputs that are likely to cause errors. Then the output is checked to see if
any error occurred. This method cannot be used to test all errors, because
some errors may depend on the code or algorithm used to implement the
module.
CHAPTER.6
snapshots
1. Login form:-
2. Select_Option Form:-
6.
8.
9.
.
CHAPTER.7
Conclusion
7. 1 CONCLUSION:-
The system also provides the facility of backup as per the requirement.
CHAPTER.8
Bibliegraphy
1. Visual studio 2008
2. http://www.comptechdoc.org/independent/database/begin/sqlstructure.html
3. www.wisegeek.com/what-is-dispensory.htm
4. www.citehr.com/29179-hospitalstock-system.html