public void InsertPerpetualInventoryTransfer(IList <ManhattanPerpetualInventoryTransfer> perpetualInventoryTransfer)
 {
     using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
     {
         connection.Insert(perpetualInventoryTransfer);
     }
 }
Exemple #2
0
 public void InsertStlInventory(IList <StlInventory> stlInventory)
 {
     using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
     {
         connection.Insert(stlInventory);
     }
 }
Exemple #3
0
 public IEnumerable <StlInventorySyncAudit> GetStlInventorySyncAudit()
 {
     using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
     {
         return(connection.Query <StlInventorySyncAudit>("sp_AuditStlInventory_Sync", commandType: CommandType.StoredProcedure));
     }
 }
 public void InsertDatabaseKioskOrderExportProcessing(KioskOrderExportProcessing kioskOrderExportProcessing)
 {
     using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
     {
         connection.Insert(kioskOrderExportProcessing);
     }
 }
 public void InsertDatabaseKioskOrderDetailExport(IList <DatabaseKioskOrderDetailExport> kiosKioskOrderDetailExports)
 {
     using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
     {
         connection.Insert(kiosKioskOrderDetailExports);
     }
 }
Exemple #6
0
 public void InsertShipmentCartonDetails(IList <ManhattanShipmentCartonDetail> shipmentCartonDetails)
 {
     using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
     {
         connection.Insert(shipmentCartonDetails);
     }
 }
Exemple #7
0
 public IEnumerable <ManhattanConditionCode> GetConditionCodes()
 {
     using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
     {
         return(connection.Query <ManhattanConditionCode>("SELECT * FROM ManhattanConditionCode"));
     }
 }
Exemple #8
0
 public IEnumerable <ManhattanShipmentLineItem> FindShipmentLineItems()
 {
     using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
     {
         return(connection.Query <ManhattanShipmentLineItem>("sp_FindManhattanShipmentLineItems", commandType: CommandType.StoredProcedure));
     }
 }
 public IEnumerable <ManhattanInventorySync> FindManhattanInventorySync()
 {
     using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
     {
         return(connection.Query <ManhattanInventorySync>("sp_FindManhattanInventorySync", commandType: CommandType.StoredProcedure));
     }
 }
        public IEnumerable <ManhattanPerpetualInventoryTransfer> FindPerpetualInventoryTransfers(PerpetualInventoryTransactionCriteria criteria)
        {
            var searchArguments = new DynamicParameters();

            if (!string.IsNullOrEmpty(criteria.TransactionType))
            {
                searchArguments.Add("@TransactionType", criteria.TransactionType, DbType.String);
            }

            if (!string.IsNullOrEmpty(criteria.TransactionType))
            {
                searchArguments.Add("@TransactionCode", criteria.TransactionCode, DbType.String);
            }

            if (!string.IsNullOrEmpty(criteria.ProcessType))
            {
                searchArguments.Add("@ProcessType", criteria.ProcessType, DbType.String);
            }

            if (!string.IsNullOrEmpty(criteria.PurchaseOrderNumber))
            {
                searchArguments.Add("@Ponumber", criteria.PurchaseOrderNumber, DbType.String);
            }
            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                return(connection.Query <ManhattanPerpetualInventoryTransfer>("sp_FindManhattanPerpetualInventoryTransfers",
                                                                              searchArguments,
                                                                              commandType: CommandType.StoredProcedure,
                                                                              commandTimeout: 120));
            }
        }
 public void InsertInventorySync(IList <ManhattanInventorySync> inventorySync)
 {
     using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
     {
         connection.Insert(inventorySync);
     }
 }
Exemple #12
0
 public void InsertPickTicketProcessing(IList <PickTicketConfirmationOrderProcessing> processing)
 {
     using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
     {
         connection.Insert(processing);
     }
 }
Exemple #13
0
 public IEnumerable <Models.ShipmentCancellationEmail> GetShipmentEmailCancellations()
 {
     using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
     {
         return(connection.Query <Models.ShipmentCancellationEmail>("sp_GetCancellationsForEmailNotification", commandType: CommandType.StoredProcedure));
     }
 }
Exemple #14
0
        public void UpdateStlInventory(IList <StlInventoryItem> stlInventoryList)
        {
            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                var stlInventoryUpdateTable = new DataTable();

                stlInventoryUpdateTable.Columns.Add("Upc");
                stlInventoryUpdateTable.Columns.Add("Style");
                stlInventoryUpdateTable.Columns.Add("Size");
                stlInventoryUpdateTable.Columns.Add("Attribute");
                stlInventoryUpdateTable.Columns.Add("Quantity");
                foreach (var stlInv in stlInventoryList)
                {
                    stlInventoryUpdateTable.Rows.Add(stlInv.Upc, stlInv.Style, stlInv.Size, stlInv.Attribute, stlInv.Quantity);
                }

                var parameter = new
                {
                    StlInventoryUpdateTable = stlInventoryUpdateTable.AsTableValuedParameter("[dbo].[StlInventoryUpdateTable]"),
                    InventoryDate           = DateTime.Now
                };

                connection.Open();
                connection.Execute("sp_UpdateSTLInventory", parameter, commandType: CommandType.StoredProcedure);
            }
        }
 public void InsertAuroraPickTicketInstruction(IList <ManhattanPickTicketInstruction> instructions)
 {
     using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
     {
         connection.Insert(instructions);
     }
 }
        public void SetAsProcessed(InventorySyncProcessing inventorySyncProcessing)
        {
            const string updateInventorySyncProcessing = @"UPDATE [dbo].[InventorySyncProcessing]
                                                            SET ProcessedDate = @ProcessedDate
                                                            WHERE TransactionNumber = @TransactionNumber";

            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                connection.Open();
                connection.Execute(updateInventorySyncProcessing, inventorySyncProcessing);
            }
        }
        public InventorySyncStatus GetInventorySyncStatus(int transactionNumber)
        {
            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                var parameter = new
                {
                    TransactionNumber = transactionNumber
                };

                return(connection.Query <InventorySyncStatus>("sp_GetInventorySyncStatus", parameter, commandType: CommandType.StoredProcedure).FirstOrDefault());
            }
        }
        public void InsertPixInventoryAdjustmentNotificationProcessing(int manhattanPerpetualInventoryProcessingId)
        {
            const string insertSql = @"INSERT INTO PixInventoryAdjustmentNotificationProcessing(ManhattanPerpetualInventoryTransferId, ProcessedDate)
                                           VALUES(@ManhattanPerpetualInventoryTransferId, @ProcessedDate)";

            var parameters = new DynamicParameters();

            parameters.Add("@ManhattanPerpetualInventoryTransferId", manhattanPerpetualInventoryProcessingId, DbType.Int32);
            parameters.Add("@ProcessedDate", DateTime.Now, DbType.DateTime);
            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                connection.Execute(insertSql, parameters);
            }
        }
Exemple #19
0
        public void InsertPixGeneralLedgerProcessing(PixGeneralLedgerProcessing pixGeneralLedgerProcessing)
        {
            const string insertInventorySyncProcessing = @"INSERT INTO [dbo].[ManhattanPerpetualInventoryTransferGeneralLedgerProcessing]
                                                            ([ManhattanPerpetualInventoryTransferId]
                                                            ,[ProcessedDate])
                                                            VALUES
                                                            (@ManhattanPerpetualInventoryTransferId
                                                            ,@ProcessedDate)";

            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                connection.Open();
                connection.Execute(insertInventorySyncProcessing, pixGeneralLedgerProcessing);
            }
        }
