Name Of the Project : Hotel Front Office Management System
Author Name : Shome Nath Bhawani
City : Jamshedpur
Written in : Python Binary File
import pickle
import os
def create():
rec=[]
with open("xyz.dat", "wb") as fp:
chkid=int(input("Check In ID"))
name=input("Customer Name")
age=int(input("Enter Age"))
add=input("Enter Address")
city=input("Enter City")
pin=int(input("Enter Pincode"))
country=input("Enter Country Name")
mobile=input("Enter Mobile Number")
idtype=input("Enter ID Type [Aadhar/PAN/Others]")
idnum=input("Enter ID Number")
rnum=input("Enter Room Number")
din=input("Enter Check in Date")
tin=input("Enter Check in Time")
comfrom=input("Enter Coming From")
pvisit=input("Purpose of Visit")
prof=input("Enter Profession")
nmemp=input("Name of the Employer")
nday=int(input("Number of Days Stay"))
nadu=int(input("Number of Adults"))
nchl=int(input("Number of Childrens"))
rbill=int(input("Enter Total Room Bill"))
obill=int(input("Enter Other Bills"))
ptype=input("Enter Payment Type")
amtpaid=int(input("Enter Amount paid"))
bal=int(input("Balance Amount"))
dcout=input("Enter Check out Date")
tcout=input("Enter Check out Time")
gto=input("Enter Going to")
rec=[chkid, name, age, add, city, pin, country, mobile, idtype, idnum, rnum, din, tin, comfrom, pvisit, prof, nmemp, nday, nadu, nchl, rbill, obill, ptype, amtpaid, bal, dcout, tcout, gto]
pickle.dump(rec,fp)
fp.close()
menu()
def append():
rec=[]
with open("xyz.dat", "ab") as fp:
chkid=int(input("Check In ID"))
name=input("Customer Name")
age=int(input("Enter Age"))
add=input("Enter Address")
city=input("Enter City")
pin=int(input("Enter Pincode"))
country=input("Enter Country Name")
mobile=input("Enter Mobile Number")
idtype=input("Enter ID Type [Aadhar/PAN/Others]")
idnum=input("Enter ID Number")
rnum=input("Enter Room Number")
din=input("Enter Check in Date")
tin=input("Enter Check in Time")
comfrom=input("Enter Coming From")
pvisit=input("Purpose of Visit")
prof=input("Enter Profession")
nmemp=input("Name of the Employer")
nday=int(input("Number of Days Stay"))
nadu=int(input("Number of Adults"))
nchl=int(input("Number of Childrens"))
rbill=int(input("Enter Total Room Bill"))
obill=int(input("Enter Other Bills"))
ptype=input("Enter Payment Type")
amtpaid=int(input("Enter Amount paid"))
bal=int(input("Balance Amount"))
dcout=input("Enter Check out Date")
tcout=input("Enter Check out Time")
gto=input("Enter Going to")
rec=[chkid, name, age, add, city, pin, country, mobile, idtype, idnum, rnum, din, tin, comfrom, pvisit, prof, nmemp, nday, nadu, nchl, rbill, obill, ptype, amtpaid, bal, dcout, tcout, gto]
pickle.dump(rec,fp)
fp.close()
menu()
def dispall():
rec=[]
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
print("Check In ID : ",rec[0])
print("Customer Name : ",rec[1])
print("Custemer Age : ",rec[2])
print("Residential Address : ",rec[3])
print("City :",rec[4])
print("Pincode : ",rec[5])
print("Country : ",rec[6])
print("Mobile Number : ",rec[7])
print("ID Type : ",rec[8])
print("ID Number : ",rec[9])
print("Room Number : ",rec[10])
print("Check in Date : ",rec[11])
print("Check in Time : ",rec[12])
print("Coming From : ",rec[13])
print("Purpose of Visit : ",rec[14])
print("Profession : ",rec[15])
print("Name of the Employer : ",rec[16])
print("Number of Days Stayed : ",rec[17])
print("Number of Adults : ",rec[18])
print("Number of Childrens : ",rec[19])
print("Total Room Bill : ",rec[20])
print("Other Bills : ",rec[21])
print("Payment Type : ",rec[22])
print("Amount Paid : ",rec[23])
print("Balance Amount : ",rec[24])
print("Check Out Date : ",rec[25])
print("Check Out Time : ",rec[26])
print("Going To : ",rec[27])
print("--------------------------------------------------------------------")
except EOFError:
fp.close()
menu()
def scheckinid():
rec=[]
scadm=int(input("Enter the Check in ID to be searched"))
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if scadm==rec[0]:
print("Check In ID : ",rec[0])
print("Customer Name : ",rec[1])
print("Custemer Age : ",rec[2])
print("Residential Address : ",rec[3])
print("City :",rec[4])
print("Pincode : ",rec[5])
print("Country : ",rec[6])
print("Mobile Number : ",rec[7])
print("ID Type : ",rec[8])
print("ID Number : ",rec[9])
print("Room Number : ",rec[10])
print("Check in Date : ",rec[11])
print("Check in Time : ",rec[12])
print("Coming From : ",rec[13])
print("Purpose of Visit : ",rec[14])
print("Profession : ",rec[15])
print("Name of the Employer : ",rec[16])
print("Number of Days Stayed : ",rec[17])
print("Number of Adults : ",rec[18])
print("Number of Childrens : ",rec[19])
print("Total Room Bill : ",rec[20])
print("Other Bills : ",rec[21])
print("Payment Type : ",rec[22])
print("Amount Paid : ",rec[23])
print("Balance Amount : ",rec[24])
print("Check Out Date : ",rec[25])
print("Check Out Time : ",rec[26])
print("Going To : ",rec[27])
except EOFError:
fp.close()
menu()
def searchname():
rec=[]
sname=input("Enter the Name to be searched")
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if sname==rec[1]:
print("Check In ID : ",rec[0])
print("Customer Name : ",rec[1])
print("Custemer Age : ",rec[2])
print("Residential Address : ",rec[3])
print("City :",rec[4])
print("Pincode : ",rec[5])
print("Country : ",rec[6])
print("Mobile Number : ",rec[7])
print("ID Type : ",rec[8])
print("ID Number : ",rec[9])
print("Room Number : ",rec[10])
print("Check in Date : ",rec[11])
print("Check in Time : ",rec[12])
print("Coming From : ",rec[13])
print("Purpose of Visit : ",rec[14])
print("Profession : ",rec[15])
print("Name of the Employer : ",rec[16])
print("Number of Days Stayed : ",rec[17])
print("Number of Adults : ",rec[18])
print("Number of Childrens : ",rec[19])
print("Total Room Bill : ",rec[20])
print("Other Bills : ",rec[21])
print("Payment Type : ",rec[22])
print("Amount Paid : ",rec[23])
print("Balance Amount : ",rec[24])
print("Check Out Date : ",rec[25])
print("Check Out Time : ",rec[26])
print("Going To : ",rec[27])
print("--------------------------------------------------")
except EOFError:
fp.close()
menu()
def searchcity():
rec=[]
scity=input("Enter the City to be searched")
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if scity==rec[4]:
print("Check In ID : ",rec[0])
print("Customer Name : ",rec[1])
print("Custemer Age : ",rec[2])
print("Residential Address : ",rec[3])
print("City :",rec[4])
print("Pincode : ",rec[5])
print("Country : ",rec[6])
print("Mobile Number : ",rec[7])
print("ID Type : ",rec[8])
print("ID Number : ",rec[9])
print("Room Number : ",rec[10])
print("Check in Date : ",rec[11])
print("Check in Time : ",rec[12])
print("Coming From : ",rec[13])
print("Purpose of Visit : ",rec[14])
print("Profession : ",rec[15])
print("Name of the Employer : ",rec[16])
print("Number of Days Stayed : ",rec[17])
print("Number of Adults : ",rec[18])
print("Number of Childrens : ",rec[19])
print("Total Room Bill : ",rec[20])
print("Other Bills : ",rec[21])
print("Payment Type : ",rec[22])
print("Amount Paid : ",rec[23])
print("Balance Amount : ",rec[24])
print("Check Out Date : ",rec[25])
print("Check Out Time : ",rec[26])
print("Going To : ",rec[27])
print("--------------------------------------------------")
except EOFError:
fp.close()
menu()
def searchcountry():
rec=[]
scountry=input("Enter the Country Name to be searched")
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if scountry==rec[6]:
print("Check In ID : ",rec[0])
print("Customer Name : ",rec[1])
print("Custemer Age : ",rec[2])
print("Residential Address : ",rec[3])
print("City :",rec[4])
print("Pincode : ",rec[5])
print("Country : ",rec[6])
print("Mobile Number : ",rec[7])
print("ID Type : ",rec[8])
print("ID Number : ",rec[9])
print("Room Number : ",rec[10])
print("Check in Date : ",rec[11])
print("Check in Time : ",rec[12])
print("Coming From : ",rec[13])
print("Purpose of Visit : ",rec[14])
print("Profession : ",rec[15])
print("Name of the Employer : ",rec[16])
print("Number of Days Stayed : ",rec[17])
print("Number of Adults : ",rec[18])
print("Number of Childrens : ",rec[19])
print("Total Room Bill : ",rec[20])
print("Other Bills : ",rec[21])
print("Payment Type : ",rec[22])
print("Amount Paid : ",rec[23])
print("Balance Amount : ",rec[24])
print("Check Out Date : ",rec[25])
print("Check Out Time : ",rec[26])
print("Going To : ",rec[27])
print("--------------------------------------------------")
except EOFError:
fp.close()
menu()
def searchmobile():
rec=[]
smobile=input("Enter the Mobile Number to be searched")
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if smobile==rec[7]:
print("Check In ID : ",rec[0])
print("Customer Name : ",rec[1])
print("Custemer Age : ",rec[2])
print("Residential Address : ",rec[3])
print("City :",rec[4])
print("Pincode : ",rec[5])
print("Country : ",rec[6])
print("Mobile Number : ",rec[7])
print("ID Type : ",rec[8])
print("ID Number : ",rec[9])
print("Room Number : ",rec[10])
print("Check in Date : ",rec[11])
print("Check in Time : ",rec[12])
print("Coming From : ",rec[13])
print("Purpose of Visit : ",rec[14])
print("Profession : ",rec[15])
print("Name of the Employer : ",rec[16])
print("Number of Days Stayed : ",rec[17])
print("Number of Adults : ",rec[18])
print("Number of Childrens : ",rec[19])
print("Total Room Bill : ",rec[20])
print("Other Bills : ",rec[21])
print("Payment Type : ",rec[22])
print("Amount Paid : ",rec[23])
print("Balance Amount : ",rec[24])
print("Check Out Date : ",rec[25])
print("Check Out Time : ",rec[26])
print("Going To : ",rec[27])
except EOFError:
fp.close()
menu()
def searchroom():
rec=[]
sroom=input("Enter the Room Number to be searched")
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if sroom==rec[10]:
print("Check In ID : ",rec[0])
print("Customer Name : ",rec[1])
print("Custemer Age : ",rec[2])
print("Residential Address : ",rec[3])
print("City :",rec[4])
print("Pincode : ",rec[5])
print("Country : ",rec[6])
print("Mobile Number : ",rec[7])
print("ID Type : ",rec[8])
print("ID Number : ",rec[9])
print("Room Number : ",rec[10])
print("Check in Date : ",rec[11])
print("Check in Time : ",rec[12])
print("Coming From : ",rec[13])
print("Purpose of Visit : ",rec[14])
print("Profession : ",rec[15])
print("Name of the Employer : ",rec[16])
print("Number of Days Stayed : ",rec[17])
print("Number of Adults : ",rec[18])
print("Number of Childrens : ",rec[19])
print("Total Room Bill : ",rec[20])
print("Other Bills : ",rec[21])
print("Payment Type : ",rec[22])
print("Amount Paid : ",rec[23])
print("Balance Amount : ",rec[24])
print("Check Out Date : ",rec[25])
print("Check Out Time : ",rec[26])
print("Going To : ",rec[27])
print("--------------------------------------------------")
except EOFError:
fp.close()
menu()
def searchcheckin():
rec=[]
schkin=input("Enter the Check In date to be searched")
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if schkin==rec[11]:
print("Check In ID : ",rec[0])
print("Customer Name : ",rec[1])
print("Custemer Age : ",rec[2])
print("Residential Address : ",rec[3])
print("City :",rec[4])
print("Pincode : ",rec[5])
print("Country : ",rec[6])
print("Mobile Number : ",rec[7])
print("ID Type : ",rec[8])
print("ID Number : ",rec[9])
print("Room Number : ",rec[10])
print("Check in Date : ",rec[11])
print("Check in Time : ",rec[12])
print("Coming From : ",rec[13])
print("Purpose of Visit : ",rec[14])
print("Profession : ",rec[15])
print("Name of the Employer : ",rec[16])
print("Number of Days Stayed : ",rec[17])
print("Number of Adults : ",rec[18])
print("Number of Childrens : ",rec[19])
print("Total Room Bill : ",rec[20])
print("Other Bills : ",rec[21])
print("Payment Type : ",rec[22])
print("Amount Paid : ",rec[23])
print("Balance Amount : ",rec[24])
print("Check Out Date : ",rec[25])
print("Check Out Time : ",rec[26])
print("Going To : ",rec[27])
print("--------------------------------------------------")
except EOFError:
fp.close()
menu()
def searchcheckout():
rec=[]
sckhout=input("Enter the Check Out to be searched")
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if sckhout==rec[25]:
print("Check In ID : ",rec[0])
print("Customer Name : ",rec[1])
print("Custemer Age : ",rec[2])
print("Residential Address : ",rec[3])
print("City :",rec[4])
print("Pincode : ",rec[5])
print("Country : ",rec[6])
print("Mobile Number : ",rec[7])
print("ID Type : ",rec[8])
print("ID Number : ",rec[9])
print("Room Number : ",rec[10])
print("Check in Date : ",rec[11])
print("Check in Time : ",rec[12])
print("Coming From : ",rec[13])
print("Purpose of Visit : ",rec[14])
print("Profession : ",rec[15])
print("Name of the Employer : ",rec[16])
print("Number of Days Stayed : ",rec[17])
print("Number of Adults : ",rec[18])
print("Number of Childrens : ",rec[19])
print("Total Room Bill : ",rec[20])
print("Other Bills : ",rec[21])
print("Payment Type : ",rec[22])
print("Amount Paid : ",rec[23])
print("Balance Amount : ",rec[24])
print("Check Out Date : ",rec[25])
print("Check Out Time : ",rec[26])
print("Going To : ",rec[27])
print("--------------------------------------------------")
except EOFError:
fp.close()
menu()
def modifyreg():
rec=[]
schkin=int(input("Enter the Registration Number to be modified"))
with open("xyz.dat", "rb") as fp:
fs=open("temp.dat","wb")
try:
while True:
line = pickle.load(fp)
rec=line
if schkin==rec[0]:
ch1=input("Do you want to change address [Y/N]")
if ch1=="Y" or ch1=="Yes":
print("Old Name of the Customer:",rec[1])
rec[1]=input("New Name of the Customer:")
print("Old Address : ",rec[3])
rec[3]=input("New Address :")
print("Old City : ",rec[4])
rec[4]=input("New City :")
print("Old Pincode : ",rec[5])
rec[5]=input("New Pincode :")
print("Old Country Name : ",rec[6])
rec[6]=input("New Country Name :")
ch2=input("Do you want to change Mobile Number [Y/N]")
if ch2=="Y" or ch2=="Yes":
print("Old Mobile Number : ",rec[7])
rec[7]=input("New Mobile Number :")
ch3=input("Do you want to change Days stayed [Y/N]")
if ch3=="Y" or ch3=="Yes":
print("Days Stayed : ",rec[17])
rec[17]=int(input("Days Stayed :"))
pickle.dump(rec,fs)
except EOFError:
fp.close()
fs.close()
os.remove("xyz.dat")
os.rename("temp.dat","xyz.dat")
menu()
def delreg():
rec=[]
schkin=int(input("Enter the Registration Number to be deleted"))
with open("xyz.dat", "rb") as fp:
fs=open("temp.dat","wb")
try:
while True:
line = pickle.load(fp)
rec=line
if schkin!=rec[0]:
pickle.dump(rec,fs)
except EOFError:
fp.close()
fs.close()
os.remove("xyz.dat")
os.rename("temp.dat","xyz.dat")
menu()
def menu():
print("\t\tHotel Front Office Management System")
print("\t1. Create a Table")
print("\t2. Add a Record")
print("\t3. Display all Records")
print("\t4. Search a Record on Check in ID ")
print("\t5. Search a Record on Name ")
print("\t6. Search Records on City ")
print("\t7. Search Records on Country ")
print("\t8. Search Records on Mobile ")
print("\t9. Search a Record on Room Number ")
print("\t10. Search a Record on Check in date ")
print("\t11. Search Records on Check out date ")
print("\t12. Modify the Information of the Student")
print("\t13. Remove record from Table")
print("\t14. Exit ")
ch=int(input("Enter choice"))
if(ch==1):
create()
if(ch==2):
append()
if(ch==3):
dispall()
if(ch==4):
scheckinid()
if(ch==5):
searchname()
if(ch==6):
searchcity()
if(ch==7):
searchcountry()
if(ch==8):
searchmobile()
if(ch==9):
searchroom()
if(ch==10):
searchcheckin()
if(ch==11):
searchcheckout()
if(ch==12):
modifyreg()
if(ch==13):
delreg()
menu()
Name Of the Project : ABC School Admission System
Author Name : Shome Nath Bhawani
City : Jamshedpur
Written in : Python Binary File
import os
def create():
rec=[]
with open("xyz.dat", "wb") as fp:
admno=int(input("Admission Form No"))
issdt=input("Date of Issue")
regno=int(input("Registration Number"))
regdt=input("Registration Date")
cname=input("Name of the Candidate")
add=input("Residential Address")
city=input("City Name")
dist=input("District Name")
state=input("State Name")
pin=int(input("Pincode"))
mob=input("Mobile Number")
fname=input("Father Name")
focc=input("Father Occupation")
mname=input("Mother Name")
mocc=input("Mother Occupation")
dob=input("Date of Birth")
adhar=input("Aadhar Card No")
pob=input("Place of Birth")
gen=input("Gender")
mton=input("Mother Tongue")
reg=input("Religion")
cas=input("Caste")
dis=input("Physical problem/Disability")
blg=input("Blood Group")
idmrk=input("Identification Mark")
lstscatt=input("Name of the School Last Attended")
adtak=input("Standard to which admission is sought")
medinf=input("Any Medical Information")
rec=[admno,issdt,regno,regdt,cname,add,city,dist,state,pin,mob,fname,focc,mname,mocc,dob,adhar,pob,gen,mton,reg,cas,dis,blg,idmrk,lstscatt,adtak,medinf]
pickle.dump(rec,fp)
fp.close()
menu()
def append():
rec=[]
with open("xyz.dat", "ab") as fp:
admno=int(input("Admission Form No"))
issdt=input("Date of Issue")
regno=int(input("Registration Number"))
regdt=input("Registration Date")
cname=input("Name of the Candidate")
add=input("Residential Address")
city=input("City Name")
dist=input("District Name")
state=input("State Name")
pin=int(input("Pincode"))
mob=input("Mobile Number")
fname=input("Father Name")
focc=input("Father Occupation")
mname=input("Mother Name")
mocc=input("Mother Occupation")
dob=input("Date of Birth")
adhar=input("Aadhar Card No")
pob=input("Place of Birth")
gen=input("Gender")
mton=input("Mother Tongue")
reg=input("Religion")
cas=input("Caste")
dis=input("Physical problem/Disability")
blg=input("Blood Group")
idmrk=input("Identification Mark")
lstscatt=input("Name of the School Last Attended")
adtak=input("Standard to which admission is sought")
medinf=input("Any Medical Information")
rec=[admno,issdt,regno,regdt,cname,add,city,dist,state,pin,mob,fname,focc,mname,mocc,dob,adhar,pob,gen,mton,reg,cas,dis,blg,idmrk,lstscatt,adtak,medinf]
pickle.dump(rec,fp)
fp.close()
menu()
def dispall():
rec=[]
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
print("Admission Form No : ",rec[0])
print("Date of Issue : ",rec[1])
print("Registration Number : ",rec[2])
print("Registration Date : ",rec[3])
print("Name of the Candidate:",rec[4])
print("Address : ",rec[5])
print("City : ",rec[6])
print("District : ",rec[7])
print("State : ",rec[8])
print("Pincode : ",rec[9])
print("Mobile Number : ",rec[10])
print("Father Name : ",rec[11])
print("Father Occupation : ",rec[12])
print("Mother Name : ",rec[13])
print("Mother Occupation : ",rec[14])
print("Date of Birth : ",rec[15])
print("Aadhar Card No : ",rec[16])
print("Place of Birth : ",rec[17])
print("Gender : ",rec[18])
print("Mother Tongue : ",rec[19])
print("Religion : ",rec[20])
print("Caste : ",rec[21])
print("Physical problem/Disability : ",rec[22])
print("Blood Group : ",rec[23])
print("Identification Mark : ",rec[24])
print("School Last Attended : ",rec[25])
print("Standard Admission Taken : ",rec[26])
print("Medical Information : ",rec[27])
print("--------------------------------------------------------------------")
except EOFError:
fp.close()
menu()
def searchadm():
rec=[]
scadm=int(input("Enter the Admission Number to be searched"))
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if scadm==rec[0]:
print("Admission Form No : ",rec[0])
print("Date of Issue : ",rec[1])
print("Registration Number : ",rec[2])
print("Registration Date : ",rec[3])
print("Name of the Candidate:",rec[4])
print("Address : ",rec[5])
print("City : ",rec[6])
print("District : ",rec[7])
print("State : ",rec[8])
print("Pincode : ",rec[9])
print("Mobile Number : ",rec[10])
print("Father Name : ",rec[11])
print("Father Occupation : ",rec[12])
print("Mother Name : ",rec[13])
print("Mother Occupation : ",rec[14])
print("Date of Birth : ",rec[15])
print("Aadhar Card No : ",rec[16])
print("Place of Birth : ",rec[17])
print("Gender : ",rec[18])
print("Mother Tongue : ",rec[19])
print("Religion : ",rec[20])
print("Caste : ",rec[21])
print("Physical problem/Disability : ",rec[22])
print("Blood Group : ",rec[23])
print("Identification Mark : ",rec[24])
print("School Last Attended : ",rec[25])
print("Standard Admission Taken : ",rec[26])
print("Medical Information : ",rec[27])
except EOFError:
fp.close()
menu()
def searchreg():
rec=[]
screg=int(input("Enter the Registration Number to be searched"))
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if screg==rec[2]:
print("Admission Form No : ",rec[0])
print("Date of Issue : ",rec[1])
print("Registration Number : ",rec[2])
print("Registration Date : ",rec[3])
print("Name of the Candidate:",rec[4])
print("Address : ",rec[5])
print("City : ",rec[6])
print("District : ",rec[7])
print("State : ",rec[8])
print("Pincode : ",rec[9])
print("Mobile Number : ",rec[10])
print("Father Name : ",rec[11])
print("Father Occupation : ",rec[12])
print("Mother Name : ",rec[13])
print("Mother Occupation : ",rec[14])
print("Date of Birth : ",rec[15])
print("Aadhar Card No : ",rec[16])
print("Place of Birth : ",rec[17])
print("Gender : ",rec[18])
print("Mother Tongue : ",rec[19])
print("Religion : ",rec[20])
print("Caste : ",rec[21])
print("Physical problem/Disability : ",rec[22])
print("Blood Group : ",rec[23])
print("Identification Mark : ",rec[24])
print("School Last Attended : ",rec[25])
print("Standard Admission Taken : ",rec[26])
print("Medical Information : ",rec[27])
except EOFError:
fp.close()
menu()
def searchregdate():
rec=[]
scregdt=input("Enter the Registration Date to be searched")
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if scregdt==rec[3]:
print("Admission Form No : ",rec[0])
print("Date of Issue : ",rec[1])
print("Registration Number : ",rec[2])
print("Registration Date : ",rec[3])
print("Name of the Candidate:",rec[4])
print("Address : ",rec[5])
print("City : ",rec[6])
print("District : ",rec[7])
print("State : ",rec[8])
print("Pincode : ",rec[9])
print("Mobile Number : ",rec[10])
print("Father Name : ",rec[11])
print("Father Occupation : ",rec[12])
print("Mother Name : ",rec[13])
print("Mother Occupation : ",rec[14])
print("Date of Birth : ",rec[15])
print("Aadhar Card No : ",rec[16])
print("Place of Birth : ",rec[17])
print("Gender : ",rec[18])
print("Mother Tongue : ",rec[19])
print("Religion : ",rec[20])
print("Caste : ",rec[21])
print("Physical problem/Disability : ",rec[22])
print("Blood Group : ",rec[23])
print("Identification Mark : ",rec[24])
print("School Last Attended : ",rec[25])
print("Standard Admission Taken : ",rec[26])
print("Medical Information : ",rec[27])
print("--------------------------------------------------------------------")
except EOFError:
fp.close()
menu()
def searchname():
rec=[]
scname=input("Enter the Name to be searched")
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if scname==rec[4]:
print("Admission Form No : ",rec[0])
print("Date of Issue : ",rec[1])
print("Registration Number : ",rec[2])
print("Registration Date : ",rec[3])
print("Name of the Candidate:",rec[4])
print("Address : ",rec[5])
print("City : ",rec[6])
print("District : ",rec[7])
print("State : ",rec[8])
print("Pincode : ",rec[9])
print("Mobile Number : ",rec[10])
print("Father Name : ",rec[11])
print("Father Occupation : ",rec[12])
print("Mother Name : ",rec[13])
print("Mother Occupation : ",rec[14])
print("Date of Birth : ",rec[15])
print("Aadhar Card No : ",rec[16])
print("Place of Birth : ",rec[17])
print("Gender : ",rec[18])
print("Mother Tongue : ",rec[19])
print("Religion : ",rec[20])
print("Caste : ",rec[21])
print("Physical problem/Disability : ",rec[22])
print("Blood Group : ",rec[23])
print("Identification Mark : ",rec[24])
print("School Last Attended : ",rec[25])
print("Standard Admission Taken : ",rec[26])
print("Medical Information : ",rec[27])
except EOFError:
fp.close()
menu()
def searchgen():
rec=[]
scgen=input("Enter the Gender to be searched")
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if scgen==rec[18]:
print("Admission Form No : ",rec[0])
print("Date of Issue : ",rec[1])
print("Registration Number : ",rec[2])
print("Registration Date : ",rec[3])
print("Name of the Candidate:",rec[4])
print("Address : ",rec[5])
print("City : ",rec[6])
print("District : ",rec[7])
print("State : ",rec[8])
print("Pincode : ",rec[9])
print("Mobile Number : ",rec[10])
print("Father Name : ",rec[11])
print("Father Occupation : ",rec[12])
print("Mother Name : ",rec[13])
print("Mother Occupation : ",rec[14])
print("Date of Birth : ",rec[15])
print("Aadhar Card No : ",rec[16])
print("Place of Birth : ",rec[17])
print("Gender : ",rec[18])
print("Mother Tongue : ",rec[19])
print("Religion : ",rec[20])
print("Caste : ",rec[21])
print("Physical problem/Disability : ",rec[22])
print("Blood Group : ",rec[23])
print("Identification Mark : ",rec[24])
print("School Last Attended : ",rec[25])
print("Standard Admission Taken : ",rec[26])
print("Medical Information : ",rec[27])
print("--------------------------------------------------------------------")
except EOFError:
fp.close()
menu()
def searchcaste():
rec=[]
sccas=input("Enter the Caste to be searched")
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if sccas==rec[21]:
print("Admission Form No : ",rec[0])
print("Date of Issue : ",rec[1])
print("Registration Number : ",rec[2])
print("Registration Date : ",rec[3])
print("Name of the Candidate:",rec[4])
print("Address : ",rec[5])
print("City : ",rec[6])
print("District : ",rec[7])
print("State : ",rec[8])
print("Pincode : ",rec[9])
print("Mobile Number : ",rec[10])
print("Father Name : ",rec[11])
print("Father Occupation : ",rec[12])
print("Mother Name : ",rec[13])
print("Mother Occupation : ",rec[14])
print("Date of Birth : ",rec[15])
print("Aadhar Card No : ",rec[16])
print("Place of Birth : ",rec[17])
print("Gender : ",rec[18])
print("Mother Tongue : ",rec[19])
print("Religion : ",rec[20])
print("Caste : ",rec[21])
print("Physical problem/Disability : ",rec[22])
print("Blood Group : ",rec[23])
print("Identification Mark : ",rec[24])
print("School Last Attended : ",rec[25])
print("Standard Admission Taken : ",rec[26])
print("Medical Information : ",rec[27])
print("--------------------------------------------------------------------")
except EOFError:
fp.close()
menu()
def searchaadhar():
rec=[]
scaad=input("Enter the Aadhar Card to be searched")
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if scaad==rec[16]:
print("Admission Form No : ",rec[0])
print("Date of Issue : ",rec[1])
print("Registration Number : ",rec[2])
print("Registration Date : ",rec[3])
print("Name of the Candidate:",rec[4])
print("Address : ",rec[5])
print("City : ",rec[6])
print("District : ",rec[7])
print("State : ",rec[8])
print("Pincode : ",rec[9])
print("Mobile Number : ",rec[10])
print("Father Name : ",rec[11])
print("Father Occupation : ",rec[12])
print("Mother Name : ",rec[13])
print("Mother Occupation : ",rec[14])
print("Date of Birth : ",rec[15])
print("Aadhar Card No : ",rec[16])
print("Place of Birth : ",rec[17])
print("Gender : ",rec[18])
print("Mother Tongue : ",rec[19])
print("Religion : ",rec[20])
print("Caste : ",rec[21])
print("Physical problem/Disability : ",rec[22])
print("Blood Group : ",rec[23])
print("Identification Mark : ",rec[24])
print("School Last Attended : ",rec[25])
print("Standard Admission Taken : ",rec[26])
print("Medical Information : ",rec[27])
except EOFError:
fp.close()
menu()
def searchclass():
rec=[]
sccla=input("Enter the Class to be searched")
with open("xyz.dat", "rb") as fp:
try:
while True:
line = pickle.load(fp)
rec=line
if sccla==rec[26]:
print("Admission Form No : ",rec[0])
print("Date of Issue : ",rec[1])
print("Registration Number : ",rec[2])
print("Registration Date : ",rec[3])
print("Name of the Candidate:",rec[4])
print("Address : ",rec[5])
print("City : ",rec[6])
print("District : ",rec[7])
print("State : ",rec[8])
print("Pincode : ",rec[9])
print("Mobile Number : ",rec[10])
print("Father Name : ",rec[11])
print("Father Occupation : ",rec[12])
print("Mother Name : ",rec[13])
print("Mother Occupation : ",rec[14])
print("Date of Birth : ",rec[15])
print("Aadhar Card No : ",rec[16])
print("Place of Birth : ",rec[17])
print("Gender : ",rec[18])
print("Mother Tongue : ",rec[19])
print("Religion : ",rec[20])
print("Caste : ",rec[21])
print("Physical problem/Disability : ",rec[22])
print("Blood Group : ",rec[23])
print("Identification Mark : ",rec[24])
print("School Last Attended : ",rec[25])
print("Standard Admission Taken : ",rec[26])
print("Medical Information : ",rec[27])
except EOFError:
fp.close()
menu()
def modifyreg():
rec=[]
screg=int(input("Enter the Registration Number to be modified"))
with open("xyz.dat", "rb") as fp:
fs=open("temp.dat","wb")
try:
while True:
line = pickle.load(fp)
rec=line
if screg==rec[2]:
ch1=input("Do you want to change address [Y/N]")
if ch1=="Y" or ch1=="Yes":
print("Old Name of the Candidate:",rec[4])
rec[4]=input("New Name of the Candidate:")
print("Old Address : ",rec[5])
rec[5]=input("New Address :")
print("Old City : ",rec[6])
rec[6]=input("New City :")
print("Old District : ",rec[7])
rec[7]=input("New District :")
print("Old State : ",rec[8])
rec[8]=input("New State :")
print("Old Pincode : ",rec[9])
rec[9]=input("New Pincode :")
ch2=input("Do you want to change Mobile Number [Y/N]")
if ch2=="Y" or ch2=="Yes":
print("Old Mobile Number : ",rec[10])
rec[10]=input("New Mobile Number :")
ch3=input("Do you want to change Caste [Y/N]")
if ch3=="Y" or ch3=="Yes":
print("Old Caste : ",rec[21])
rec[21]=input("New Caste :")
ch4=input("Do you want to change Physical Problem [Y/N]")
if ch4=="Y" or ch4=="Yes":
print("Old Physical problem/Disability : ",rec[22])
rec[22]=input("New Physical problem/Disability :")
print("Old Medical Information : ",rec[27])
rec[27]=input("New Medical Information :")
pickle.dump(rec,fs)
except EOFError:
fp.close()
fs.close()
os.remove("xyz.dat")
os.rename("temp.dat","xyz.dat")
menu()
def delreg():
rec=[]
screg=int(input("Enter the Registration Number to be modified"))
with open("xyz.dat", "rb") as fp:
fs=open("temp.dat","wb")
try:
while True:
line = pickle.load(fp)
rec=line
if screg!=rec[2]:
pickle.dump(rec,fs)
except EOFError:
fp.close()
fs.close()
os.remove("xyz.dat")
os.rename("temp.dat","xyz.dat")
menu()
def menu():
print("\t\tABC School Admission System")
print("\t1. Create a Table")
print("\t2. Add a Record")
print("\t3. Display all Records")
print("\t4. Search a Record on Admission number ")
print("\t5. Search a Record on Registration number ")
print("\t6. Search Records on Registration Date ")
print("\t7. Search Records on Name of Candidate ")
print("\t8. Search Records on Gender ")
print("\t9. Search a Record on Caste ")
print("\t10. Search a Record on Aadhar Card number ")
print("\t11. Search Records on Standard to which admission taken ")
print("\t12. Modify the Information of the Student")
print("\t13. Remove record from Table")
print("\t14. Exit ")
ch=int(input("Enter choice"))
if(ch==1):
create()
if(ch==2):
append()
if(ch==3):
dispall()
if(ch==4):
searchadm()
if(ch==5):
searchreg()
if(ch==6):
searchregdate()
if(ch==7):
searchname()
if(ch==8):
searchgen()
if(ch==9):
searchcaste()
if(ch==10):
searchaadhar()
if(ch==11):
searchclass()
if(ch==12):
modifyreg()
if(ch==13):
delreg()
menu()
No comments:
Post a Comment