// GET: Disbursement/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var disbursement = await _disbursementRepo.GetByIdAsync((int)id); if (disbursement == null) { return(HttpNotFound()); } ViewBag.CollectionPointId = new SelectList(_collectionRepo.GetAll(), "CollectionPointId", "CollectionName", disbursement.CollectionPointId); return(View(disbursement)); }
public async Task <DisbursementDTO> Get(int id) { var disbursement = await _disbursementRepo.GetByIdAsync(id); return(new DisbursementDTO(disbursement)); }