public async Task <IActionResult> Edit(int id, [Bind("ID,PayDate,PayItem,Price,Payer,Payment,CostType,StartDate,EndDate,ForMonth")] CashRow cashRow) { if (id != cashRow.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(cashRow); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CashRowExists(cashRow.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(cashRow)); }
public async Task <IActionResult> Create([Bind("ID,PayDate,PayItem,Price,Payer,Payment,CostType,StartDate,EndDate,ForMonth")] CashRow cashRow) { if (ModelState.IsValid) { _context.Add(cashRow); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(cashRow)); }
public void AddCashRow(CashRow row) { this.Rows.Add(row); }
public CashRowChangeEvent(CashRow row, System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; }
public void RemoveCashRow(CashRow row) { this.Rows.Remove(row); }