예제 #1
0
def signup():
    print("\nEnter the following details:")
    fname=input("First Name:")
    lname=input("Last Name:")
    name="%s %s" %(fname,lname)
    print("Address:")
    add1=input("Line1(House No.):")
    add2=input("Line2(Street/Colony/Road):")
    add3=input("City:")
    add4=input("State:")
    add5=generalfunc.pincode()
    address="%s %s,%s,%s,%d" %(add1,add2,add3,add4,add5)
    acctype=generalfunc.account()
    contact_no=input("Contact No.:")
    aadhaar_number=generalfunc.aadhaarnumber()
    passwrd=generalfunc.password()
    bal=generalfunc.balance(acctype)
    today= date.today()
    
    oracleconnection.cur.execute("""SELECT AADHAARNUMBER FROM DISHANT.CUSTOMER WHERE AADHAARNUMBER=:1""",(aadhaar_number,))
    oracleconnection.con.commit()
    row= oracleconnection.cur.fetchall()
    count=oracleconnection.cur.rowcount
    
    if count==0:
        oracleconnection.cur.execute('SELECT DISHANT.CID.NEXTVAL FROM DUAL')
        oracleconnection.con.commit()
        row= oracleconnection.cur.fetchall()
        for r in row:
            cid="%d" %(r[0])
    else:
        oracleconnection.cur.execute('SELECT CID FROM DISHANT.CUSTOMER WHERE AADHAARNUMBER=:1',(aadhaar_number,))
        oracleconnection.con.commit()
        row= oracleconnection.cur.fetchall()
        cid= row[0][0]
    
    oracleconnection.cur.execute('SELECT DISHANT.ACCNO.NEXTVAL FROM DUAL')
    oracleconnection.con.commit()
    row= oracleconnection.cur.fetchall()
    for r in row:
        accno="%s%d" %('ACN',r[0])

    oracleconnection.cur.execute('INSERT INTO DISHANT.CUSTOMER VALUES(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10)',(cid,accno,name,address,acctype,bal,passwrd,today,contact_no,aadhaar_number))
    oracleconnection.con.commit()
    print("***************************************************************************")
    print("New Customer ID created\n")
    print("Customer ID:",cid)
    print("Account No.",accno)
    print("***************************************************************************")
    menus.mainmenu()
예제 #2
0
def start():
    result = '*'
    while (result != 'Q'):
        result = mainmenu()
        if result == '1':
            collectprovinces()
        elif result == '2':
            set_data_file_location()
        elif result == '3':
            spreadsheets_to_qc()
            input("\nPress ENTER to continue...")
        elif result == '4':
            get_data_file_location()
        elif result == '5':
            compare_files()
            input("\nPress ENTER to continue...")
        elif result == '6':
            read_filetest()
            input("\nPress ENTER to continue...")
        elif result == '7':
            purge_filetest()
            input("\nPress ENTER to continue...")
        elif result == '?':
            readlog()
        #Feature 15, assignment 3
    if (result == 'Q'):
        print("\nCome back soon!")
예제 #3
0
def start():
    result = '*'
    while(result != 'Q'):
        result = mainmenu()  
        if result == '1':
            collectprovinces()
        elif result == '2':
            set_data_file_location()
        elif result == '3':
            spreadsheets_to_qc()
            input("\nPress ENTER to continue...")
        elif result == '4': 
            get_data_file_location()
        elif result == '5':
            compare_files()
            input("\nPress ENTER to continue...")
        elif result == '6':
            read_filetest()
            input("\nPress ENTER to continue...")
        elif result == '7':
            purge_filetest()
            input("\nPress ENTER to continue...")
        elif result == '?':
            readlog()
        #Feature 15, assignment 3
    if(result == 'Q'):
        print("\nCome back soon!")
예제 #4
0
def adminsignin():
    x=0
    while x<3:
        print("\n***************************************************************************")
        admin=input("Admin ID:")
        passwrd=passwordbox("Password:"******"Invalid USER-ID or Password!")
            x=x+1
    if x==3:
        print("More than 3 attempts are not allowed")
        menus.mainmenu()
예제 #5
0
def signin():
    x=0
    while x<3:
        acc=input("Please enter your Account Number:")
        passwrd=passwordbox("Please enter the Password:"******"Invalid USER-ID or Password!")
            x=x+1
    if x==3 :
        oracleconnection.cur.execute("""DELETE DISHANT.CUSTOMER WHERE accno=:1""",(acc,))
        oracleconnection.con.commit()
        print("More than 3 attempts are not allowed")
        menus.mainmenu()
