Пример #1
0
 public GetItemSaleTransactionByIdOutput GetItemSaleTransactionById(GetItemSaleTransactionByIdInput input)
 {
     return(new GetItemSaleTransactionByIdOutput
     {
         Sale = new ItemSaleTransactionDto(_itemSaleRepository.GetItemSaleTransactionById(input.Id))
     });
 }
        public ItemSaleTransaction GetItemSaleTransactionById(int id)
        {
            var input = new GetItemSaleTransactionByIdInput
            {
                Id = id
            };

            try
            {
                using (var repo = new ItemSaleTransactionRepository())
                {
                    var app = new ItemSaleTransactionAppService(repo);
                    return(app.GetItemSaleTransactionById(input).Sale.ConvertToItemSaleTransaction());
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "UpdateItemSaleTransaction - Controller");
                return(null);
            }
        }