public bool AddOrderLineToOrder(OrderLine _orderLine, int _orderID) { string query = "INSERT INTO Order_Product(OrderID, ProductID, Amount) VALUES (@OrderID, @ProductID, @Amount)"; List <KeyValuePair <string, object> > parameterlist = new List <KeyValuePair <string, object> > { new KeyValuePair <string, object>("@OrderID", _orderID), new KeyValuePair <string, object>("@ProductID", _orderLine.Product.ID), new KeyValuePair <string, object>("@Amount", _orderLine.Amount) }; return(SQL_CRUD_Methods.SQLInsertBoolReturn(query, parameterlist)); }
public bool SaveOrderStatusForOrder(OrderStatus _orderStatus) { string query = "INSERT INTO [OrderStatus](Status, DateTime, OrderID) VALUES (@Status, @DateTime, @OrderID)"; List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> > { new KeyValuePair <string, object>("@Status", _orderStatus.RegisteredStatus), new KeyValuePair <string, object>("@DateTime", _orderStatus.RegisteredDate), new KeyValuePair <string, object>("@OrderID", _orderStatus.OrderID) }; return(SQL_CRUD_Methods.SQLInsertBoolReturn(query, parameters)); }
public void FurtherOrderStatus(int _orderID, OrderStatus.OrderStatusesEnum _orderStatus) { string query = "INSERT INTO [OrderStatus](Status, DateTime, OrderID) VALUES (@Status, @DateTime, @OrderID)"; List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> > { new KeyValuePair <string, object>("@Status", _orderStatus), new KeyValuePair <string, object>("@DateTime", DateTime.Now), new KeyValuePair <string, object>("@OrderID", _orderID) }; SQL_CRUD_Methods.SQLInsertBoolReturn(query, parameters); }
public bool AddProductToOrder(int _orderID, int _productID, int _productAmount) { string query = "INSERT INTO [Order_Product](OrderID, ProductID, Amount) VALUES (@OrderID, @ProductID, @Amount)"; List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> > { new KeyValuePair <string, object>("@OrderID", _orderID), new KeyValuePair <string, object>("@ProductID", _productID), new KeyValuePair <string, object>("@Amount", _productAmount) }; return(SQL_CRUD_Methods.SQLInsertBoolReturn(query, parameters)); }
public bool SaveDeliveryLine(int _deliveryID, DeliveryLine _deliveryLine) { string query = "INSERT INTO Delivery_Product(DeliveryID,ProductID,Amount) VALUES (@DeliveryID,@ProductID,@Amount)"; List <KeyValuePair <string, object> > parameterlist = new List <KeyValuePair <string, object> > { new KeyValuePair <string, object>("@DeliveryID", _deliveryID), new KeyValuePair <string, object>("@ProductID", _deliveryLine.Product.ID), new KeyValuePair <string, object>("@Amount", _deliveryLine.Amount) }; return(SQL_CRUD_Methods.SQLInsertBoolReturn(query, parameterlist)); }