Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

SOURCE CODE(main)

import mysql.connector as sql


conn=sql.connect(host="localhost",user="root",p
asswd="manager",database="old")
if conn.is_connected():
print('')

c1=conn.cursor()
c1.execute('use old')
print("WELCOME TO GRAND CLOTH STORE MANAGEMENT
SYSTEM")
print(' ')
from time import gmtime,strftime
a=strftime("%a,%d%b%y",gmtime())
print(a)
print(' ')
print("1.login")
print("2.To create account")
print("")
print('')
choice=int(input("enter your choice:"))

1
print(' ')
if choice==1:

a=int(input("enter user_id:"))
c1.execute("select passwd from login where
user_id = "+str(a)+";")
data=c1.fetchall()
data=data[0]
data=list(data)
data=data[0]
data=str(data)
print(' ')
print(' ')
b=int(input("enter passwd:"))
conn.cursor()
conn.commit()
if choice==2:
print('to create your account please enter
your user id and password')
c1=conn.cursor()
#c1=conn.cursor("('create table
login(user_id varchar(100) primary key,passwd
varchar(100),name varchar(100))')

2
v_user_id=int(input("choose your user id
(in integer):"))
print('')
v_passwd=int(input("create your password
(in integer):"))
print('')
v_name=input("your full name:")
print('')
c1=conn.cursor()
update="insert into login values("+
str(v_user_id) +","+ str(v_passwd) +",'"+
v_name +"')"
c1.execute(update)
conn.commit()
print("account created")
print("if shopping is done press 1.")
print("if you like to file any marketing
problem press 2.")
print("if no shopping is done press 3.")
choice=int(input("enter your choice="))
if choice==1:
v_customer_name=input("enter your name:")
v_gender=input("enter gender:")
v_phone_no=int(input("enter your phone
no:"))

3
v_items=input("enter item name:")
v_qty=int(input("enter quantity:"))
v_payment=int(input("make payment:"))
v_SQL_INSERT="insert into cloth
values('"+v_customer_name+"','"+v_gender+"',"+s
tr(v_phone_no)+",'"+v_items+"',"+str(v_qty)
+","+str(v_payment)+")"
c1.execute(v_SQL_INSERT)
print("THANK YOU...For your visit.")
if choice==2:
c1.execute('USE old')
v_rate_issue=int(input("rate your
difficultes out of 10="))
v_write_problem=input("write your
problem:")
v_SQL_INSERT="insert into sys
values("+str(v_rate_issue)
+",'"+v_write_problem+"')"
c1.execute(v_SQL_INSERT)
print("Your problem will be
rectified....thank you.")
if choice==3:
c1.execute('use old')
v_comment=input("comment about store here
please:")

4
v_SQL_insert="insert into comment
values('"+v_comment+"')"
c1.execute(v_SQL_insert)
print("THANK YOU FOR YOUR VISIT ....WISH
YOU BEST.")
conn.commit()

SOURCE CODE(Function calling)


1.
import mysql.connector as sql
conn=sql.connect(host="localhost",user="root",p
asswd="manager",database="old")
if conn.is_connected():
print('successfully connected')
c1=conn.cursor()
c1.execute('create table comment(comment
varchar(200))')
2.
import mysql.connector as sql
conn=sql.connect(host="localhost",user="root",p
asswd="manager",database="old")
if conn.is_connected():
print('successfully connected')
c1=conn.cursor()

5
c1.execute('create table problem(rate_issue
int(50),write_problem varchar(600))')
3.
import mysql.connector as sql
conn=sql.connect(host="localhost",user="root",p
asswd="manager",database="old")
if conn.is_connected():
print('successfully connected')
c1=conn.cursor()
c1.execute('create table login(name
varchar(50),user_id varchar(30)primary
key,passwd varchar(20))')
4.
import mysql.connector as sql
conn=sql.connect(host="localhost",user="root",p
asswd="manager",database="old")
if conn.is_connected():
print('successfully connected')
c1=conn.cursor()
c1.execute('create table old( v_customer_name
varchar(40),gender varchar(20),v_phone_no
int(50),v_items varchar(100),v_qty
int(20),v_payment int(30)')

6
OUTPUTS:--
WELCOME TO GRAND CLOTH STORE MANAGEMENT SYSTEM
1.login
2.To create account
enter your choice:2
to create your account please enter your user
id and password
choose your user id (in integer):6076
create your password (in integer):6076
your full name:abhishek
account created
if shopping is done press 1.
if you like to file any marketing problem press
2.
if no shopping is done press 3.
enter your choice=

WELCOME TO GRAND CLOTH STORE MANAGEMENT SYSTEM


1.login
2.To create account
enter your choice:1
enter user_id:6076

7
enter passwd:6076
if shopping is done press 1.
if you like to file any marketing problem press
2.
if no shopping is done press 3.
enter your choice=1
enter your name:abhishek
enter gender:male
enter your phone no:9784625398
enter item name:jeans
enter quantity:2
make payment:5000
THANK YOU...For your visit.

8
HARDWARE AND SOFTWARE REQUIREMENTS

I.OPERATING SYSTEM : WINDOWS 7 AND ABOVE

II. PROCESSOR : PENTIUM(ANY) OR AMD

ATHALON(3800+- 4200+ DUALCORE)

III. MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM 0R MSI

K9MM-V VIAK8M800+8237R PLUS

CHIPSET FOR AMD ATHALON

IV. RAM : 512MB+

V. Hard disk : SATA 40 GB OR ABOVE

VI. CD/DVD r/w multi drive combo: (If back up required)

VII. FLOPPY DRIVE 1.44 MB : (If Backup required)

VIII. MONITOR 14.1 or 15 -17 inch

IX. Key board and mouse

X. Printer : (if print is required – [Hard copy])

SOFTWARE REQUIREMENTS:

I. Windows OS
II. Python

9
BIBLIOGRAPHY

1. Computer science With Python - Class XI By : SumitaArora


2.A Project Report On Blood Bank Management System (BBMS)
By : Praveen M Jigajinni
3. Website: https://www.w3resource.com***

10

You might also like