static public Potential <Transaction> New(DetailAccount destination, Quantity amount) { return(new Potential <Transaction> { account = destination, amount = amount, }); }
static public Person New(string first_name, string last_name, Date date_of_birth) { return(new Person { first_name = first_name, last_name = last_name, date_of_birth = date_of_birth, income_account = DetailAccount.New(Currency.CAD), }); }
public IActionResult DeleteDetailAccount(long id) { DetailAccount fin = Detail_repo.Find(id); if (fin == null) { return(NotFound()); } Detail_repo.Delete(fin); return(Ok()); }
public async Task <Guid> Handle(CreateDetailAccountCommand request, CancellationToken cancellationToken) { var entity = new DetailAccount { DetailAccountIdByCustomer = request.DetailAccountIdByCustomer, DetailAccountNameAr = request.DetailAccountNameAr, DetailAccountNameEn = request.DetailAccountNameEn, CustomerId = request.CustomerId, GeneralLeadgerId = request.GeneralLeadgerId, MainAccountId = request.MainAccountId, TotalAccountId = request.TotalAccountId }; _context.DetailAccounts.Add(entity); await _context.SaveChangesAsync(cancellationToken); return(entity.Id); }
public IActionResult AddDetailAccount([FromBody] DetailAccount model) { Detail_repo.Add(model); return(new OkObjectResult(new { DetailAccountID = model.DetailAccountId })); }