Esempio n. 1
0
 def __init__(self, connection, program_name):
     self.__common_view = View(program_name)
     self.__common_model = Model(connection)
     self.__contragent_controller = ContragentController(
         connection, self.__common_view)
     self.__goods_controller = GoodsController(connection,
                                               self.__common_view)
     self.__orders_controller = OrdersController(connection,
                                                 self.__common_view)
     self.__warehouse_controller = WarehouseController(
         connection, self.__common_view)
Esempio n. 2
0
 def __init__(self, dialect: str, host: str, port: int, db_name: str,
              user: str, password: str, program_name: str):
     self.__common_view = View(program_name)
     self.__common_model = Model(dialect, host, port, db_name, user,
                                 password)
     session = self.__common_model.session()
     self.__city_controller = CityController(session, self.__common_view)
     self.__contragent_controller = ContragentController(
         session, self.__common_view)
     self.__goods_controller = GoodsController(session, self.__common_view)
     self.__invoice_controller = InvoiceController(session,
                                                   self.__common_view)
     self.__warehouse_controller = WarehouseController(
         session, self.__common_view)
     self.__reweightings_controller = ReweightingsController(
         session, self.__common_view)