Example #1
0
        private Spoil GetSpoilBy(string transactionRefNo)
        {
            var reader = _syncStoreProvider.GetSpoiltBy(transactionRefNo);

            if (!reader.Read())
            {
                return(null);
            }

            Spoil spoil = new Spoil();

            DataReaderHelper.DataReaderToObject(reader, spoil);

            return(spoil);
        }
Example #2
0
        //[Obsolete]
        //public async Task<TransactionDto> SyncTransactionWithCloud(TransactionDto trtSale)
        //{
        //    try
        //    {
        //        return await _apiClient.SendSingleSales(trtSale);
        //    }
        //    catch (Exception ex)
        //    {
        //        Log.Information(ex.Message);
        //        return null;
        //    }
        //}

        public Transaction GetLastTransaction()
        {
            var dr = _mssqlProvider.GetLastTransaction();

            if (!dr.Read())
            {
                return(null);
            }

            var txn = Transaction.Create(null);

            DataReaderHelper.DataReaderToObject(dr, txn);

            return(txn);
        }
Example #3
0
        private Transaction GetTransactionBy(string transactionRefNo)
        {
            var reader = _syncStoreProvider.GetTransactionBy(transactionRefNo);

            if (!reader.Read())
            {
                return(null);
            }

            Transaction txn = Transaction.Create(null);

            DataReaderHelper.DataReaderToObject(reader, txn);

            return(txn);
        }
Example #4
0
        public Spoil GetLastRetrievedSpoil()
        {
            var dr = _mssqlProvider.GetLastSpoil();

            if (!dr.Read())
            {
                return(null);
            }

            var spoil = new Spoil();

            DataReaderHelper.DataReaderToObject(dr, spoil);

            return(spoil);
            //return this.UnitOfWork.Repository<Spoil>().SqlQuery("EXEC [Sync].[Sp_GetLastSpoil]").FirstOrDefault();
        }