Commit 88ab97d2 authored by panos's avatar panos

Bug fixed in the interface

parent 243dffe8
...@@ -178,7 +178,7 @@ class TIMEIN(Frame): ...@@ -178,7 +178,7 @@ class TIMEIN(Frame):
return availableWP return availableWP
def updateDatabase(self): def updateDatabase(self):
cnxn=pyodbc.connect("Driver={MySQL ODBC 3.51 Driver};SERVER=localhost; PORT=3306;DATABASE=bal_database;UID=root;PASSWORD=Pitheos10;") cnxn=pyodbc.connect("Driver={MySQL ODBC 3.51 Driver};SERVER=localhost; PORT=3306;DATABASE=leo_database2;UID=root;PASSWORD=Pitheos10;")
cursor = cnxn.cursor() cursor = cnxn.cursor()
update_order= ("INSERT INTO prod_status(`status_id`, `WP_id`, `PersonnelCode`, `MachineName`, `TIMEIN`) VALUES (?, ?, ?, ?, ?)") update_order= ("INSERT INTO prod_status(`status_id`, `WP_id`, `PersonnelCode`, `MachineName`, `TIMEIN`) VALUES (?, ?, ?, ?, ?)")
cursor.execute("SELECT @@IDENTITY AS ID") cursor.execute("SELECT @@IDENTITY AS ID")
...@@ -186,8 +186,9 @@ class TIMEIN(Frame): ...@@ -186,8 +186,9 @@ class TIMEIN(Frame):
select WP_id, Order_id select WP_id, Order_id
from sequence where WP_id=? from sequence where WP_id=?
""", self.WPOption.get()) """, self.WPOption.get())
order = a.fetchone() ind1 = a.fetchone()
print order order=ind1[1]
cursor.execute("SELECT @@IDENTITY AS ID")
row = cursor.fetchone() row = cursor.fetchone()
order_ref = row.ID order_ref = row.ID
status1 = 'in progress' status1 = 'in progress'
...@@ -275,7 +276,7 @@ class TIMEOUT(Frame): ...@@ -275,7 +276,7 @@ class TIMEOUT(Frame):
return return
def checkInsertedWP(self): def checkInsertedWP(self):
cnxn=pyodbc.connect("Driver={MySQL ODBC 3.51 Driver};SERVER=localhost; PORT=3306;DATABASE=bal_database;UID=root;PASSWORD=Pitheos10;") cnxn=pyodbc.connect("Driver={MySQL ODBC 3.51 Driver};SERVER=localhost; PORT=3306;DATABASE=leo_database2;UID=root;PASSWORD=Pitheos10;")
cursor = cnxn.cursor() cursor = cnxn.cursor()
b=cursor.execute(""" b=cursor.execute("""
...@@ -313,13 +314,14 @@ class TIMEOUT(Frame): ...@@ -313,13 +314,14 @@ class TIMEOUT(Frame):
return insertedWP return insertedWP
def updateDatabase(self): def updateDatabase(self):
cnxn=pyodbc.connect("Driver={MySQL ODBC 3.51 Driver};SERVER=localhost; PORT=3306;DATABASE=bal_database;UID=root;PASSWORD=Pitheos10;") cnxn=pyodbc.connect("Driver={MySQL ODBC 3.51 Driver};SERVER=localhost; PORT=3306;DATABASE=leo_database2;UID=root;PASSWORD=Pitheos10;")
cursor = cnxn.cursor() cursor = cnxn.cursor()
a = cursor.execute(""" a = cursor.execute("""
select WP_id, Order_id select WP_id, Order_id
from sequence where WP_id=? from sequence where WP_id=?
""", self.WPOption.get()) """, self.WPOption.get())
order = a.fetchone()[1] ind2 = a.fetchone()
order=ind2[1]
b = cursor.execute(""" b = cursor.execute("""
select WP_id, Order_id, PartName select WP_id, Order_id, PartName
from sequence where Order_id=? from sequence where Order_id=?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment