public override void Execute() { string query = "DELETE FROM BatchOperators WHERE SystemId = ?"; List <object> parameters = new List <object> { targetId }; store.ExecuteNonQuery(query, parameters); }
public override void Execute() { string query = "DELETE FROM InventoryBatches WHERE BatchNumber = ?"; store.ExecuteNonQuery(query, new List <object>() { batchNumber }); }
public override void Execute() { DeductBatchQuantityFromInventory(); string query = "DELETE FROM ReceivedBatches WHERE SystemId = ?"; List <object> parameters = new List <object> { targetId }; store.ExecuteNonQuery(query, parameters); }
public override void Execute() { string query = "INSERT INTO BatchOperators (FirstName, LastName) VALUES(?, ?)"; List <object> parameters = new List <object>() { entity.NativeModel.FirstName, entity.NativeModel.LastName }; store.ExecuteNonQuery(query, parameters); }
public override void Execute() { if (BatchExistsInInventoryAndIsDepleted()) { string query = "DELETE FROM InventoryBatches WHERE SystemId = ?"; List <object> parameters = new List <object> { entity.SystemId }; store.ExecuteNonQuery(query, parameters); } }
public override void Execute() { string query = "DELETE FROM ImplementedBatches WHERE SystemId = ?"; List <object> parameters = new List <object>() { loggedEntity.SystemId }; inventoryEntity = RetainLoggedEntityAsInventoryEntity(); store.ExecuteNonQuery(query, parameters); RecommitToInventory(); }
public override void Execute() { string query = "UPDATE BatchOperators SET FirstName = ?, LastName = ? WHERE SystemId = ?"; List <object> parameters = new List <object> { targetOperator.FirstName, targetOperator.LastName, targetId }; store.ExecuteNonQuery(query, parameters); }
public override void Execute() { string query = "UPDATE ImplementedBatches SET ColorName = ?, BatchNumber = ? WHERE SystemId = ?"; List <object> parameters = new List <object>() { entity.NativeModel.ColorName, entity.NativeModel.BatchNumber, entity.SystemId }; store.ExecuteNonQuery(query, parameters); }
public override void Execute() { string query = string.Format( "INSERT INTO ImplementedBatches {0} VALUES {1}", "(ColorName, BatchNumber, ImplementationDate, ImplementingOperatorId)", "(?, ?, ?, ?)" ); List <object> parameters = new List <object>() { entity.NativeModel.ColorName, entity.NativeModel.BatchNumber, entity.NativeModel.ActivityDate.FormatForDatabase(), GetReceivingOperatorId() }; store.ExecuteNonQuery(query, parameters); }
public override void Execute() { if (BatchWasDepletedAndDeleted()) { return; } string query = "UPDATE InventoryBatches SET ColorName = ?, BatchNumber = ?, ActivityDate = ?, QtyOnHand = ? WHERE SystemId = ?"; List <object> parameters = new List <object>() { entity.NativeModel.ColorName, entity.NativeModel.BatchNumber, entity.NativeModel.ActivityDate.FormatForDatabase(), entity.NativeModel.Quantity, entity.SystemId }; store.ExecuteNonQuery(query, parameters); }
public override void Execute() { string query = string.Format( "UPDATE ReceivedBatches SET {0} WHERE {1}", "ColorName = ?, BatchNumber = ?, ReceivingDate = ?, QtyReceived = ?, PONumber = ?, ReceivingOperatorId = ?", "SystemId = ?" ); List <object> parameters = new List <object>() { entity.NativeModel.ColorName, entity.NativeModel.BatchNumber, entity.NativeModel.ActivityDate.FormatForDatabase(), entity.NativeModel.Quantity, entity.NativeModel.PONumber, GetBatchOperatorId(), entity.SystemId }; store.ExecuteNonQuery(query, parameters); }
public override void Execute() { if (BatchExistsInInventory()) { Entity <InventoryBatch> entity = store.Results[0] as Entity <InventoryBatch>; entity.NativeModel.Quantity += this.entity.NativeModel.Quantity; ITransaction updater = new EditBatchInCurrentInventoryTransaction(entity, store); updater.Execute(); return; } string query = "INSERT INTO InventoryBatches (ColorName, BatchNumber, ActivityDate, QtyOnHand) VALUES (?, ?, ?, ?)"; List <object> parameters = new List <object> { entity.NativeModel.ColorName, entity.NativeModel.BatchNumber, entity.NativeModel.ActivityDate.FormatForDatabase(), entity.NativeModel.Quantity }; store.ExecuteNonQuery(query, parameters); }