Exemple #20
0
        public void InsertManhattanShipmentBrickAndClickProcessing(ManhattanShipmentBrickAndClickProcessing manhattanShipmentBrickAndClickProcessing)
        {
            const string insertSql = @"INSERT INTO ManhattanShipmentBncGlProcessing(PickticketControlNumber, BatchControlNumber, ProcessedDate)
                                       VALUES(@PickticketControlNumber, @BatchControlNumber, @ProcessedDate)";

            var parameters = new DynamicParameters();

            parameters.Add("@ProcessedDate", DateTime.Now, DbType.DateTime);
            parameters.Add("@PickticketControlNumber", manhattanShipmentBrickAndClickProcessing.PickticketControlNumber, DbType.String);
            parameters.Add("@BatchControlNumber", manhattanShipmentBrickAndClickProcessing.BatchControlNumber, DbType.String);

            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                connection.Execute(insertSql, parameters);
            }
        }
        public void SetAsReceived(InventorySyncProcessing inventorySyncProcessing)
        {
            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                var parameter = new
                {
                    inventorySyncProcessing.TransactionNumber,
                    inventorySyncProcessing.ReceivedDate,
                    inventorySyncProcessing.ManhattanDateCreated,
                    inventorySyncProcessing.ManhattanTimeCreated
                };

                connection.Open();
                connection.Execute("sp_InsertInventorySyncProcessing", parameter, commandType: CommandType.StoredProcedure);
            }
        }
        public AuroraPickTicket GetAuroraPickTicket(string pickTicketControlNumber)
        {
            const string headerSql = "SELECT * FROM AuroraPickTicketHeader WHERE PickticketControlNumber = @PickTicketControlNumber";
            const string detailSql = "SELECT * FROM AuroraPickTicketDetail WHERE PickticketControlNumber = @PickTicketControlNumber";
            var          parameter = new DynamicParameters();

            parameter.Add("@PickTicketControlNumber", pickTicketControlNumber.Split('-')[0]);

            var auroraPickTicket = new AuroraPickTicket();

            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                auroraPickTicket.Header  = connection.Query <ManhattanPickTicketHeader>(headerSql, parameter).SingleOrDefault();
                auroraPickTicket.Details = connection.Query <ManhattanPickTicketDetail>(detailSql, parameter).ToList();
            }

            return(auroraPickTicket);
        }
Exemple #23
0
        public IList <ManhattanShipment> FindManhattanShipmentHeaders(ManhattanShipmentSearchCriteria criteria)
        {
            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                var parameters = new DynamicParameters();
                parameters.Add("@ShipTo", criteria.ShipTo, DbType.String);
                parameters.Add("@BncAuroraProcessing", criteria.UnprocessedForAuroraShipment, DbType.Boolean);
                parameters.Add("@BncGeneralLedgerProcessing", criteria.UnprocessedForAuroraShipmentGeneralLedger, DbType.Boolean);
                connection.Open();

                var headers = connection.Query <ManhattanShipmentHeader>("sp_FindManhattanShipmentHeader",
                                                                         parameters,
                                                                         commandType: CommandType.StoredProcedure);

                var manhattanShipments = new List <ManhattanShipment>();

                foreach (var manhattanShipmentHeader in headers)
                {
                    var manhattanShipment = new ManhattanShipment {
                        Header = manhattanShipmentHeader
                    };
                    var lineItemParameters = new DynamicParameters();
                    lineItemParameters.Add("@PickTicketControlNumber", manhattanShipmentHeader.PickticketControlNumber);
                    lineItemParameters.Add("@BatchControlNumber", manhattanShipmentHeader.BatchControlNumber);

                    manhattanShipment.LineItems = connection.Query <ManhattanShipmentLineItem>("sp_GetManhattanShipmentLineItem",
                                                                                               lineItemParameters,
                                                                                               commandType: CommandType.StoredProcedure).ToList();

                    manhattanShipment.ManhattanShipmentCartonHeader = connection.Query <ManhattanShipmentCartonHeader>("sp_GetManhattanShipmentCartonHeader",
                                                                                                                       lineItemParameters,
                                                                                                                       commandType: CommandType.StoredProcedure).ToList();

                    manhattanShipment.ManhattanShipmentCartonDetails = connection.Query <ManhattanShipmentCartonDetail>("sp_GetManhattanShipmentCartonDetails",
                                                                                                                        lineItemParameters,
                                                                                                                        commandType: CommandType.StoredProcedure).ToList();

                    manhattanShipments.Add(manhattanShipment);
                }

                return(manhattanShipments);
            }
        }
        private static void SetAsProcessed(IEnumerable <PurchaseReturn> purchaseReturns)
        {
            foreach (var purchaseReturn in purchaseReturns)
            {
                foreach (var lineItem in purchaseReturn.Items)
                {
                    var parameters = new DynamicParameters();
                    parameters.Add("@rowId", lineItem.ExternalId);
                    parameters.Add("@ProcessedDate", DateTime.Now);

                    using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
                    {
                        connection.Execute("sp_InsertReturnReasonFromROWProcessing",
                                           parameters,
                                           commandType: CommandType.StoredProcedure);
                    }
                }
            }
        }
        public void InsertOmsManhattanOrderMapRepository(OmsManhattanOrderMap omsManhattanOrderMap)
        {
            const string insertOmsOrderMap = @"INSERT INTO [dbo].[OmsManhattanOrderMap]
                                                            ([OMSOrderNumber]
                                                            ,[WmOrderNumber]
                                                            ,[Created]
                                                            ,[Company])
                                                            VALUES
                                                            (@OMSOrderNumber
                                                            ,@WmOrderNumber
                                                            ,@Created
                                                            ,@Company)";

            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                connection.Open();
                connection.Execute(insertOmsOrderMap, omsManhattanOrderMap);
            }
        }
        public OmsManhattanOrderMap GetOmsManhattanOrderMap(OmsManhattanOrderMapFindCriteria criteria)
        {
            const string findOmsManhattanOrder = @"SELECT [OMSOrderNumber]
                                                            ,[WmOrderNumber]
                                                            ,[Created]
                                                            ,[Company]
                                                   FROM OmsManhattanOrderMap
                                                   WHERE OMSOrderNumber = @OmsOrderNumber
                                                   OR WmOrderNumber = @WmOrderNumber";

            var parameters = new DynamicParameters();

            parameters.Add("@OmsOrderNumber", criteria.OmsOrderNumber);
            parameters.Add("@WmOrderNumber", criteria.ManhattanOrderNumber);

            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                connection.Open();
                return(connection.Query <OmsManhattanOrderMap>(findOmsManhattanOrder, parameters).SingleOrDefault());
            }
        }
