Medical Shop MGT - Black Book

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 61

A STUDY ON

“MEDICAL SHOP AUTOMATION SYSTEM”

PROJECT REPORT

SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUEREMENT FOR THE AWARD

BACHELOR OF INFORMATION TECHNOLOGY

BY
Divyesh.Khanvilkar
Under the guidance of
Prof.Archana.Vishwasrao.

UNIVERSITY OF MUMBAI
2014-2015

ACKNOWLEDGEMENT

I am happy to present this project work on CO-OPERATIVE HOUSING


SOCIETY AUTOMATION SYSTEM. The satisfactory completion of this
project is not merely due to my own efforts but also due to the valuable
Page 1 of 61
guidance rendered by my guide and others and also the requisite
infrastructure and facilities made available by my College.
I am thankful to M.Sule Our Honorable Principal for his Encouragement and
Support.
I am thankful to my guide Prof.Archana.Vishwasrao for his/her valuable
guidance.
I also express my sincere thanks to the Staff of the IT Department of
Jogeshwari Education Society college for their unstinted cooperation and
support, which resulted in the smooth completion of this project.

ABSTRACT

This project is developed with an aim to provide an improved Information


and Management System that helps medical shops.
The Software provides help in effective management of supplier details,
Customers’ details, creation of purchase orders to supplier, Creation of bills
for the Customers, keeping track of ‘about to expire’ medicines, etc.
The special features are the Search Criteria for medicines and the generation
of Reports and automatic bill generation for customers.
The following documentation provides an insight of existing system, its
limitations, its scope of improvement and logic with its intricate details to
achieve those improvements.

INDEX

Page 2 of 61
Sr.no Title Page No.

Page 3 of 61
1 Introduction
2 Organizational Overview
Project History
Scope of the project
Need of the system
Existing System
Proposed System
Advantages of Proposed system
3 System specification
Hardware Specification
Software Specification
4 Feasibility Study
Operational Feasibility
Technical Feasibility
Economical Feasibility
5 Diagrams and Charts
Gantt Chart
Data Flow Diagrams
Entity Relationship Diagram
Use Case Diagram
Class Diagram
Activity Diagram
Sequence Diagram
Deployment Diagram
Component Diagram
Event table
6 System Coding
Table Used
Program List
Data Dictionary
Report List
7 Program Documentation
Screen shots And Report Layouts
Coding
8 System Implementation
Methodology Adopted
Maintenance and Evaluation
Cost And Benefit Analysis
9 Testing Phase
Unit Testing
Integration Testing
System Testing

Page 4 of 61
Acceptance Testing
10 Conclusion
11 Bibliography

INTRODUCTION

Page 5 of 61
INTRODUCTION

In Medical Shop, multiple medicines are kept for sell. Its very important to
categorize these medicines for better search. But, still, to search any medicine
manually for its availability, becomes very difficult.
In this system, the medicine details, supplier details, customer details are
stored. The purchase orders to supplier and the goods received entries are
automated. Pending order details are stored. The special feature is to get the
quick look at ‘about to expire medicines’ so that those medicines can be
quickly removed from the shelves.
The main objective of this project is to provide better work efficiency,
security, accuracy, reliability, feasibility.
Our system provides various facilities such as:
User friendly interface.
Database Security.
Proper and well Organizational Reports.

Page 6 of 61
ORGANIZATIONAL
OVERVIEW

Existing System and Need for Computerized System


The old system is a complete manual system.
Medicines entry is done manually.
Suppler details are stored manually.
Purchase order to supplier is created manually and a copy of it is filed.
Page 7 of 61
Order received entries are written manually.
By manually checking the current stock, the reorder level orders are created.
By manually checking the ‘about to expire’ stock, the medicines are removed
from the shelf.
After selling the medicines, stock is manually updated.
There are enormous chances of erroneous information being created.
The existing system is manual, involving a lot of paper work. It is a very time
consuming process.
The existing system consists of the following procedure –
Drawbacks of Existing System
Existing systems which are managed manually is very cumbersome and
redundant. So as a result it has the following drawbacks:
Time delay:
Redundancy:
Prone to errors.
Difficulties in report generation.
Consumes large volume of paper work
Lack of security of data
To avoid all these limitation and make the system working more accurately it
needs to be computerized.