예제 #6
0
def start():
    result = '*'
    while(result != 'Q'):
        result = mainmenu()  
        if result == '1':
            collectprovinces()
        elif result == '2':
            set_data_file_location()
        elif result == '3':
            copy_spreadsheet()
        elif result == '4': 
            get_data_file_location()
        elif result == '?':
            readlog()
        #Feature 15, assignment 3
    if(result == 'Q'):
        print("\nCome back soon!")
예제 #7
0
        # Info
        if info_toggle:

            # label and version
            label = font.render('isometric v%s' % version, True,
                                (250, 250, 250))
            label_obj = label.get_rect()
            label_box = label_obj.center = (680, 580)
            display.blit(label, label_box)

            info = font.render(
                "(%s,%s): Tile %s" % (xpos, ypos, map[ypos][xpos]), True,
                (250, 250, 250))
            info_obj = info.get_rect()
            info_box = label_obj.center = (25, 580)
            display.blit(info, info_box)

            fps = font.render("fps: %s" % (int(clock.get_fps())), True,
                              (250, 250, 250))
            fps_obj = fps.get_rect()
            fps_box = label_obj.center = (725, 25)
            display.blit(fps, fps_box)

        clock.tick(fps_setting)
        pygame.display.update()


if __name__ == "__main__":
    mainmenu(gameloop)
예제 #8
0
파일: launch.py 프로젝트: Achifaifa/kirino
  """
  Scrolls the text from the ./data/misc/credits

  lines is the height in lines of the visible text
  """

  #Pending to implement music of some sort
  emptyheight=lines
  count=head=0
  credstr=[]

  with open ("../data/misc/credits","r") as credits:
    credstr=[i.rstrip() for i in credits]

  while 1:
    os.system('clear')
    for i in range(emptyheight): print ""
    for i in credstr[0 if emptyheight>0 else head:lines-emptyheight]: print i
    emptyheight-=1
    if count<=len(credstr)+lines: count+=1
    else: break
    if emptyheight<0: head+=1
    time.sleep(1/1.5)

if __name__=="__main__":
  #Changes the directory to where the source files are
  try: os.chdir(os.path.dirname(__file__))
  except OSError: pass 

  try: menus.mainmenu()
  except KeyboardInterrupt: exit()
예제 #9
0
__author__ = "ChrisPOConnell"
"""
Assignment 3
"""

# import Assignment3.mainmodule.menus
from menus import mainmenu
from collect_and_store import readlog
from collect_and_store import collectprovinces
import unittest

result = "*"
while result != "Q":
    result = mainmenu()
    if result == "1":
        collectprovinces()
    elif result == "2":
        print("this function is not yet working.")
    elif result == "?":
        readlog()
# Feature 15, assignment 3
print("\nCome back soon!")
예제 #10
0
'''
Created on 14-Jan-2018

@author: Dishant
'''

import menus
from datetime import datetime
from datetime import date
from terminaltables import AsciiTable
from easygui import passwordbox
from passlib.hash import sha256_crypt
import oracleconnection
import generalfunc

generalfunc.foo()
today = date.today()
print(today)
print("")
while True:
    menus.mainmenu()
oracleconnection.con.close()
예제 #11
0
파일: app.py 프로젝트: RyanHartje/isometric
    player_group.draw(display)

    # Info
    if info_toggle:

      # label and version
      label = font.render('isometric v%s' % version, True, (250,250,250))
      label_obj = label.get_rect()
      label_box = label_obj.center = (680,580)
      display.blit(label, label_box)

      info = font.render("(%s,%s): Tile %s" % (xpos,ypos,map[ypos][xpos]), True, (250,250,250))
      info_obj = info.get_rect()
      info_box = label_obj.center = (25,580)
      display.blit(info,info_box)
  
      fps = font.render("fps: %s" % (int(clock.get_fps())), True, (250,250,250))
      fps_obj = fps.get_rect()
      fps_box = label_obj.center = (725,25)
      display.blit(fps,fps_box)


  
    clock.tick(fps_setting)
    pygame.display.update()


if __name__ == "__main__":
  mainmenu(gameloop)
예제 #12
0
__author__ = 'ChrisPOConnell'
'''
Assignment 3
'''

#import Assignment3.mainmodule.menus
from menus import mainmenu
from collect_and_store import readlog
from collect_and_store import collectprovinces
import unittest

result = '*'
while (result != 'Q'):
    result = mainmenu()
    if result == '1':
        collectprovinces()
    elif result == '2':
        print("this function is not yet working.")
    elif result == '?':
        readlog()
#Feature 15, assignment 3
print("\nCome back soon!")