Exemple #27
0
        public void SetAsProcessed(IEnumerable <Models.ShipmentCancellationEmail> emails)
        {
            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                var orderNumberTable = new DataTable();
                orderNumberTable.Columns.Add("IDInterfaceShipmentConfirmationHeader");
                foreach (var email in emails)
                {
                    orderNumberTable.Rows.Add(email.OrderNumber);
                }

                var parameter = new
                {
                    OrderNumberTable = orderNumberTable.AsTableValuedParameter("[dbo].[OrderNumberTable]"),
                    Status           = "READ"
                };

                connection.Open();
                connection.Execute("[sp_UpdateShipmentEmailStatus]", parameter, commandType: CommandType.StoredProcedure);
            }
        }
        public void InsertPixInventoryAdjustmentProcessing(IList <PixInventoryAdjustment> pixInventoryAdjustments)
        {
            using (var connection = DatabaseConnectionFactory.GetWarehouseManagementTransactionConnection())
            {
                var inventoryPixProcessingTable = new DataTable();

                inventoryPixProcessingTable.Columns.Add("ManhattanPerpetualInventoryTransferId");
                inventoryPixProcessingTable.Columns.Add("ManhattanDateCreated");
                inventoryPixProcessingTable.Columns.Add("ManhattanTimeCreated");

                foreach (var adj in pixInventoryAdjustments)
                {
                    inventoryPixProcessingTable.Rows.Add(adj.ManhattanPerpetualInventoryTransferId, adj.ManhattanDateCreated, adj.ManhattanTimeCreated);
                }

                var parameter = new
                {
                    InventoryPixProcessingTable = inventoryPixProcessingTable.AsTableValuedParameter("[dbo].[InventoryPixProcessingTable]")
                };

                connection.Open();
                connection.Execute("sp_InsertInventoryPixProcessing", parameter, commandType: CommandType.StoredProcedure);
            }
        }