OPERATING ENVIORONMENT
Hardware Requirements:-
CPU : Pentium IV (minimum) Processor.
RAM : 512 MB RAM.
Storage : 80 GB Onwards
Software Requirements:-
Operating System : Microsoft Windows XP/2007
Frontend : Microsoft Visual studio 2010.
Backend : Microsoft SQL Server 2008.

TECHNOLOGIES USED
.NET 3.5
Introduction to .NET:
Visual Studio.NET is a complete set of development tools for building
desktop applications.
The .NET framework:
Page 8 of 61
A framework is commonly thought of as a set of class libraries that aid in the
development of applications. The .NET framework is more than just a set of
classes. The .NET framework is targeted by compilers using a wide variety
of programming languages. The .NET frame work is responsible for
providing a basic platform that these applications can share. This basic
platform includes runtime set of services that oversees the execution of
applications.
You can author applications in any .NET compatible language, including
Visual Basic .NET, c#.NET, Jscript.NET application. Developers can easily
access the benefits of these technologies, which include the managed
common language runtime environment, type safety, inheritance, and so on.
Microsoft SQL Server 2010:
Microsoft SQL Server is Relational Database Management System
(RDBMS) produced by Microsoft. Its primary query language is Transact-
SQL. Microsoft SQL Server has evolved from a state of art client/server
database platform into world-class n-tier database platform that deliver all the
power.

SCOPE OF SYSTEM
As the part of this project, the following activities would be performed.
Manage the Supplier details.
Add details.
Update details
Delete details
View details.
Manage the Medicines details.
Add details
Update details
Delete details
View details.
Create purchase orders
Make Medicines received entries
Make reorders
Medicines Sale entries
Automatically removed ‘about to expire’ medicines from the current
medicines available list.
Report Generation
Datewise Medicines sold Report
Expired stock report
Medicine Stock Report.
Reports Generation
Client Master report
Lorry Master report
Worker master report

Page 9 of 61
OBJECTIVES OF SYSTEM

The System analyst must be aware of exactly what the user requires from
specific system. That is management goals and objectives must be fully
understood.
The main objective of the proposed system is to have quicker access to the
information which is required by management at right time.
To keep record of all Medicines, Suppliers, sales, purchase orders, Medicines
received details etc.
To keep record daily, weekly or monthly.
System should be flexible.
Computerization should reduce paper checking work there by maximized
speed.
To satisfy the end users requirements.
To provide more data security.
System Provides Features:-
Co-ordination.
Large data storage facility.
Data Security.
Higher Productivity.
Fast Documentation.
Quick updating of data.
User Requirements:-
Minimize the extra work by storing data in database on computer server.
Easy Handling of data to convert into information.
Safety of Records from Externals and Internals threats.
Avoid unnecessary duplication of data.
Easy and efficient retrieval and storage of information.
Page 10 of 61
FEASIBILITY STUDY

The very first phase in any system developing life cycle is preliminary
investigation.
The feasibility study is a major part of this phase.
A measure of how beneficial or practical the development of an information
system would be to the organization, is the feasibility.
Our study of the feasible development of the software is going to be in terms
of following aspects:
OPERATIONAL FEASIBILITY:
The proposed system is computerized. The system will reduce the time
consumed and it is not tiresome and cumbersome for the Admin to maintain
the records. Due to password facility outside interference is avoided. These
things make our system operationally feasible.
TECHNICAL FEASIBILITY:
Pentium 4.
1 GB of RAM.
20 GB or higher capacity HARDDISK
Licensed Software of C#.net and SQL Server 2008.

ECONOMIC FEASIBILITY:
Once the required hardware and software requirements get fulfilled, there is
no need for the user of our system to spend for any additional overhead.
For the user, the system will be economically feasible in the following
aspects:

The system will reduce a lot of paper work. Hence the cost will be reduced.
Page 11 of 61
Our system will reduce the time that is wasted in manual processes.
There will be training for only Admin, So cost is reduced.
The storage and handling problems of the registers will be solved.

DIAGRAMS &
CHARTS

Page 12 of 61
Project Schedule:
Planned Time

Actual Time

GNATT CHART

DFD Context Level

Page 13 of 61
DFD 0 LEVEL

Page 14 of 61
DFD Level 1 Process 2 Add Medicines Details

Page 15 of 61
DFD Level 1 Process 5 Process purchase Order

