Beispiel #1
0
        public SqlitefUI(String productTableName, string addProductToMainTransactionTableName, string addProductToTransactionTableName, string databaseLocation)
        {
            sqlite = new SQLiteConnection(databaseLocation);
            DataTable TableWithProducts = InteractWithDatabase.SelectQuery($"Select * From {productTableName}", sqlite);

            this.productTableName = productTableName;
            this.addProductToTransactionTableName = addProductToTransactionTableName;
            this.addProductToTransactionTableName = mainBuyTransactionTableName;
            productList     = new ListOfProducts(InteractWithDatabase.ProductTableToListOfProducts(TableWithProducts), this);
            transactionList = new ListOfTransactions(null);
        }
Beispiel #2
0
 public MainBuyTransaction(string comment, DateTime date, int iD, decimal price, string place, IUserinterface uI) : base(comment, date, iD, price)
 {
     this.place         = place;
     ListOfTransactions = new ListOfTransactions(uI);
 }
Beispiel #3
0
 /// <summary>
 /// Make a transaction with an existing list of products
 /// </summary>
 /// <param name="comment"></param>
 /// <param name="date"></param>
 /// <param name="iD"></param>
 /// <param name="transactions"></param>
 /// <param name="price"></param>
 /// <param name="place"></param>
 public MainBuyTransaction(string comment, DateTime date, int iD, ListOfTransactions transactions, decimal price, string place) : base(comment, date, iD, price)
 {
     ListOfTransactions = transactions;
     this.place         = place;
 }