public void AddTransaction(LogiNextTransaction newTransaction)
        {
            transactionList.Add(newTransaction);

            if (newTransaction.OrderStatus.Equals("Delivered", StringComparison.InvariantCultureIgnoreCase) || newTransaction.OrderStatus.Equals("Dostarczony", StringComparison.InvariantCultureIgnoreCase))
            {
                if (newTransaction.PaymentSubType.Equals("CASH", StringComparison.InvariantCultureIgnoreCase))
                {
                    cash += newTransaction.OrderValue;
                }
                else if (newTransaction.PaymentSubType.Equals("CARD_MANUAL", StringComparison.InvariantCultureIgnoreCase))
                {
                    card += newTransaction.OrderValue;
                }
                else if (newTransaction.PaymentSubType.Equals("COD OTHER", StringComparison.InvariantCultureIgnoreCase))
                {
                    totalOtherCOD += newTransaction.OrderValue;
                }
                else if (newTransaction.PaymentType.Equals("Prepaid", StringComparison.InvariantCultureIgnoreCase))
                {
                    online += newTransaction.OrderValue;
                }

                totalDelivered += newTransaction.OrderValue;
                orderCount++;
            }
            else
            {
                totalOther += newTransaction.OrderValue;
                orderCountOther++;
            }
        }
Exemple #2
0
        public void AddTransaction(LogiNextTransaction transaction)
        {
            if (!driverDict.ContainsKey(transaction.DriverID))
            {
                LogiNextDriver newDriver = new LogiNextDriver(transaction.DriverID, transaction.DriverName);
                driverDict.Add(newDriver.DriverID, newDriver);
                driverList.Add(newDriver);
            }

            driverDict[transaction.DriverName].AddTransaction(transaction);
        }