Exemple #1
0
        public async Task <string> CreateSellAsync(string correlationToken)
        {
            string result = String.Empty;

            try
            {
                Folio_Venta = Guid.NewGuid().ToString();
                StatusSell statusSell = new StatusSell(_statusSellRepository);
                Status = await statusSell.GetStatusSellByDesc("Activa");

                SellItems     = new Dictionary <string, SellItem>();
                Date          = DateTime.UtcNow;
                ItemsQuantity = 0;
                result        = await _sellRepository.Add(this, correlationToken);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
Exemple #2
0
        public async Task <string> CheckOutSellAsync(string folio_Venta, string correlationToken)
        {
            string result = String.Empty;

            try
            {
                await GetSellbyIdAsync(folio_Venta, correlationToken);

                StatusSell statusSell = new StatusSell(_statusSellRepository);
                statusSell = await statusSell.GetStatusSellByDesc("Checkout");

                Status = statusSell;

                result = await _sellRepository.Update(this, correlationToken);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }