Medical Shop C#
Medical Shop C#
2 Project Management…………………………………………………………………..9
2.1 Project Planning and scheduling 9
2.1.1 Project Development Approach 10
2.1.2 Project Plan 11
2.2 Risk Management 13
2.2.1 Risk Identification 13
2.2.2 Risk Analysis 14
2.2.3 Risk Planning 15
2.3 Estimation 16
2.3.1 Effort Estimation 16
2.3.2 Cost Analysis 16
4 System Analysis………………………………………………………………………20
4.1 Study of Current System 20
4.2 Problem and Weaknesses of Current System 21
4.3 Requirements of New System 21
4.4 Feasibility Study 22
4.5 Requirements Validation 23
4.6 Data Modeling 24
4.6.1 Class Diagram/ E-R diagrams 24
4.6.2 System Activity or Object interaction Diagram 25
4.6.3 Data Dictionary 26
4.7 Functional and Behavioral Modeling 28
4.7.1 Context Diagram 28
4.7.2 Data Flow Diagram (0 and I level) 29
1
6 Testing…………………………………………………………………………………77
6.1 Testing Plan 77
6.2 Testing Strategy 78
6.3 Testing Methods 79
10 Reference……………………………………………………………………………87
2
1:Introduction
1.1 Summary
1.2 purpose
The main purpose of the system is to make the sales information manage
simply and effectively.customers and companies’ management and transactions are entered
on computers and saved on computers and can be accessed as in the form of the reports and
can be updated very easily on computers.
It is quite difficult to maintain the stoke of the medicines in the store and reflect it
with the database. So, the owner can place order for new Medicines And replace expired
medicines.
This software can do that very easily it also provides many facilities.
The attention to the objectives:
3
1.3 scope
This software can be used by the small medical stores to maintain daily stoke of
Medicine for the small unit.
C#, the new language introduced in the .NET Framework. However, C# is a modern,
objected-oriented (from the ground up) type-safe language.
Language features
The following sections take a quick look at some of the features of the C# language.
Classes
All code and data in C# must be enclosed in a class. You can't define a variable
outside of a class, and you can't write any code that's not in a class. Classes can have
constructors, which execute when an object of the class is created, and a destructor, which
executes when an object of the class is destroyed. Classes support single inheritance, and all
classes ultimately derive from a base class called object. C# supports versioning techniques to
help your classes evolve over time while maintaining compatibility with code that uses earlier
versions of your classes.
Data types
C# lets you work with two types of data: value types and reference types. Value types
hold actual values. Reference types hold references to values stored elsewhere in memory.
Primitive types such as char, int and float, as well as enumerated values and structures, are
value types. Reference types hold variables that deal with objects and arrays. C# comes with
predefined reference types (object and string), as well as predefined value types (sbyte, short,
int, long, byte, ushort, uint, ulong, float, double, bool, char, and decimal). You can also define
your own value and reference types in your code. All value and reference types ultimately
derive from a base type called object. C# allows you to convert a value of one type into a
value of another type. You can work with both implicit conversions and explicit conversions.
Implicit conversions always succeed and don't lose any information. Explicit conversions
may cause you to lose data. You must write a cast operator into your code to make an explicit
conversion happen.
4
Variables
Variables can be defined as constants. Constants have values that cannot change
during the execution of your code. C# provides a built-in mechanism for defining and
handling events. If you write a class that performs a lengthy operation, you may want to
invoke an event when the operation is completed. Clients can subscribe to that event and
catch the event in their code, which enables them to be notified when you have completed
your lengthy operation. The event handling mechanism in C# uses delegates, which are
variables that reference a function.
Note An event handler is a procedure in your code that determines the actions to be
performed when an event occurs, such as the user clicking a button. If your class holds a set
of values, clients may want to access the values as if your class were an array. You can write
a piece of code called an indexer to enable your class to be accessed
as if it were an array.
Interfaces
C# supports interfaces, which are groups of properties, methods, and events that
specify a set of functionality. C# classes can implement interfaces, which tell users that the
class supports the set of functionality documented by the interface. You can develop
implementations of interfaces without interfering with any existing code, which minimizes
compatibility problems. Once an interface has been published, it cannot be changed, but it
can evolve through inheritance. C# classes can implement many interfaces, although the
classes can only inherit from a single base class.
Attributes
Attributes declare additional information about your class to the CLR. Attributes can
also be used to bind runtime information to a class, defining how it should act when used.
The possibilities are endless, which is why Microsoft includes many predefined attributes
within the .NET Framework.
5
Back End :-SQL Server
DATABASE
A database management, or DBMS, gives the user access to their data and helps them
transform the data into information. Such database management systems include dBase,
paradox, IMS, SQL Server and SQL Server. These systems allow users to create, update and
extract information from their database.
A database is a structured collection of data. Data refers to the characteristics of
people, things and events. SQL Server stores each data item in its own fields. In SQL
Server, the fields relating to a particular person, thing or event are bundled together to form a
single complete unit of data, called a record (it can also be referred to as raw or an
occurrence). Each record is made up of a number of fields. No two fields in a record can
have the same field name.
During an SQL Server Database design project, the analysis of your business needs
identifies all the fields or attributes of interest. If your business needs change over time, you
define any additional fields or change the definition of existing fields.
SQL Server Tables
SQL Server stores records relating to each other in a table. Different tables are
created for the various groups of information. Related tables are grouped together to form a
database.
Primary Key
Every table in SQL Server has a field or a combination of fields that uniquely
identifies each record in the table. The Unique identifier is called the Primary Key, or simply
the Key. The primary key provides the means to distinguish one record from all other in a
table. It allows the user and the database system to identify, locate and refer to one particular
record in the database.
Relational Database
Sometimes all the information of interest to a business operation can be stored in one
table. SQL Server makes it very easy to link the data in multiple tables. Matching an
employee to the department in which they work is one example. This is what makes SQL
Server a relational database management system, or RDBMS. It stores data in two or more
tables and enables you to define relationships between the table and enables you to define
relationships between the tables.
6
Foreign Key
When a field is one table matches the primary key of another field is referred to as a
foreign key. A foreign key is a field or a group of fields in one table whose values match
those of the primary key of another table.
A major purpose of a database system is to provide users with an abstract view of the
data. This system hides certain details of how the data is stored and maintained. Data
abstraction is divided into three levels.
Physical level: This is the lowest level of abstraction at which one describes how the data are
actually stored.
Conceptual Level: At this level of database abstraction all the attributed and what data are
actually stored is described and entries and relationship among them.
View level: This is the highest level of abstraction at which one describes only part of the
database.
Advantages of RDBMS
Redundancy can be avoided
Inconsistency can be eliminated
Data can be Shared
Standards can be enforced
Security restrictions can be applied
Integrity can be maintained
Conflicting requirements can be balanced
Data independence can be achieved.
Disadvantages of DBMS
7
FEATURES OF SQL SERVER (RDBMS)
SQL SERVER is one of the leading database management systems (DBMS) because
it is the only Database that meets the uncompromising requirements of today’s most
demanding information systems. From complex decision support systems (DSS) to the most
rigorous online transaction processing (OLTP) application, even application that require
simultaneous DSS and OLTP access to the same critical data, SQL Server leads the industry
in both performance and capabilitySQL SERVER is a truly portable, distributed, and open
DBMS that delivers unmatched performance, continuous operation and support for every
database.
The unrivaled portability and connectivity of the SQL SERVER DBMS enables all
the systems in the organization to be linked into a singular, integrated computing resource.
Portability
SQL SERVER is fully portable to more than 80 distinct hardware and operating
systems platforms, including UNIX, MSDOS, OS/2, Macintosh and dozens of proprietary
platforms. This portability gives complete freedom to choose the database server platform
that meets the system requirements.
SQL Server’s networking and distributed database capabilities to access data stored
on remote server with the same ease as if the information was stored on a single local
computer. A single SQL statement can access data at multiple sites. You can store data
where system requirements such as performance, security or availability dictate.
Unmatched PerformanceThe most advanced architecture in the industry allows the SQL
SERVER DBMS to deliver unmatched performance.
No I/O Bottlenecks
SQL Server’s fast commit groups commit and deferred write technologies
dramatically reduce disk I/O bottlenecks. While some database write whole data block to disk
at commit time, SQL Server commits transactions with at most sequential log file on disk at
commit time, On high throughput systems, one sequential writes typically group commit
multiple transactions. Data read by the transaction remains as shared memory so that other
transactions may access that data without reading it again from disk. Since fast commits
write all data necessary to the recovery to the log file, modified blocks are written back to the
database independently of the transaction commit, when written from memory to disk.
8
2. projectmanagement
For the development and implementation of windows based module several distinct
approaches are in practice occurs. Among them, a very popular one is the classical system
development life cycle model (SDLC) orthe waterfall model. The waterfall model has
following phase of its development:
9
Updated
M
RequirementV
IRequirements VerifyV
U
VerifyV
I
SpecificationR
VerifyV
M
DesignS
VerifyT
IImplementationD
DevelopmentM
TestT
Maintenances
P M
IntegrationI
TestD
Product
MaintenanceI
deliverable
10
This is also known as feasibility study. In this phase, the development team visits the
need for possible software automation in the given system. By the end of the feasibility study,
the team furnishes a document that holds the different specific recommendations for the
candidate system.
Code Generation
The design must be translated into a machine-readable form. The code generation step
performs this task. If design is performed in detailed manner, code generation can be
accomplished without much complication. Programming tools like Compilers, Interpreters,
and Debuggers are used to generate the code. Different high level programming languages
like C, C++, Pascal, Java, ASP.NET and VB.NET are used for coding. Here I have used
c# .NET for the implementation.
Software will definitely undergo change once it is delivered to the end user.
There are many reasons for the change. Change could happen because of some unexpected
input values into the system. In addition, the changes in the system could directly affect the
software operations. The software should be developed to accommodate changes that could
happen during the implementation period.
A plan is drawn up at the start of the project, should be used as the driver of the
project. The project planning consists of:
11
Management needs information. As software is intangible, this information can only
be provided as a document that describes the state of the software being developed. Without
this information, it is impossible to judge progress and cost estimates and schedules cannot be
updated.
Milestones:
Milestone is an end-point of the software process activity.
At each milestone there should be formal output, such as report, that can be
represented to the management.
Milestone report need not be large document; they are the short report of
achievements in software project activity.
Milestone represents the end of the distinct, logical stage in the project.
Deliverables:
Deliverable is a project report that is delivered to customer.
Deliverables are delivered to the customer at the end of the same major project
phase such as specification, design, etc.
Deliverables are usually milestones.
Milestones may be internal project results that are used by the project manager
to check progress but which are not delivered to the customer.
12
Pert Chart Representation:
2.2risk management
Project Risks
Project Risks threaten the project plan. That is, if project risks become real, it is likely
that project schedule will slip and that costs will increase.
Technical Risks
Technical risks threaten the quality and timeliness of the software to produce. If a
technical risk becomes a reality implementation may become difficult or impossible.
Technical risks identify potential design, implementation, interface, verification, and
maintenance problems.
13
Business Risks
Business risks threaten the visibility of the software to be built. Business risks often
jeopardize the project or the product. Candidates for top fivebusiness risks are,
Effectiveness
This is one of the major risks because it is not worthwhile if the project developed
does not serve for what it is developed. So Effectiveness (Usability Risk) is one of major risk
involved.
Efficiency
Efficiency is also major risk because the project developed should be efficient to the
functionality it provides. So we have to consider this threat also.
Confidentiality
Integrity
The application should also threat by Integrity Risk .The data related to the project
should be preserve qualities like consistency.
Compliance
Project is threat by this risk because the project should follow specific standards.
14
Reliability
To assist the project team in developing a strategy for dealing with risk. An effective
strategy must consider three issues:
Risk avoidance
Risk Monitoring
Risk Management
Risk Mitigating
A risk management strategy can be included in the software project plan or the risk
management steps can be organized into a separate Risk Mitigation, Monitoring and
Management Plan. The RMMM plan documents all performed as part of risk analysis and are
used by project manager as part of the overall project plan.
15
2.3Estimation
2.3.1 EFFORT ESTIMATON
Analysis
We complete this analysis after gathering all requirements about this topic and
preparing diagrams like Entity Relationship, Use case, Context, Data Flow within one
month
We had worked on creating designing first by on paper drawing and then make it on
system within few days and then I had done coding for it.
Form Designing
First we have designed splash form and other admin related forms then I have
designed reports that are related to all information of companies, replacement orders, and
validation of sold part in the system.
Testing
2.3.2cost analysis
There are mainly two types of costs.
1. Direct cost
2. Indirect cost
1. Direct cost:
In direct cost, cost of the software’s and toll are included. In our project we use Visual
Studio 2005 and SQL server 2005. The prices of all of this are shown below.
Microsoft Visual Studio 2008 – 1000$
SQL server 2005 – 400$
2. Indirect cost
In indirect cost, cost of man power is included for requirement analysis, project development
and training of the project given to the user.
For requirement analysis we spend 20 days of time in starting of project.
For development we spend 5 hours per day for 1 months.
And for training of the project we will provide 1 week of one trainer to the user.
So the cost of all this are also included in the project.
16
3. SYSTEM REQUIREMENT STUDY
Administrator is the person who is taking care of whole the organization system. The
admin is having rights to decide whether to allow the insertion, deletion, modification etc
performed on details of customers. The admin can also apply changes in rent as well as area
setting as per situations.
This software provides many facilities to admin like he/she can easily get information
of any customer or any staff details just put their and select IDs in the combo box. By just one
clicking the admin can get whole information about the pending money list and model no
wise, name wise, date wise report generation is also main task of the system.
Without Login into the system no one can be change or modify the database that is set
by the owner of the project.
Thus all the activities which are necessary for the proper functioning of system are
performed by this user called OWNER who had made this project.
17
3.2 HARDWARE AND SOFTWARE CONFIGURATION
Software required for development:
Intel i3 (Processor).
Memory Ram :4 Ram
10 MB Cache Memory
Hard disk : 500GB
Microsoft Compatible 101 or more Key Board
18
3.3 CONSTRAINTS
2. Parallel Operations
In this system updating database for proper management of any event is needed to be
carried out parallel. Whenever any user deletes his/her account, all data related to that user
will be deleted simultaneously.
4. Reliabilities Requirement
In this project the reliability requirements. There should be reliability of the database
and the data that are entered into the database. Even there is small error in the management of
events done can be wrong.
5. Performance Requirement
Here all the events being registered must be managed properly. It must be taken care
that no two events should be overlapped means multiple entries about the part or model
should not happen.
19
4. SYSTEM ANALYSIS
The initial analysis is made by knowing the user requirements. In analysis phase, we
have analyzed the user’s requirement such as:-
Deletion of the medicinewhen stoke is empty. It also keeps the data about medicine
which is sold , addition of the record of new medicine which are imported, printing and
calculation of the bill, generate reports, search by user choice etc. In this project we have also
analyzed that the product or software should not be very costly but its quality and interface must
be attractive. If any wrong operation is being performed then the software must invoke the
operator accordingly.
All these things are depend upon our system that what type of outputs of our
system or functions, we desired from the system is also responsible for defining the
above factors. So the overall structure of system that we want to implement will be
decided in analysis part of a system development by analyst.
Where search option is very useful feature to find particular medicines details quickly.
20
4.3 REQUIREMENT OF NEW SYSTEM
In past work system was fully manual. All type of transactions, accounts details were
done by man.
For saving of time and manpower there is a need for the system that performs the
entire task that done by a man who is working in industry. The new system that is more
secure than the manually working system.In this system there are many customers in the
number of hundreds. So, it is quite difficult to manage their requirement in account book.
So there is need of good computer and configuration which fulfill the requirement of
this windows application.
4.4FEASIBILITY STUDY
An important outcome of the preliminary investigation is the determination that the
system requested is feasible or not. There are three study aspects in the feasibility study
portion of the preliminary investigation.
Technical Feasibility:
Technical Feasibility deals with the availability of the required technology for
implementing the system means it examines whether the current technical resources or
technology is available in the organization or in the current market which is capable of
handling the user’s requirement. It includes these:
The system is opened by nature and can be easily expanded in near feature.
The proposed system has capacity to hold data required.
The use of reliable Microsoft Access with Server Design and Coding Standards
followed guarantees accuracy, reliability, ease of data access and data security.
Operational Feasibility:
Proposed project is beneficial only if it can be turned into information systems that
will meet the organization’s operating requirements. Operational Feasibility examines
whether the proposed system can fit in with existing operations and whether the right
information at the right time is provided to the users. It includes these:
The system is well supported by the service developers with technical guide and
tasking special interest in the development process.
The proposed system makes best efforts to satisfy the requirement of the user keeping
in mind certain constraint. Since the most trivial issued assume a major problematic
state later in the development cycle. Every possible aspect of Operational Feasibility
21
is checked.
The clear advantage of being core gives better advantage.
The services developers are always ready to test the functionality provided
system.
Behavioral Feasibility:
Which have special efforts to educate, sell train on new we have to consider the cost of
staffways.
Economical Feasibility:
It examines whether economically the system’s cost is effective. That is, whether
finance is available for implementing the proposed solution and whether the returns are
proportionate with the cost of the project. It includes these:
The cost of Hardware/Software for the application already exists.
The use of existing software developing new application.
Using it only increase the gain.
The cost if nothing were to change from the present system would not
necessarily increase but the net gain from the system being comparatively better.
22
4.6 Functions Of System
23
4.7 Data Modeling:
4.7.1E-R diagrams:
24
4.7.2 System Activity or Object interaction Diagram:
25
4.7.3 DATA DICTIONARY
In order to find the data elements required in the various documents, we work
backwards. In other words, we ask what data elements are required to meet the information
needs and find out the data elements required in the input documents and the required to be
maintained at the receiving office. The data elements in the output are also determined by the
specifications of information requirements.
Customer Master:
Item Master:
26
Purchase:
Sales:
Stock:
27
4.8 Functional and Behavioral Modeling:
4.8.1 Context Diagram:
28
4.8.2 Data Flow Diagram (level 0):
29
5. IMPLEMENTATION PLANNING AND DETAILS
5.1 IMPLEMENTATION ENVIRONMENT
30
5.2 PROGRAM/ MODULES SPECIFICATION
Flow Chart:-
5.3SECURITY FEATURES
GENERAL CONSIDERATION
The application is well build with all constraints and validations like no any character
can type to mobile no field and also same as no any digit can be typed into name and
text fields.
Also each focus lost event need to check whether the fields is empty or not
So ne worry about to having null data in the database.
31
5.4 Sample Coding
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;
namespace Medical_store
{
publicpartialclassitemStock : Form
{
public itemStock(Medical_store.Mdi_parent1 parent)
{
InitializeComponent();
this.MdiParent = parent;
}
privatevoid itemStock_Load(object sender, EventArgs e)
{
this.stockTableAdapter.Fill(this.medicalDataSet1.Stock);
}
privatevoid button1_Click(object sender, EventArgs e)
{
this.Close();
}
privatevoid dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
}
}
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;
namespace MEDICAL
32
DS.DS_ITEM.StockInMst_SelectDataTable IDT = new
MEDICAL.DS.DS_ITEM.StockInMst_SelectDataTable();
username = uname;
strmenu = strmnu;
InitializeComponent();
if (strmenu == "Add")
tabControl1.SelectedIndex = 0;
33
else if (strmenu == "Update")
tabControl1.SelectedIndex = 1;
tabControl1.SelectedIndex = 2;
tabControl1.SelectedIndex = 3;
CDT = CAdapter.SelectComapny();
cmbdompany.DataSource = CDT;
cmbdompany.DisplayMember = "Cname";
cmbdompany.ValueMember = "Cid";
cmbdompany.Text = "SELECT";
IDT = IAdapter.SelectItem();
comboBox1.DataSource = IDT;
comboBox1.DisplayMember = "I_name";
comboBox1.ValueMember = "I_ID";
comboBox1.Text = "SELECT";
34
double price=Convert.ToDouble(txtiqnt.Text) *
Convert.ToDouble(txtiprice.Text);
txtiname.Text = "";
txtidetail.Text = "";
txtiprice.Text = "";
txtiqnt.Text = "";
txtlocation.Text = "";
cmbdompany.Text = "SELECT";
if (tabControl1.SelectedIndex == 0)
CDT = CAdapter.SelectComapny();
cmbdompany.DataSource = CDT;
cmbdompany.DisplayMember = "Cname";
cmbdompany.ValueMember = "Cid";
cmbdompany.Text = "SELECT";
else if (tabControl1.SelectedIndex == 1)
// IDT = IAdapter.SelectItem();
SDT = SAdapter.SelectStock();
comboBox1.DataSource = SDT;
comboBox1.DisplayMember = "Iname";
35
comboBox1.ValueMember = "s_ID";
comboBox1.Text = "SELECT";
else if (tabControl1.SelectedIndex == 2)
// IDT = IAdapter.SelectItem();
SDT = SAdapter.SelectStock();
comboBox2.DataSource = SDT;
comboBox2.DisplayMember = "Iname";
comboBox2.ValueMember = "s_ID";
comboBox2.Text = "SELECT";
else if (tabControl1.SelectedIndex == 3)
IDT = IAdapter.SelectItem();
dataGridView1.DataSource = IDT;
//{
//IDT = IAdapter.SelectBYID(Convert.ToInt32(comboBox1.SelectedValue));
// txtcurentqnt.Text = IDT.Rows[0]["I_Quantity"].ToString();
//}
36
{
IDT = IAdapter.SelectByINmae(comboBox1.Text);
//
IAdapter.StockInMst_Updateitem(Convert.ToInt32(comboBox1.SelectedValue),
Convert.ToInt32(txtnewqnt.Text));
SAdapter.StockMst_ADD_Update_Quantity(Convert.ToInt32(txtnewqnt.Text),
tprice, comboBox1.Text);
txtnewqnt.Text = "";
txtcurentqnt.Text = "";
comboBox1.Text = "SELECT";
37
int del = SAdapter.Delete(Convert.ToInt32(comboBox2.SelectedValue));
SDT = SAdapter.SelectStock();
comboBox2.DataSource = SDT;
comboBox2.DisplayMember = "Iname";
comboBox2.ValueMember = "s_ID";
comboBox2.Text = "SELECT";
SDT = SAdapter.SelectBY_INAME(comboBox1.Text);
txtcurentqnt.Text = SDT.Rows[0]["totalQuantity"].ToString();
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;
namespace MEDICAL
38
{
strmenu = strmnu;
InitializeComponent();
txtame.Text = "";
txtadd.Text = "";
txtcity.Text = "";
txtmobile.Text = "";
txtsurname.Text = "";
txtame.Focus();
if (tabControl1.SelectedIndex == 0)
39
}
else if (tabControl1.SelectedIndex == 1)
CDT = CAdapter.SelectClient();
comboBox1.DataSource = CDT;
comboBox1.DisplayMember = "cu_name";
else if (tabControl1.SelectedIndex == 2)
CDT = CAdapter.SelectClient();
dataGridView1.DataSource = CDT;
CDT = CAdapter.SelectClient();
comboBox1.DataSource = CDT;
comboBox1.DisplayMember = "cu_name";
comboBox1.ValueMember = "cu_id";
comboBox1.Text = "SELECT";
40
if (strmenu == "Add")
tabControl1.SelectedIndex = 0;
tabControl1.SelectedIndex = 1;
tabControl1.SelectedIndex = 2;
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;
namespace MEDICAL
41
DS.DS_COMPANYTableAdapters.CompanyMst_SelectTableAdapter CAdapter = new
MEDICAL.DS.DS_COMPANYTableAdapters.CompanyMst_SelectTableAdapter();
strmenu = strmnu;
InitializeComponent();
txtname.Text = "";
txtpersn.Text = "";
txtadd.Text = "";
txtmobile.Text = "";
txtname.Focus();
if (tabControl1.SelectedIndex == 0)
else if (tabControl1.SelectedIndex == 1)
42
CDT = CAdapter.SelectComapny();
comboBox1.DataSource = CDT;
comboBox1.DisplayMember = "Cname";
comboBox1.ValueMember = "CID";
comboBox1.Text = "SELECT";
else if (tabControl1.SelectedIndex == 2)
CDT = CAdapter.SelectComapny();
dataGridView1.DataSource = CDT;
CDT = CAdapter.SelectComapny();
comboBox1.DataSource = CDT;
comboBox1.DisplayMember = "Cname";
comboBox1.ValueMember = "CID";
comboBox1.Text = "SELECT";
43
{
if (strmenu == "Add")
tabControl1.SelectedIndex = 0;
tabControl1.SelectedIndex = 1;
tabControl1.SelectedIndex = 2;
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;
namespace MEDICAL
44
public partial class Form1 : Form
public Form1()
InitializeComponent();
lbltime.Text = System.DateTime.Now.ToString();
lblday.Text = System.DateTime.Now.DayOfWeek.ToString();
try
Mdi.BackColor = System.Drawing.Color.DarkSeaGreen;
catch (Exception a)
45
}
if (txtname.Text == "")
else
if(UDT.Rows.Count>0)
username = txtname.Text;
txtname.Text = "";
txtpass.Text = "";
gplogin.Visible = false;
menulogout.Visible = true;
mENUToolStripMenuItem.Enabled = true;
sELLToolStripMenuItem.Enabled = true;
cLIENTSToolStripMenuItem.Enabled = true;
rEPORTSToolStripMenuItem.Enabled = true;
mANAGEUSERToolStripMenuItem.Enabled = true;
cOMPANYToolStripMenuItem.Enabled = true;
46
}
else
closeExistingForm();
gplogin.Visible = true;
menulogout.Visible = false;
mENUToolStripMenuItem.Enabled = false;
sELLToolStripMenuItem.Enabled = false;
cLIENTSToolStripMenuItem.Enabled = false;
rEPORTSToolStripMenuItem.Enabled = false;
mANAGEUSERToolStripMenuItem.Enabled = false;
cOMPANYToolStripMenuItem.Enabled = false;
lblname.Text = "";
closeExistingForm();
additem.MdiParent = this;
additem.Show();
47
}
try
this.ActiveMdiChild.Close();
catch (Exception)
Application.Exit();
closeExistingForm();
additem.MdiParent = this;
additem.Show();
closeExistingForm();
additem.MdiParent = this;
48
additem.Show();
closeExistingForm();
additem.MdiParent = this;
additem.Show();
closeExistingForm();
additem.MdiParent = this;
additem.Show();
lbltime.Text = System.DateTime.Now.ToString();
49
private void stockReportToolStripMenuItem_Click(object sender, EventArgs e)
closeExistingForm();
srpt.MdiParent = this;
srpt.Show();
closeExistingForm();
sellrpt.MdiParent = this;
sellrpt.Show();
closeExistingForm();
additem.MdiParent = this;
additem.Show();
closeExistingForm();
tsrpt.MdiParent = this;
50
tsrpt.Show();
closeExistingForm();
additem.MdiParent = this;
additem.Show();
closeExistingForm();
additem.MdiParent = this;
additem.Show();
closeExistingForm();
additem.MdiParent = this;
additem.Show();
closeExistingForm();
51
Form additem = new Client("View");
additem.MdiParent = this;
additem.Show();
closeExistingForm();
additem.MdiParent = this;
additem.Show();
closeExistingForm();
additem.MdiParent = this;
additem.Show();
closeExistingForm();
additem.MdiParent = this;
additem.Show();
52
closeExistingForm();
additem.MdiParent = this;
additem.Show();
closeExistingForm();
additem.MdiParent = this;
additem.Show();
ausing System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace MEDICAL
/// <summary>
/// </summary>
[STAThread]
53
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
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 MEDICAL
54
DS.DS_SALESTableAdapters.SALES_SELECTTableAdapter SAdapter = new
MEDICAL.DS.DS_SALESTableAdapters.SALES_SELECTTableAdapter();
public SELL()
InitializeComponent();
con.Open();
55
SqlDataReader reader = cmd.ExecuteReader();
while (reader.Read())
SCollection.Add(reader.GetString(0));
txtiname.AutoCompleteCustomSource = SCollection;
con.Close();
CDT = CAdapter.SelectClient();
comboBox1.DataSource = CDT;
comboBox1.DisplayMember = "cu_name";
comboBox1.ValueMember = "cu_id";
try
if (gvsales.Rows[e.RowIndex].Cells[4].Selected == true)
SAdapter.SALES_DELETE_by_name(namee);
// STADapter.DeleteById(Convert.ToInt32(m));
// BindGrid();
56
SDT = SAdapter.SelectBy_PNAME(txtpname.Text);
gpdispatch.Visible = true;
gvsales.AutoGenerateColumns = false;
gvsales.DataSource = SDT;
SUMDT = SUMAdapter.SelectTotla();
lblqnt.Text = SUMDT.Rows[0]["qnt"].ToString();
lbltprice.Text = SUMDT.Rows[0]["Tprice"].ToString();
catch (Exception )
{ }
57
private void txtiname_Leave(object sender, EventArgs e)
if (txtiname.Text != "")
label8.Text = txtiname.Text;
StockDT = StockAdapter.SelectBY_INAME(txtiname.Text);
IDT = IAdapter.SelectByINmae(txtiname.Text);
if (StockDT.Rows.Count > 0)
if (StockDT.Rows[0]["AvailableQuantity"].ToString() == "0")
else
SDT = SAdapter.SelectBY_NAME(txtiname.Text);
if (SDT.Rows.Count > 0)
SDT = SAdapter.SelectBY_NAME(txtiname.Text);
if (Convert.ToInt32(StockDT.Rows[0]
["AvailableQuantity"].ToString()) > exiqnt)
58
}
else
else
lblq.Text = StockDT.Rows[0]
["AvailableQuantity"].ToString();
lblp.Text = IDT.Rows[0]["I_Price"].ToString();
lbll.Text = IDT.Rows[0]["I_location"].ToString();
txtq.Text = "1";
SDT = SAdapter.SelectBy_PNAME(txtpname.Text);
gpdispatch.Visible = true;
gvsales.AutoGenerateColumns = false;
gvsales.DataSource = SDT;
SUMDT = SUMAdapter.SelectTotla();
lblqnt.Text = SUMDT.Rows[0]["qnt"].ToString();
lbltprice.Text = SUMDT.Rows[0]["Tprice"].ToString();
59
gpdispatch.Visible = true;
else
// txtiname.Text = "";
// txtiname.Focus();
txtpname.Text = comboBox1.Text;
60
}
if (txtq.Text != "")
StockDT = StockAdapter.SelectBY_INAME(label8.Text);
IDT = IAdapter.SelectByINmae(label8.Text);
if (StockDT.Rows.Count > 0)
if (StockDT.Rows[0]["AvailableQuantity"].ToString() == "0")
else
SDT = SAdapter.SelectBY_NAME(label8.Text);
if (SDT.Rows.Count > 0)
SDT = SAdapter.SelectBY_NAME(label8.Text);
61
int qntt = exiqnt + Convert.ToInt32(txtq.Text);
if (Convert.ToInt32(StockDT.Rows[0]
["AvailableQuantity"].ToString()) > qntt)
SDT = SAdapter.SelectBy_PNAME(txtpname.Text);
gpdispatch.Visible = true;
gvsales.AutoGenerateColumns = false;
gvsales.DataSource = SDT;
SUMDT = SUMAdapter.SelectTotla();
lblqnt.Text = SUMDT.Rows[0]["qnt"].ToString();
lbltprice.Text = SUMDT.Rows[0]["Tprice"].ToString();
else
62
}
if (gvsales.Rows.Count == 0)
else
SDT = SAdapter.SelectBy_PNAME(txtpname.Text);
StockAdapter.StockMst_SELL_Update_Quantity(Convert.ToInt32(SDT.Rows[i]
["Quantity"].ToString()), Convert.ToDouble(SDT.Rows[i]
["TPrice"].ToString()),SDT.Rows[i]["IName"].ToString());
gvsales.DataSource= null;
63
}
gpdispatch.Visible = false;
gpdispatch.Visible = false;
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 MEDICAL
64
//DS.DS_STOCK.StockMst_SelectDataTable SDT = new
DS.DS_STOCK.StockMst_SelectDataTable();
public SellReport()
InitializeComponent();
con.Open();
while (reader.Read())
SCollection.Add(reader.GetString(0));
65
}
txtiname.AutoCompleteCustomSource = SCollection;
con.Close();
con.Open();
while (readerr.Read())
SCollectionn.Add(readerr.GetString(0));
txtcname.AutoCompleteCustomSource = SCollectionn;
con.Close();
txtiname.Text = "";
SOotDT = SOutAdapter.Select_by_Clintname(txtcname.Text);
GVReports.DataSource = SOotDT;
txtcname.Text = "";
SOotDT = SOutAdapter.Select_by_Iname(txtiname.Text);
GVReports.DataSource = SOotDT;
66
}
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 MEDICAL
public StockReport()
InitializeComponent();
67
private void btncomsearch_Click(object sender, EventArgs e)
txtiname.Text = "";
//SDT = SAdapter.SelectBY_INAME(txtiname.Text);
IDT = IAdapter.Select_By_CNAME(txtcname.Text);
GVReports.DataSource = IDT;
txtcname.Text = "";
//SDT = SAdapter.SelectBY_INAME(txtiname.Text);
IDT = IAdapter.SelectByINmae(txtiname.Text);
GVReports.DataSource = IDT;
con.Open();
while (reader.Read())
SCollection.Add(reader.GetString(0));
txtiname.AutoCompleteCustomSource = SCollection;
68
con.Close();
con.Open();
while (readerr.Read())
SCollectionn.Add(readerr.GetString(0));
txtcname.AutoCompleteCustomSource = SCollectionn;
con.Close();
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 MEDICAL
69
DS.DS_STOCK.StockMst_SelectDataTable SDT = new
DS.DS_STOCK.StockMst_SelectDataTable();
public TotalStockReport()
InitializeComponent();
//SDT = SAdapter.SelectBY_INAME(txtiname.Text);
SDT = SAdapter.SelectBY_INAME(txtiname.Text);
GVReports.DataSource = SDT;
70
con.Open();
while (reader.Read())
SCollection.Add(reader.GetString(0));
txtiname.AutoCompleteCustomSource = SCollection;
con.Close();
SDT = SAdapter.SelectStock();
GVReports.DataSource = SDT;
//con.Open();
//while (readerr.Read())
//{
// SCollectionn.Add(readerr.GetString(0));
//}
//txtcname.AutoCompleteCustomSource = SCollectionn;
//con.Close();
using System;
71
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MEDICAL
username = uname;
strmenu = strmnu;
InitializeComponent();
72
}
if (txtname.Text == "")
else
txtpass.Text = "";
txtname.Text = "";
txtcpass.Text = "";
73
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
if (tabControl1.SelectedIndex == 0)
else if (tabControl1.SelectedIndex == 1)
UDT = UAdapter.SelectUser();
comboBox1.DataSource = UDT;
comboBox1.DisplayMember = "U_Name";
comboBox1.ValueMember = "U_ID";
comboBox1.Text = "SELECT";
else if (tabControl1.SelectedIndex == 2)
UDT = UAdapter.SelectUser();
dataGridView1.DataSource = UDT;
else if (tabControl1.SelectedIndex == 3)
74
if (comboBox1.Text == username.ToString())
else
UDT = UAdapter.SelectUser();
comboBox1.DataSource = UDT;
comboBox1.DisplayMember = "U_Name";
comboBox1.ValueMember = "U_ID";
comboBox1.Text = "SELECT";
if (textBox1.Text == "")
else
UAdapter.UserMst_Update_password(username.ToString(), textBox1.Text);
75
txtcpass.Text = "";
txtpass.Text = "";
if (strmenu == "Add")
tabControl1.SelectedIndex = 0;
tabControl1.SelectedIndex = 1;
tabControl1.SelectedIndex = 2;
tabControl1.SelectedIndex = 3;
76
}
6. 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.
Need of Testing
A Successful test is one that finds an undiscovered error. If the testing is conducted
successfully, it will uncover errors in the software.
Testing is conducted provide a good indication of the software reliability and software
quality. Testing cannot show the absent of errors and defects, it can show only that software
errors and defects are present.
With the project nearing completion, we have taken up the activity of testing the
individuals’ forms and making sure that the interaction among the various forms is smooth
and without any glitches. Before actually beginning to test a few things should be born in
mind. Among others these include:
77
6.2 TESTING STRATEGY
1) SYSTEM TEST
The System tests will focus on the behavior of the system. User scenarios will be
executed against the system as well as screen mapping and error message testing. Overall, the
system tests will test the integrated system and verify that it meets the requirements defined
in the requirements document
2) PERFORMANCE TEST
Performance test will be conducted to ensure that the system’s response times meet
the user expectation and do not exceed the specified performance criteria. During these tests,
response times will be measured under heavy stress and/or volume.
3) SECURITY TEST
Security tests will determine how secure the system is. The tests will verify that
unauthorized user access to confidential data is prevented.
4) AUTOMATED TEST
A suite of automated tests will be developed to test the basic functionality of the
system and perform regression testing on areas of the systems that previously had
critical/major defects. The tool will also assist us by executing user scenarios thereby
emulating several users.
5) RECOVERY TEST
78
Recovery tests will force the system to fail in a various ways and verify the
recovery is properly performed. It is vitally important that all payroll data is recovered after a
system failure & no corruption of the data occurred.
79
6) DOCUMENTATION TEST
Tests will be conducted to check the accuracy of the user documentation. These
tests will ensure that no features are missing, and the contents can be easily understood.
Once the hotel management system is ready for implementation, the Payroll
department will perform User Acceptance Testing. The purpose of these tests is to confirm
that the system is developed according to the specified user requirements and is ready for
operational use.
BLACK-BOX TESTING
In using this strategy, the tester views the program as a black – box, tester doesn’t see
the code of the program: Equivalence partitioning, Boundary – value analysis, Error
guessing.
WHITE-BOX TESTING
In using this strategy, the tester examines the internal structure of the program:
Statement coverage, Decision coverage, condition coverage, Decision/Conditional
coverage, Multiple – condition coverage.
GRAY-BOX TESTING
In using this strategy Black box testing can be combine with knowledge of database
validation, such as SQL for database query and adding/loading data sets to confirm
functions, as well as query the database to confirm expected result.
TEST SCRIPT
It is type of test file. It is a set of instructions run automatically by a software or
hardware test tool.
80
7. SCREEN SHOTS AND USER MANUAL
1. Login Form:
2. Mdi Parent:
81
3. Item Master:
82
4. Sales Bill:
83
5. Purchase Bill:
84
6. Item Stoke:
85
8. Limitations and Future Enhancement
Limitation:
There are many kind of advantages for application but some amounts of limitation are
available in this system.
These certain limitation is following here :
SQL server is must be requiredin the software
Itcan’t be used big medical Firms, it only applicable for small Units.
Future expansion:
In next version master can change rate & type of Medicines company& rate.
Create a data base in XML so system can be more flexible for various
Operating Systems.
86
10. Conclusion:
After the process system that we have made we have to come to the following conclusion.
This process system is more easy and reliable to use then manual system.
There is a security system with password in the system that the manual system
never had and there was theft of the data being stolen.
There are difference forms for every record, there necessary to company to have
maintained of data.
Finally we have to come to the conclusion that whatever the medical store
requirements is present in this software.
87
Reference:-
www.projectguidance.com
http://e-library.net/
www.sourcecodeonline.com
www.developers.net
www.googel.com
www.wikipedia.com
www.medicalshop.com
88