Академический Документы
Профессиональный Документы
Культура Документы
Documentation
Prepared by:
Safaa Shaaban Hasan
INTRODUCTION:
This project is insight into the design and implementation of a Pharmacy Management System. The
primary aim of is to improve accuracy and enhance safety and efficiency in the pharmaceutical store.
Today management is one of the most essential features of all form. Management provides
sophistication to perform any kind of task in a particular form. This is pharmacy management system; it
is used to manage most pharmacy related activities in the pharmacy.
The main aim of the project is the management of the database of the pharmay . This project is insight
into the design and implementation of a Pharmacy Management System. This is done by creating a
database of the available medicines in the shop. The primary aim of pharmacy management system is to
improve accuracy and enhance safety and efficiency in the pharmaceutical store.
. The database is then connected to the main program by using interconnection of the C# program and
the database already created. Pharmacy management system is useful to maintain correct database by
providing an option to update the drugs in stock. This is pharmacy management system; it is used to
manage most pharmacy related activities in the pharmacy.
Pharmacy management system is a management system that is designed to improve accuracy and to
enhance safety and efficiency in the pharmaceutical store. This program can be used in any
pharmaceutical shops having a database to maintain. It is a computer based system which helps the
Pharmacist to improve inventory management, cost, medical safety etc. The software used can generate
reports, as per the user’s requirements. Using this pharmacy management system user is also able to
generate report within a specified period of time. The system allows the user to enter a manufacturing
and expiry date for a particular product or drug during opening stock and sales transaction. The software
can print invoices, bills, receipts etc. It can also maintain the record of supplies sent in by the supplier.
The system will also give report showing the list of products expiry after a specified date before the
product eventually expires. The system services and goals are established by consultation with system
user. It also involves manual entry upon arrival of new batches of drugs and upon drug movement out of
the pharmacy for a certain period. Pharmacy management system is being build. Pharmacy
management system is robust, integrated technology. every month, the pharmacist may want to
generate report for the movement of drugs in and out of the pharmacy, getting information about the
drugs e.g. expiry date, date purchased, number of drug type left, location of a drug in the pharmacy.
Pharmacy management system deals with the maintenance of drugs and consumables in the pharmacy
unit. This pharmacy management system is user friendly.
It deals with the automating tasks of maintaining of Bills. In Pharmacy, Billing management is the key
process. In addition, Pharmacy management system will be able to process drug prescription with ease.
Including safe data store about medicine as well as fast searching, delete and update of medicines. The
pharmacy management system is built for the sake of ensuring effective and clear data saving and
manipulating as well as neat work on the pharmacy medical products. The pharmacy management
system is easy for use so the user can do pharmacy actions without ambiguities
his refers the pharmacy management system project highly minimize time and resource by which,
searching the medicine data you can get the data in quickest time. The main Objectives of the PMS is
making the pharmacy organizations computerized by creating neat work through minimizing or
eliminating wasting of time as well as removing the resources such as papers for data saving
At present, manual system is being utilized in the pharmacy. It requires the pharmacist to manually
monitor each drug that is available in the pharmacy. Pharmacy management has kept paper record in
filing cabinets. Managing a very large pharmacy with records on papers will be tedious and difficult to
keep track of inventories with regards to the drugs in the store, expiry date, quantity of drugs available
based on the categories and their functions. This implies that these services will be manually completed
by the pharmacist. This usually leads to mistakes as the workload of the pharmacist increases. This
system also ensures that there exists a level of restricted access based on functionality and role. This
system also provides optimal drug inventory management by monitoring the drug movement in the
pharmacy.
SYSTEM REQUIREMENT -
Hardware Requirements:
· Computer with either Intel Pentium processor or AMD processor.
· 128MB DDR RAM
· 40GB hard disk drive
Software Requirements:
· Windows 8.1 operating system.
· Microsoft Office package.
· Microsoft Visual Studio2013
Product Management
Suppliers Management
Users Management
Purchase Management
Sell Management
Customer Management
Exit
The above screen displays the options under the Transaction menu.
The Medical and General stores module basically deals with the information of medicine and general
store products. The minimum stock level can be set here as shown in above figure. The minimum stock
level will help the user to be warned when the stock level falls below the specified value.
In this module the product ID i.e. code for each section is automatically generated. This is done when
the user clicks on ADD NEW button.
The navigation buttons provided helps the user to navigate through the records. The option to edit,
delete and save are also given so that the user can modify the records. And you can add image of
product and to save click ok
Fig. Update Product Interface
The Edit Product Module is for checking whether the entries made were correct or not. . . The user can
then edit the particular record and then save it.
The user can search for particular record by entering the name of product or barcode
Fig. Delelte Product Interface
You delete the product click delete and system want to sure you want to delete it by click yes product
will deleted
The suppliers ID textbox is locked so that the user will not enter an invalid code.
Fig. Update New Supplier
The Medicine Purchase module deals with the purchase of the medicine from the suppliers.
These medicines are then updated in the stock table.
In the above figure, user enters the supplier’s code and the supplier’s name automatically
is displayed.
Fig. select Supplier name for Purchase operation
When we click on ADD NEW button and then select customer then select product or pass the
barcodes and then enter QTY of product the click enter the QTY will multiply in sell price
Fig. sells operation(enter qty)
Fig. User Mangment
Fig. User Update Data
Fig. Delete User Mangment
Fig. Order Detalis
Database structure
The tables used are as follows:
Product – keeps Product information.
Supplier – keeps Supplier information.
Expire date – keeps date of product .
Request – purchase register, which store information on purchase of goods for pharmacy.
Request details: purchase details.
Order – sales register, which store information on sales made.
Order details: details of order
Tblcatgories: product tblcatgories
customer – keeps customer information.
Users: – keeps customer information.
Permission: permission of user
SAMPLE SOURCE CODE OF THE SYSTEM:
Add Product Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MyFinal.BL;
using System.IO;
namespace MyFinal.PL
{
public partial class FRM_ADDNEWPRODUCT : Form
{
bool _ISUpdate;
public FRM_ADDNEWPRODUCT(bool ISUpdate)
{
InitializeComponent();
this._ISUpdate = ISUpdate;
DataTable DTCAT = class_product.SP_FILLCATCMB();
CMBCAT.DataSource = DTCAT;
CMBCAT.DisplayMember = "cat_name";
CMBCAT.ValueMember = "cat_id";
DataTable DTSN = class_product.SP_FILLSNCMB();
CMBSN.DataSource = DTSN;
CMBSN.DisplayMember = "sn_name";
CMBSN.ValueMember = "sn_id";
if (_ISUpdate == true)
{
this.Text = "Update the Product";
BTNADD.Text = "update";
DataTable dt =
class_product.SP_GETSELECTEDPRODUCT(FRM_PRODUCTMANAGMENT.ID);
foreach (DataRow dr in dt.Rows)
{
CMBCAT.Text = dr["cat_name"].ToString();
TXTPRODUCTNAME.Text = dr["p_name"].ToString();
TXTPRODUCTDESC.Text = dr["p_desp"].ToString();
TXTBUYPRICE.Text = dr["buyprice"].ToString();
TXTSELLPRICE.Text = dr["sellprice"].ToString();
txtlocation.Text = dr["location"].ToString();
CMBSN.Text = dr["sn_name"].ToString();
txtbarcode.Text = dr["barcodes"].ToString();
byte[] arr = (byte[])dr["p_image"];
MemoryStream ms = new MemoryStream(arr);
PICIMAGE.Image = Image.FromStream(ms);
}
else
{
this.Text = "Add New Product";
BTNADD.Text = "ADD";
}
}
class_product.SP_PPRODUCTSUPDATE(FRM_PRODUCTMANAGMENT.ID,
TXTPRODUCTNAME.Text, TXTPRODUCTDESC.Text, arr, TXTBUYPRICE.Text, TXTSELLPRICE.Text,
(int)CMBCAT.SelectedValue, txtQTY.Text, (int)CMBSN.SelectedValue,
txtbarcode.Text, txtlocation.Text);
MessageBox.Show("Updated susessfully ");
}
}
ADD Purchase :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MyFinal.PL
{
public partial class FRM_ADDNEWPURCH : Form
{
public FRM_ADDNEWPURCH()
{
InitializeComponent();
txtbuyername.Text = Program.UserFullName;
e.Handled=true;
return;
}
for (int i = 0; i < gridproduct.Rows.Count; i++)
{
if (txtprodid.Text == gridproduct.Rows[i].Cells[0].Value.ToString())
{
MessageBox.Show(";)"موجود الدواء هذا
return;
}
}
string Data = "";
if (productexpiredata.Checked)
Data = productexpiredata.Text;
gridproduct.Rows.Add(txtprodid.Text, txtprodname.Text, Data,
txtprodprice.Text, txtprodqty.Text);
txtprodid.Text = txtprodname.Text = txtprodprice.Text = txtprodqty.Text =
"";
btndelete.Enabled = true;
calc();
}
}
productexpiredata.Checked = false;
else
productexpiredata.Text=gridproduct.CurrentRow.Cells[2].Value.ToString();
txtprodprice.Text = gridproduct.CurrentRow.Cells[3].Value.ToString();
txtprodqty.Text = gridproduct.CurrentRow.Cells[4].Value.ToString();
btndelete_Click(null, null);
void calc()
{
double total = 0;
for (int i = 0; i < gridproduct.Rows.Count; i++)
{
total += double.Parse(gridproduct.Rows[i].Cells[3].Value.ToString()) *
double.Parse(gridproduct.Rows[i].Cells[4].Value.ToString());
}
txtreqtotal.Text = total.ToString();
}
}
}
Login Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MyFinal.BL;
namespace MyFinal.PL
{
public partial class FRM_LOGIN : Form
{
public FRM_LOGIN()
{
InitializeComponent();
}
if (txtname.Text == string.Empty)
{
MessageBox.Show(";)"المستخدم اسم ادخال يجب
return;
}
if (txtpass.Text == string.Empty)
{
MessageBox.Show(";)"المرور كلمه ادخال يجب
return;
}
DataTable dt = class_login.Splogin(txtname.Text, txtpass.Text);
if (dt.Rows.Count > 0)
{
/* FRM_MAIN.Check = true;
Program.UserFullName = dt.Rows[0]["UserFullName"].ToString();*/
this.Hide();
FRM_MAIN frm = new FRM_MAIN();
frm.ShowDialog();
}
else
MessageBox.Show(";)"خطأ المرور كلمه او المستخدم اسم
}
if (e.KeyCode == Keys.Enter)
{
if (txtProdID.Text == "")
{
MessageBox.Show("Must select Product");
return;
}
if (TotalQty.Text == "" || float.Parse(TotalQty.Text) <= 0)
{
MessageBox.Show("Qty Enter And in Postivte");
return;
}
if (float.Parse(TotalQty.Text) > TotalQtys)
{
MessageBox.Show(" Quantity Not Enough");
return;
}
for (int i = 0; i < gridproduct.Rows.Count; i++)
{
if (txtProdID.Text == gridproduct.Rows[i].Cells[0].Value.ToString())
{
MessageBox.Show("This product is founded!!");
return;
}
}
gridproduct.Rows.Add(txtProdID.Text, txtProdName.Text, txtProdPrice.Text,
TotalQty.Text);
btndelete.Enabled = true;
TotalQty.Text = txtProdPrice.Text = txtProdName.Text = txtProdID.Text =
"";
CalcOrderTotal();
btnSave.Enabled = true;
}
}
void CalcOrderTotal()
{
float total = 0;
for (int i = 0; i < gridproduct.Rows.Count; i++)
{
total += float.Parse(gridproduct.Rows[i].Cells[2].Value.ToString()) *
float.Parse(gridproduct.Rows[i].Cells[3].Value.ToString());
}
txtOrederTotal.Text = total.ToString();
}
txtProdID.Text = gridproduct.CurrentRow.Cells[0].Value.ToString();
txtProdName.Text = gridproduct.CurrentRow.Cells[1].Value.ToString();
txtProdPrice.Text = gridproduct.CurrentRow.Cells[2].Value.ToString();
TotalQty.Text = gridproduct.CurrentRow.Cells[3].Value.ToString();
btndelete_Click(null, null);
}
}
txtbarcode.Text = "";
}
}
}
}
Supplier Management:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MyFinal.BL;
namespace MyFinal.PL
{
public partial class FRM_SUPPLIERMANGMENT : Form
{
public FRM_SUPPLIERMANGMENT()
{
InitializeComponent();
BTNDISPLAY_Click(null, null);
}
new FRM_SUPPLIER(false).ShowDialog();
}
MessageBox.Show("Delete SucessFully");
}
}
}
}
{
bool IsUpdate;
public FRM_ADD_NEW_USER(bool _IsUpdate)
{
InitializeComponent();
this.IsUpdate = _IsUpdate;
comboBox1.DataSource = CLASS_USER.sp_Permission();
comboBox1.DisplayMember = "Per_name";
comboBox1.ValueMember = "Per_id";
if (IsUpdate)
{
this.Text = ";"المستخدم بيانات تعديل
btn_adduser.Text = ";"تعديل
txt_U_name.Text = USER_MANGMENT.row.Cells[1].Value.ToString();
txt_U_password.Text = txt_U_check_password.Text =
USER_MANGMENT.row.Cells[2].Value.ToString();
txt_U_fullname.Text = USER_MANGMENT.row.Cells[3].Value.ToString();
comboBox1.Text = USER_MANGMENT.row.Cells[4].Value.ToString();
}
else
{
this.Text = ";"المستخدم بيانات اضافه
btn_adduser.Text = ";"اضافه
}
}
else if (txt_U_check_password.Text != txt_U_password.Text)
{
MessageBox.Show(";)"متطابقه غير المرور كلمة
return;
}
else if (txt_U_fullname.Text == "")
{
MessageBox.Show(";)"بالكامل االسم ادخال يجب
return;
if (IsUpdate)
{
CLASS_USER.sp_user_update(int.Parse(USER_MANGMENT.row.Cells[0].Value.ToString()),
txt_U_name.Text, txt_U_password.Text, txt_U_fullname.Text,
int.Parse(comboBox1.SelectedValue.ToString()));
MessageBox.Show(";)"بنجاح التعديل تم
}
else
{
CLASS_USER.sp_users_insert(txt_U_name.Text, txt_U_password.Text,
txt_U_fullname.Text,
int.Parse(comboBox1.SelectedValue.ToString()));
MessageBox.Show(";)"بنجاح االضافه تم
foreach (Control ctr in groupBox1.Controls)
{
if (ctr is TextBox)
ctr.Text = "";
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
تم بحمــــــــــــــــــــــــــــــــــد هللا