ER DIAGRAM

Page 16 of 61
Use Case Diagram

Description:-
A use case diagram depicts a static view of system functions & there static
relationship both with external entities & with one another.
It shows a set “use cases” (set of functionality performed by the system), the
“actors” (people or system that interact with the system) & there
Page 17 of 61
relationships.
It models what the system is expected do.

TOOL NAME NOTATION DESCRIPTION

SYSTEM It helps to identifies what


are external vs. internals.
Use cases appeared within
the system & actors are
external to the system.
Actor An actor is same one that
must interact with the
system under development.
Actors are not part of
system they represent
anyone that must interact
with the system.
Use cases A use case is a pattern or
behaviors that the system
exhibit. A use case
represent a major Pease of
functionality that is
compete from beginning to
end.
Association It shows direct association
between use cases &
actors.
Dependency It shows the dependency
…………………. between two use cases.
When one use cases is
dependent such
relationship with
dependency.
Include relationship It means one use case
<<include>> include another use case
………………….. that means one use case
always invoked another use
case.
Extend relationship It means one use case
<<extends>> sometimes invoke another
use case
Generalization It shows
generalization/specification

Page 18 of 61
relationship. A given use
case may have common
behavior, requirement,
constrains, & assumption
with more general use case.
In this case describe them
ones & deal with it in the
same way in specialize
cases.

USE CASE DIAGRAM

Page 19 of 61
System

Create product base


Admin

Add supplier

Create purchase order

Supplier
Gets purchase order

Delivers the order

Create product received details

Admin user

Create reorder

Adds customer

sell medicines

Create bill

Remove expired medcines

Gets the bill

Customer

Gets the medicines

ACTIVITY DIAGRAM

Description:- An Activity diagram shows the work flow of activity (or action
state) an Activity can correspond tools any kind of server kind of task, such
as the modeling business process it can correspond to a human task such as
Page 20 of 61
approving of document.

Sr Tool Name Notation Description


No.
1. Activity The symbol shows the activity.

2. Workflow The show the flow of next activity that as


been going to take.

3. Start Indicates the starting point of activity


diagram.
4. Stop Indicates the ending point of activity
diagram.

5. Condition It checks for the condition whether the result


is true or false.
6. Fork Fork: When spiting of single flow of control into
two or more concurrent flows of the control.

Fork:

7 Join A join represent the synchronization of two


or more flow of control into one sequential
flow of control.

8. Event Sent In activity diagram the communication


between object is model as an event, this
symbol shows that event has been sent.
9. Event In activity diagram the communication
Received between object is model as an event, this
symbol shows that event has been received.

Activity Diagram

Page 21 of 61
customer comes to shop

customer gives prescription receipt

owner checks for the medicines

Out of Stock customer gives the order to the supplier

shopkeeper receives the stock


if medicines are available

shopkeeper checks the stock


Scans Medicine with Barcode
shopkeeper gives the payment

gets the cost of the medicines supplier receives the payment

hand over the medicines to the customer

customer collects the medicines

shopkeeper prints the bill

customer pays the bill

shopkeeper receives the payment

CLASS DIAGRAM

Description:- A class diagram shows the existence of classes & their


relationship when a logical view of the system.

Tool Name Notation Description

Page 22 of 61
A class defines correction
Class Class Name of similar instances.

An object is particular
Object Name
Object instance of the class.

Class Name
Attributes is an instance
Attributes Attributes variable with value
synatrics.
A
Operation is something
Operations Class Name you can ask as an
Attributes instance to do operation is
Operations
listed in
third compartment of the
class.
Public access item is
Access Control Class Name accessable anywhere
Attributes[Private]
Operation[public] public member are
accessable by the class &
its Friends

Class methods Class Name


Class attributes & method
& Class Attributes are also known as static
Attributes Class Methods methods.

Links between objects The link is undirected page


between two objects.

An association is
Association between relationship between
classes classes diagram.
An aggregation is special
Aggregation Class
form of association used to
Class
Name Name model whole part of
relationship diamond
symbol appears next to the
whole element.
Composition relationship
Class Class
Composition Name Name
indicates strong
relationship & co-incident

Page 23 of 61
Specialization is
Class specialization relationship between
instance specialization is
the kind relationship.

Abstract methods For abstract methodsno


