Ejemplo n.º 1
0
 def insert(self):
     try:
         session = SessionFactory()
         session.add(AdminOrm(self.nama, self.email, self.password, self.jenisAkun))
         session.commit()
         session.close()
     except Exception as e:
         print("Error -->", e)
     else:
         print("Insert Berhasil")
Ejemplo n.º 2
0
 def insertMenuItem(self, ):
     try:
         session = SessionFactory()
         menuItemOrm = MenuItemOrm(self.getNamaItem(), self.getJenisItem(), self.getMerekItem(), self.getHargaItem(),
                                   self.getKuantitasItem())
         session.add(menuItemOrm)
         session.commit()
         session.close()
     except Exception as e:
         print("Error -->", e)
     else:
         print("Insert Berhasil")
Ejemplo n.º 3
0
 def insertKas(self):
     try:
         session = SessionFactory()
         kasOrm = KasOrm(self.getTglKas(), self.getPemasukan(),
                         self.getPengeluaran(), self.hitungLabaBersih())
         session.add(kasOrm)
         session.commit()
         session.close()
     except Exception as e:
         print("Error -->", e)
     else:
         print("Insert Berhasil")
Ejemplo n.º 4
0
 def insertTransaksi(self):
     try:
         session = SessionFactory()
         trsOrm = TransaksiOrm(self.getTanggalTransaksi(),
                               self.getJenisTransaksi(),
                               self.getTotalTransaksi())
         session.add(trsOrm)
         session.commit()
         session.close()
     except Exception as e:
         print("Error -->", e)
     else:
         print("Insert Berhasil")