public int AddNewItemSaleTransaction(ItemSaleTransaction transaction) { var input = new AddNewItemSaleTransactionInput { Sale = new ItemSaleTransactionDto(transaction) }; using (var repo = new ItemSaleTransactionRepository()) { var app = new ItemSaleTransactionAppService(repo); return(app.AddNewItemSaleTransaction(input).Id); } }
public void UpdateItemSaleTransaction(ItemSaleTransaction updatedTransaction) { var input = new UpdateItemSaleTransactionInput { Sale = new ItemSaleTransactionDto(updatedTransaction) }; try { using (var repo = new ItemSaleTransactionRepository()) { var app = new ItemSaleTransactionAppService(repo); app.UpdateItemSaleTransaction(input); } } catch (Exception ex) { MessageBox.Show(ex.Message, "UpdateItemSaleTransaction - Controller"); } }
public ItemSaleTransactionDto(ItemSaleTransaction sale) { CreditTransaction_ItemSale = sale.CreditTransaction_ItemSale; Items_ItemSaleTransaction = sale.Items_ItemSaleTransaction; }