Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
 public void AddCashRow(CashRow row) {
     this.Rows.Add(row);
 }
Ejemplo n.º 4
0
 public CashRowChangeEvent(CashRow row, System.Data.DataRowAction action) {
     this.eventRow = row;
     this.eventAction = action;
 }
Ejemplo n.º 5
0
 public void RemoveCashRow(CashRow row) {
     this.Rows.Remove(row);
 }