& Class Name body should be provided
Classes Attributes the subclass that inherits
Methods[abstract]
the superclass need to
provide implementation of
this abstract methods.

CLASS DIAGRAM

Page 24 of 61
SEQUENCE DIAGRAM

Page 25 of 61
DEPLOYMENT DIAGRAM

Page 26 of 61
COMPONENT DIAGRAM

Page 27 of 61
EVENT TABLE
Sr. Event Trigger Source Activity Response Destination
No.
1. Admin/User List Admin/user Make Confirmati Admin/User
makes make List on of List
medicines request made
list
2. Admin/user Supplier Admin/User Add Confirmati Admin/User

Page 28 of 61
adds add suppliers on of
Supplier request Supplier
add.
3. Admin/user Purchase Admin/User Create Confirmati Admin/User
Sends Order purchase on of
purchase request order purchase
order to order
supplier
4. Admin/User Material Admin/User process Confirmati Admin/User
receives the received material on of
medicines request received material
from the transactio received
supplier n transaction
5. Admin/User reorder Admin/User Create Conformati Admin/User
creates request reorders on of
Reorders reorders
6. Admin/User Medecin Admin/user Sell Confirmati Admin/user
sales es Sell medicine on of Sell
medicines Request
to
customers
7. Admin/User Bill Admin/User Generate Confirmati Admin/User
generates generati Bill on of Bill
the Bill for on generation
the request
customer
8. Admin/User Stock Admin/User Update Confirmati Admin/User
update update Stock on of Stock
Stock request update
9. Admin/User Removal Admin/User Removal Confirmati Admin/User
removes of of on of
‘about to expired expired Expired
expire’ stock stock stock
stock request removal

Page 29 of 61
DATA DICTIONARY

Page 30 of 61
Customer

ExpiredMedicines

Product

ProductBase

Page 31 of 61
PurchaseOrder

SalesOrder

Stock

Supplier

Page 32 of 61
Page 33 of 61
SYSTEM

IMPLEMENTATION

Page 34 of 61
Methodology
Waterfall model

Sometimes also called as classic life cycle or the linear sequential model
suggests a systematic, sequential approach to software development that
begins at the system level and progresses through analysis, design, coding,
testing, and maintenance. Above Figure illustrates the linear sequential model
for software engineering.

SYSTEM/SOFTWARE REQUIREMENTS:
Because software is always part of a larger system (or business), work begins
by establishing requirements for all system elements and then allocating
some subset of these requirements to software. This system view is essential
when software must interact with other elements such as hardware, people,
and databases. System engineering and analysis encompass requirements
gathering at the system level with a small amount of top level design and
analysis. Information engineering encompasses requirements gathering at the
strategic business level and at the business area level.
ANALYSIS: The requirements gathering process is intensified and focused
specifically on software. To understand the nature of the program(s) to be
built, the software engineer ("analyst") must understand the information
domain for the software, as well as required function, behavior, performance,
Page 35 of 61
and interface.
DESIGN: Software design is actually a multistep process that focuses on
four distinct attributes of a program: data structure, software architecture,
interface representations, and procedural (algorithmic) detail. The design
process translates requirements into a representation of the software that can
be assessed for quality before coding begins.
CODING: The design must be translated into a machine-readable form. The
code generation step performs this task. If design is performed in a detailed
manner, code generation can be accomplished mechanistically.
TESTING: Once code has been generated, program testing begins. The
testing process focuses on the logical internals of the software, ensuring that
all statements have been tested, and on the functional externals; that is,
conducting tests to uncover errors and ensure that defined input will produce
actual results that agree with required results.
MAINTENANCE: Software will undoubtedly undergo change after it is
delivered to the customer (a possible exception is embedded software).
Change will occur because errors have been encountered, because the
software must be adapted to accommodate changes in its external
environment (e.g., a change required because of a new operating system or
peripheral device), or because the customer requires functional or
performance enhancements. Software support/maintenance reapplies each of
the preceding phases to an existing program rather than a new one.
MAINTENANCE AND EVALUATION
The current system can include more enhancements.
These are as follows:
The software can be implemented on LAN
It can include a separate module exclusively for the administrator to view.
New and latest technologies can be used for front-end and back-end.

COST AND BENEFIT ANALYSIS


