Pharmacy Management System/Project in C++ with MySQL - mkncprojects

Breaking

Recent Posts

BANNER 728X90

Thursday, 5 July 2018

Pharmacy Management System/Project in C++ with MySQL

Pharmacy Management System/Project in C++ with MySQL

This C++ program is a pharmacy management system can store the medicine information and create purchase and generate total amount of purchase.
Program Detail:
In the beginning of the program

Global variables used in Pharmacy Management System in C++ with MySQL

  • qstate represent the state of the query. If 0 is successful 1 is failed.
  • conn is the mysql connection variable.
  • row is for getting the current row of the database.
  • res is for getting all the values form the database.
Pharmacy Management System in C++ with MySQL
Free Download Pharmacy Management System in C++ with MySQL

Class db_response

  • This class contains connection of the database.
  • mysql_init is the initializer of mysql_real_connect
  • mysql_real_connect connects to the database. (MySql server should open while connecting)
  • the if statement shows the successful or failed connection.
Pharmacy Management System in C++ with MySQL
Download Pharmacy Management System in C++ with MySQL

Function main Pharmacy Management System in C++ with MySQL

  • Here firstly the clear screen command then the title command and the color command.
  • db_response::ConnectionFunction() is create the connection to the database.
  • The program features
    • Buy Medicine
    • Show Item List
    • Find Item From List
    • Add Item in Stock
    • Update Stock Item
    • Delete Stock Item
Pharmacy Management System in C++ with MySQL
  • The switch case is used for switching between this functions
    • BuyMedicine()
    • ShowItemList()
    • FindItemFromList()
    • AddIteminStock()
    • UpdateStockItem()
    • DeleteStockItem()
Pharmacy Management System in C++ with MySQL

Function BuyMedicine ()

  • This function is for the customer in Pharmacy Management System
  • If the customer wants to buy medicine the seller can easily make a list of medicine and create a total bill of the medicines.
  • Here all the medicine in the list will showing in the console
  • Seller can choose medicines more than ones
  • Simple “Select” query get all the medicine from the list
  • Then after validation of ids the total number of medicine will decrease after all purchase
  • And update the database
  • As well as show the total amount of purchased medicine
Pharmacy Management System in C++ with MySQL

Function ShowItemList ()

  • Showing all the items in the database in Pharmacy Management System
  • “Select” query will get all the data from the database
  • And display in the console
Pharmacy Management System in C++ with MySQL

Function FindItemFromList ()

  • User can find item from the list in Pharmacy Management System
  • Only with few characters of the name of the item the program can find all the similar product
  • And display all the information in the console
Btech/MCA Project Free Pharmacy Management System in C++ with MySQL

Function AddIteminStock ()

  • User can add new medicine with this function
  • “Insert” query is used for add item in the database
  • User can fill all the information of the medicine
  • Then the information’s are added in the database
Pharmacy Management System in C++ with MySQL

Function UpdateStockItem ()

  • If the user wants to update any information of the item in the list then this is the function
  • “Update” query is used to update the database information.
  • User can keep the old data in the database by typing simple keyword “xN”
  • Then the database will update the information
  • It can validate the given number and show proper message in the console

Function DeleteStockItem ()

  • User can delete any item from the database
  • “Delete” query is used to delete information
  • User simply type the id of the item and delete the item from the database with a message
  • It can validate the given number and show proper message in the console
Pharmacy Management System in C++ with MySQL

Database and Table Name used in Pharmacy Management System

Table: medicine_tb
Database: cpp_pharmacymanagementsystem

Usage

XAMPP Server, MySql Headers, MySql Libs
Pharmacy Management System in C++ with MySQLDownload Project Source code Free Pharmacy Management System in C++ with MySQL



No comments:

Post a Comment