Exemple #1
0
        private void AddOrderDetail(SQLiteTransaction trans, int id, int orderId, string article)
        {
            SQLiteCommand cmd = _Connection.CreateCommand("insert into OrderDetails (Id, OrderId, Article) values (@Id, @OrderId, @Article)");
            cmd.Transaction = trans;

            cmd.Parameters.Add("@Id", DbType.Int32).Value = id;
            cmd.Parameters.Add("@OrderId", DbType.Int32).Value = orderId;
            cmd.Parameters.Add("@Article", DbType.String).Value = article;

            cmd.ExecuteNonQuery();
        }
Exemple #2
0
        public SQLiteCommand()
        {
            _CommandText = String.Empty;
            _UpdatedRowSource = UpdateRowSource.Both;
            _Timeout = 30;
            _ServingDataReader = false;
            _Transaction = null;

            _Parameters = new SQLiteParameterCollection();
            _Statements = new SQLiteStatementCollection();
        }
Exemple #3
0
        private void AddOrder(SQLiteTransaction trans, int id, int items, string customer, double amount)
        {
            SQLiteCommand cmd = _Connection.CreateCommand("insert into Orders (Id, Items, Customer, Amount) values (@Id, @Items, @Customer, @Amount)");
            cmd.Transaction = trans;

            cmd.Parameters.Add("@Id", DbType.Int32).Value = id;
            cmd.Parameters.Add("@Items", DbType.Int32).Value = items;
            cmd.Parameters.Add("@Customer", DbType.String).Value = customer;
            cmd.Parameters.Add("@Amount", DbType.Single).Value = amount;

            cmd.ExecuteNonQuery();
        }