The cost/benefit analysis calculated from the detailed estimates of costs and
benefits. The most frequent error thatinexperienced analysts make during
cost/benefit analysis is to try to do the calculations beforethoroughly defining
costs and benefits. A cost/benefit analysis that does not have thoroughand
complete supporting detail is valueless.

DEVELOPMENT COSTS
Although the project manager has final responsibility for estimating the costs
of development,
senior-level analysts always assist with the calculations. Generally, project
costs come in the following categories:
Salaries and wages
Equipment and installation
Software and licenses
Page 36 of 61
Consulting fees and payments to third parties
Training
Facilities
Utilities and tools
Support staff
Travel and miscellaneous

SOURCES OF ONGOING COSTS OF OPERATIONS


After the new system is up and running, normal operating costs are incurred
every year. The calculation of the cost and benefit of the new system must
also account for these annual operating
costs. Generally, analysts do not include the normal costs of running the
business in this cost. Only the costs that are directly related to the new system
and its maintenance are included. The following list identifies the major
categories of costs that might be allocated to the operation of the new system:
Connectivity
Equipment maintenance
Costs to upgrade software licenses
Computer operations
Programming support
Amortization of equipment
Training and ongoing assistance (the help desk)
Supplies
SOURCES OF BENEFITS
The project manager and members of the project team can determine most of
the development and operational costs. However, the user and the client
receive the benefits of the system.
Consequently, the client and the user must determine the value of the
anticipated benefits. Members of the project team can and do assist, but they
should never attempt to determine the value of benefits by themselves.
Benefits usually come from two major sources: decreased costs or increased
revenues. Cost savings or decreases in expenses come from increased
efficiency in company operations. Areas in which to look for reduced costs
include the following:
Reducing staff by automating manual functions or increasing efficiency
Maintaining constant staff with increasing volumes of work
Decreasing operating expenses such as shipping charges for “emergency
shipments”
Reducing error rates through automated editing or validation
Achieving quicker processing and turnaround of documents or transactions
Capturing lost discounts on money management
Reducing bad accounts or bad credit losses
Reducing inventory or merchandise losses through tighter controls
Collecting receivables (accounts receivable) more rapidly
Capturing lost income due to “stock-outs” by implementing better inventory
Page 37 of 61
management
Reducing cost of goods through volume discounts and purchases
Reducing paperwork costs by implementing electronic data interchange and
other Automation.
In some instances, the importance of the intangible benefits far exceed the
tangible costs, at least in the opinion of the client, and the client proceeds to
develop the system even though the dollar numbers do not indicate a good
investment.
Examples of intangible benefits include the following:
Increased levels of service (in ways that cannot be measured in dollars)
Increased customer satisfaction (not measurable in dollars)
Survival (a standard capability common in the industry, or common to many
competitors)
Need to develop in-house expertise (such as with a pilot program with new
technology)
Examples of intangible costs include the following:
Reduced staff morale
Lost productivity (the organization may not be able to estimate it)
Lost customers or sales (during some unknown period of time)
Only tangible benefits and costs are used when calculating NPV, payback,
and ROI. Eventhough the intangibles do not enter into the calculations, they
should be considered. In fact, they may be the deciding factor in whether the
project proceeds or not.

Page 38 of 61
TESTING
PHASE

TESTING

There are many approaches to software testing. Reviews, walkthroughs, or


inspections are considered as static testing, whereas actually executing
programmed code with a given set of test cases is referred to as dynamic
testing. Static testing can be (and unfortunately in practice often is) omitted.
Dynamic testing takes place when the program itself is used for the first time
Page 39 of 61
(which is generally considered the beginning of the testing stage). Dynamic
testing may begin before the program is 100% complete in order to test
particular sections of code (modules or discrete functions). Typical
techniques for this are either using stubs/drivers or execution from a
debugger environment. For example, spreadsheet programs are, by their very
nature, tested to a large extent interactively ("on the fly"), with results
displayed immediately after each calculation or text manipulation.

Testing Methods

The box approach


Software testing methods are traditionally divided into white- and black-box
testing. These two approaches are used to describe the point of view that a
test engineer takes when designing test cases.

White box testing is when the tester has access to the internal data structures
and algorithms including the code that implement these.
Types of white box testing
The following types of white box testing exist:
API testing (application programming interface) - testing of the application
using public and private APIs
Code coverage - creating tests to satisfy some criteria of code coverage (e.g.,
the test designer can create tests to cause all statements in the program to be
executed at least once)
Fault injection methods - improving the coverage of a test by introducing
faults to test code paths
Mutation testing methods
Static testing - White box testing includes all static testing
Black box testing
Black box testing treats the software as a "black box"—without any
knowledge of internal implementation. Black box testing methods include:
equivalence partitioning, boundary value analysis, all-pairs
testing, fuzz testing, model-based testing, traceability matrix, exploratory
testing and specification-based testing
Testing levels
Tests are frequently grouped by where they are added in the software
development process, or by the level of specificity of the test.
Unit testing
Unit testing refers to tests that verify the functionality of a specific section of
code, usually at the function level. In an object-oriented environment, this is
usually at the class level, and the minimal unit tests include the constructors
and destructors.
These type of tests are usually written by developers as they work on code
(white-box style), to ensure that the specific function is working as expected.
One function might have multiple tests, to catch corner cases or other
Page 40 of 61
branches in the code. Unit testing alone cannot verify the functionality of a
piece of software, but rather is used to assure that the building blocks the
software uses work independently of each other.
Unit testing is also called component testing.
Integration testing
Integration testing is any type of software testing that seeks to verify the
interfaces between components against a software design. Software
components may be integrated in an iterative way or all together ("big
bang"). Normally the former is considered a better practice since it allows
interface issues to be localised more quickly and fixed.
Integration testing works to expose defects in the interfaces and interaction
between integrated components (modules). Progressively larger groups of
tested software components corresponding to elements of the architectural
design are integrated and tested until the software works as a system.
System testing
System testing tests a completely integrated system to verify that it meets its
requirements.
System integration testing
System integration testing verifies that a system is integrated to any external
or third-party systems defined in the system requirements.
Regression testing
Regression testing focuses on finding defects after a major code change has
occurred. Specifically, it seeks to uncover software regressions, or old bugs
that have come back. Such regressions occur whenever software functionality
that was previously working correctly stops working as intended. Typically,
regressions occur as an unintended consequence of program changes, when
the newly developed part of the software collides with the previously existing
code. Common methods of regression testing include re-running previously
run tests and checking whether previously fixed faults have re-emerged. The
depth of testing depends on the phase in the release process and the risk of
the added features. They can either be complete, for changes added late in the
release or deemed to be risky, to very shallow, consisting of positive tests on
each feature, if the changes are early in the release or deemed to be of low
risk.

Acceptance testing
Acceptance testing can mean one of two things:
A smoke test is used as an acceptance test prior to introducing a new build to
the main testing process, i.e. before integration or regression.
Acceptance testing performed by the customer, often in their lab environment
on their own hardware, is known as user acceptance testing (UAT).
Acceptance testing may be performed as part of the handoff process between
any two phases of development.
Page 41 of 61
CODING
PHASE

Page 42 of 61
SCREENSHOTS

LOGIN FORM:

MDI Form
MainMenu.cs

Product Details.aspx
Page 43 of 61
PurchaseOrder.aspx

ProductReceived.aspx

Page 44 of 61
Page 45 of 61
Login Form:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace MedicalShopMgtSyst
{

public partial class Login : Form


{
DataConnection dc = new DataConnection();
public Login()
{
InitializeComponent();
}

private void Login_Load(object sender, EventArgs e)


{
txtUser.Focus();
}

private void Button1_Click(object sender, EventArgs e)


{
dc.conn.Close();
DateTime tday = DateTime.Today;
dc.cmd.CommandText = " select * from login where userid = '" +
txtUser.Text + "' and password ='" + txtPass.Text + "'";
dc.conn.Open();
dc.reader = dc.cmd.ExecuteReader();
if (dc.reader.Read() == true)
{
MessageBox.Show("Welcome to Medical Shop Management System ",
"Medical Shop Management System");

String user = "Current User:" + txtUser.Text;


String userid = txtUser.Text;
this.Hide();
dc.reader.Close();
dc.conn.Close();

Page 46 of 61
MainMenu m = new MainMenu ();
m.Show();
if (userid != "admin")
{
m.EnquiryToolStripMenuItem.Enabled = false;
//'Mainform.AdminToolStripMenuItem.AllowDrop = False

//'MainForm.NewToolStripMenuItem.Enabled = False
//'MainForm.CreditToolStripMenuItem.Enabled = False
//allow = false;
}
else
{
dc.conn.Open();
// dc.cmd.CommandText = "select * from stock where stock <=5";
dc.cmd.CommandText = "select sum(stock) from stock where stock<5
group by productid";
dc.reader = dc.cmd.ExecuteReader();
if (dc.reader.HasRows)
{
DialogResult ans = MessageBox.Show("Many medicines are at the
reorder level.. Want to send the purchase order to the supplier?", "",
MessageBoxButtons.YesNo);
if (ans == DialogResult.Yes)
{

ReorderForm ps = new ReorderForm (); ;


ps.Show();
}
}
dc.cmd.Dispose();
dc.reader.Close();

}
}
else
{
MessageBox.Show("Invalid Username Or Password ", "Medical Shop
Management System");
txtUser.Focus();
dc.conn.Close();
dc.reader.Close();
return;
}
txtUser.Clear();

Page 47 of 61
txtPass.Clear();
}
}
}

Main Menu.cs:

Productdetails.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace MedicalShopMgtSyst

Page 48 of 61
{
public partial class Productdetails : Form
{
DataConnection dc = new DataConnection();
String code1;
public Productdetails()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{
panel1.Enabled = true;
button1.Enabled = false;
button2.Enabled = true;
textBox1.Clear();
textBox2.Clear();

private void button2_Click(object sender, EventArgs e)


{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("Please Enter all the details..");
textBox1.Focus();
return;
}
dc.conn.Close();
code1 = textBox1.Text + "-" + textBox2.Text;
String strsv = "insert into productbase values ('" + code1 + "','" +
textBox1.Text + "','" + textBox2.Text+ "')";
//MessageBox.Show(strsv);
dc.conn.Open();
SqlCommand cmdsv = new SqlCommand(strsv, dc.conn);
int i = cmdsv.ExecuteNonQuery();
MessageBox.Show("Record saved successfully");
button2.Enabled = false;
button1.Enabled = true;
}

private void button3_Click(object sender, EventArgs e)


{
this.Close();

Page 49 of 61
}

ProductDetails.aspx:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace MedicalShopMgtSyst
{
public partial class ProductReceived : Form
{
DataConnection dc = new DataConnection();
int i,pono1,qty;
String suppname, pname,code1;

Page 50 of 61
public ProductReceived()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{
dc.conn.Close();
String sttr = "select * from purchaseorder where flag='p'";
SqlDataAdapter ad = new SqlDataAdapter(sttr, dc.conn);
dc.conn.Open();
DataSet ds = new DataSet();
ad.Fill(ds, "abc");
dataGridView1.DataSource = ds.Tables["abc"];

dataGridView1.Visible = true;
button2.Enabled = true;
}

private void button3_Click(object sender, EventArgs e)


{
this.Close();
}

private void button4_Click(object sender, EventArgs e)


{
textBox2.Clear();
textBox1.Clear();
button4.Enabled= false;
panel1.Enabled = true;
String str = "select name from supplier";
SqlDataAdapter ad = new SqlDataAdapter(str, dc.conn);
DataSet ds = new DataSet();
ad.Fill(ds, "abc");
comboBox1.DataSource = ds.Tables["abc"];
comboBox1.DisplayMember = "name";
dc.conn.Close();

if (comboBox1.Items.Count == 0)
{
MessageBox.Show("No orders are pending...");
button1.Enabled = false;
}

Page 51 of 61
private void ProductReceived_Load(object sender, EventArgs e)
{
// label5.Visible = true;
// label7.Visible = true;
// label9.Visible = true;

button2.Enabled = false;
// button3.Enabled = false;
dateTimePicker2.MinDate = DateTime.Now.Date.AddYears(1);
}

private void dataGridView1_CellClick(object sender,


DataGridViewCellEventArgs e)
{
i = dataGridView1.CurrentRow.Index;
dateTimePicker1.Value =
(DateTime)dataGridView1.Rows[i].Cells[0].Value;
label5.Text = dataGridView1.Rows[i].Cells[1].Value.ToString ();
pono1 = (int)dataGridView1.Rows[i].Cells[1].Value;
code1 = dataGridView1.Rows[i].Cells[3].Value.ToString();
label7.Text = dataGridView1.Rows[i].Cells[4].Value.ToString();
label9.Text = dataGridView1.Rows[i].Cells[5].Value.ToString();
/*dc.cmd.CommandText = "select * from accdetails where acccode='" +
acccode1 + "'";

dc.reader = dc.cmd.ExecuteReader();
while (dc.reader.Read())
{
textBox1.Text = dc.reader["accname"].ToString();
textBox2.Text = dc.reader["price"].ToString();
}*/
}

private void button2_Click(object sender, EventArgs e)


{
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox .Show("Please enter all the details...");
textBox2.Focus();
return;
}
button4.Enabled = true;
button2.Enabled = false;
//dc.reader.Close();

Page 52 of 61
dc.conn.Close();
dc.cmd.CommandText = "update purchaseorder set flag='r', recdate='" +
dateTimePicker1.Value + "' where pono=" + pono1 + " and flag='p'";
dc.conn.Open();
dc.reader = dc.cmd.ExecuteReader();
// dc.reader.Close();
MessageBox.Show("Done...");

button1_Click(null,null);
dc.conn.Close();
String bno = textBox2.Text + DateTime.Now.TimeOfDay ;
dc.cmd.CommandText = "insert into product values ('" + code1 + "','" +
label7.Text + "','" + bno + "','" + dateTimePicker2.Value + "'," + Convert.ToInt64
(textBox1.Text) + "," + Convert.ToInt32(label9.Text) + ",'" +
dateTimePicker1.Value + "')";
// MessageBox.Show(dc.cmd.CommandText);
dc.conn.Open();
dc.reader = dc.cmd.ExecuteReader();
//MessageBox .Show("Record Saved successfully...");

dc.conn.Close();
dc.cmd.CommandText = "insert into stock values ('" + code1 + "','" + bno +
"'," + Convert.ToDouble (textBox1 .Text) + "," + Convert.ToInt32(label9.Text) +
",'" + dateTimePicker2.Value + "')";
//MessageBox.Show(dc.cmd.CommandText);
dc.conn.Open();
dc.reader = dc.cmd.ExecuteReader();

private void comboBox1_Leave(object sender, EventArgs e)


{
dc.conn.Close();
dc.cmd.CommandText = "select count(*) from purchaseorder where
suppname='" + comboBox1 .Text + "' and flag='p'";
dc.conn.Open();
dc.reader = dc.cmd.ExecuteReader();
if (dc.reader.HasRows == false)
{
MessageBox.Show("No orders pending from this supplier...");
return;
}

Page 53 of 61
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if ((((int)(e.KeyChar) >= 45) && (int)(e.KeyChar) <= 57) ||
((int)e.KeyChar == 8) ||((int)e.KeyChar == 46) )
e.Handled = false;
else
e.Handled = true;

}
}

Reports

Page 54 of 61
Bill

Page 55 of 61
Page 56 of 61
CONCLUSION

CONCLUSION

The developed system is successfully implemented. The system is


successfully tested and also it provides nearly all requirements of user. The
System provide quick convent timely information and output with better
accuracy with using less time, less manual efforts, less cost, but up to this
time. There is security of keeping data, and also it is flexible enough to
accommodate further change of future requirements. It also provides some
kind of help to user about application through help file.

System helps to store all the data about the customer order transaction in
Page 57 of 61
computer and there is no need to do paper work.
Data is going to be preserved carefully for longer period hence proper backup
is required otherwise there is chance of losing entries or data.

FUTURE ENHANCEMENTS

Page 58 of 61
FUTURE ENHANCEMENTS

The future enhancement is to generate the purchase orders, reorders and mail
them to the supplier.
There are certain medicines which cannot be sold without doctor’s
prescription. In such cases, the prescriptions will be scanned and stored in the
system before selling such medicines which gives a proof of selling the
medicines to the customer who has shown the proper prescription of the
doctor.

Page 59 of 61
BIBLIOGRAPHY

BIBLIOGRAPHY

Black Book
Steven Holzner
System Analysis, Design and Introduction to Software Engineering
Prof.S.P.Parthasarathy Prof.B.W.Khalkar.
Page 60 of 61
System Analysis and Design in a Changing World
John W. Satzinger,
Robert B. Jackson,
Stephen D.Burd
Software Engineering
Pankag Jalote

Page 61 of 61

You might also like