Work on native gui code
This commit is contained in:
+4
-3
@@ -5,12 +5,13 @@ import MySQLdb.cursors
|
||||
|
||||
class Vessel():
|
||||
|
||||
fields = ('vid', 'vtype', 'vesselname', 'model', 'loa', 'lwl',
|
||||
'beam', 'draught', 'draught_min', 'displacement', 'ballast',
|
||||
'beltpos_aft', 'beltpos_bow', 'shapefile', 'remarks')
|
||||
|
||||
def __init__(self, dbconn, vessel_id=None):
|
||||
self.conn = dbconn
|
||||
self.dcur = dbconn.cursor(MySQLdb.cursors.DictCursor)
|
||||
self.fields = ('vid', 'vtype', 'vesselname', 'model', 'loa', 'lwl',
|
||||
'beam', 'draught', 'draught_min', 'displacement', 'ballast',
|
||||
'beltpos_aft', 'beltpos_bow', 'shapefile', 'remarks')
|
||||
if vessel_id:
|
||||
self.vid = long(vessel_id)
|
||||
self.load()
|
||||
|
||||
Reference in New Issue
Block a user