Пример #1
0
 def update(self, itemObject):
     connect = Connect()
     connect.sql_execute("update item set " +
                         "ntd# = '" + itemObject.get_ntd_num() + "'," +
                         "quantity = " + str(itemObject.get_quantity()) + "," +
                         "total_cost = " + str(itemObject.get_total_cost()) + "," +
                         "hold# = '" + itemObject.get_hold_num() + "' " +
                         "where ntd# = '" + itemObject.get_ntd_num() + "' and hold# = '" + itemObject.get_hold_num() + "'")
     connect.commit()
Пример #2
0
 def update(self, employee):
     connect = Connect()
     connect.sql_execute("update employee set " + "fname = '" +
                         employee.get_fname() + "'," + "lname = '" +
                         employee.get_lname() + "'," + "salesperson# = '" +
                         employee.get_salesperson_num() + "' " +
                         "where salesperson# = '" +
                         employee.get_salesperson_num() + "'")
     connect.commit()
Пример #3
0
 def update(self, customerObject):
     connect = Connect()
     connect.sql_execute("update customer set " +
                         "fname = '" + customerObject.get_fname() + "'," +
                         "lname = '" + customerObject.get_lname() + "'," +
                         "city = '" + customerObject.get_city() + "'," +
                         "zip = '" + customerObject.get_zip() + "'," +
                         "state = '" + customerObject.get_state() + "'," +
                         "email = '" + customerObject.get_email() + "'," +
                         "phone = '" + customerObject.get_phone() + "'," +
                         "street_address = '" + customerObject.get_saddress() + "' "+
                         "where phone = '" + customerObject.get_phone() + "'")
     connect.commit()
Пример #4
0
 def update(self, customerOrderObject):
     connect = Connect()
     connect.sql_execute("update customer_order set " + "date_made = '" +
                         customerOrderObject.get_date_made() + "'," +
                         "total_cost = " +
                         str(customerOrderObject.get_total_cost()) + "," +
                         "hold# = '" + customerOrderObject.get_hold_num() +
                         "', " + "delivery_address = '" +
                         customerOrderObject.get_delivery_address() +
                         "', " + "phone# = '" +
                         customerOrderObject.get_phone_num() + "' " +
                         "where hold# = '" +
                         customerOrderObject.get_hold_num() + "'")
     connect.commit()
Пример #5
0
 def update(self, product):
     connect = Connect()
     connect.sql_execute("update product set " +
                         "dye_lot = '" + product.get_dye_lot() + "'," +
                         "color = '" + product.get_color() + "'," +
                         "location = '" + product.get_location() + "'," +
                         "mfg# = '" + product.get_mfg_num() + "'," +
                         "buying_price = " + str(product.get_buying_price()) + "," +
                         "amt_in_stock = " + str(product.get_amt_in_stock()) + "," +
                         "ntd_description = '" + product.get_ntd_description() + "' ," +
                         "cost_per_sf = " + str(product.get_cost_per_sf()) + "," +
                         "sf_per_carton = " + str(product.get_sf_per_carton()) + "," +
                         "carton_count = " + str(product.get_carton_count()) + ", " +
                         "size_of_product = " + str(product.get_size_of_product()) + "," +
                         "piece_count = " + str(product.get_piece_count()) + " , " +
                         "ntd# = '" + product.get_ntd_num() + "' " +
                         "where ntd# = '" + product.get_ntd_num() + "'")
     connect.commit()
Пример #6
0
 def delete_customer_order_by_hold_num(self, hold_num):
     connect = Connect()
     connect.sql_execute("delete from customer_order where hold# = " + "'" +
                         hold_num + "'")
     connect.commit()
Пример #7
0
 def insert_customer_order(self, customerOrderObject):
     connect = Connect()
     connect.sql_execute('Insert into customer_order values ( ' +
                         customerOrderObject.get_value_string())
     connect.commit()
Пример #8
0
 def delete_customer_by_phone_number(self, phone):
     connect = Connect()
     connect.sql_execute('delete from customer where phone = ' + "'" + str(phone) + "'")
     connect.commit()
Пример #9
0
 def delete_item_using_hold_num(self, key):
     connect = Connect()
     connect.sql_execute("delete from item where hold# = " + "'" + key + "'")
     connect.commit()
Пример #10
0
 def delete_item(self, ntd_num, hold_num):
     connect = Connect()
     connect.sql_execute("delete from item where ntd# = " + "'" + ntd_num + "' and hold# = " + "'" + hold_num + "'")
     connect.commit()
Пример #11
0
 def insert_item(self, itemObject):
     connect = Connect()
     connect.sql_execute('Insert into Item values ( ' + itemObject.get_value_string())
     connect.commit()
Пример #12
0
 def delete_product(self,key):
     connect = Connect()
     connect.cur.execute('delete from product where ntd# = ' + "'" + str(key) + "'")
     connect.commit()
Пример #13
0
 def insert_product(self,product):
     connect = Connect()
     connect.cur.execute('insert into product values( ' + product.get_values_string())
     connect.commit()
Пример #14
0
 def delete_employee(self, key):
     connect = Connect()
     connect.cur.execute('delete from employee where salesperson# = ' +
                         "'" + str(key) + "'")
     connect.commit()
Пример #15
0
 def insert_employee(self, employee):
     connect = Connect()
     connect.cur.execute('insert into employee values( ' +
                         employee.get_values_string())
     connect.commit()