public ActionResult Edit([Bind(Include = "ID,Name,Due,Paid")] Bill bill) { if (ModelState.IsValid) { db.Entry(bill).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bill)); }
public async Task <IActionResult> PutBillType(int id, BillType billType) { if (id != billType.Id) { return(BadRequest()); } _context.Entry(billType).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BillTypeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public ActionResult Edit([Bind(Include = "ID,Description")] Product product) { if (ModelState.IsValid) { db.Entry(product).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(product)); }
public ActionResult Edit([Bind(Include = "ID,BillAmount,BillName,BillInformation,BillDueDay,IsMandatoryBill,IsSavingsAccount,BillPaid")] Bill bill) { if (ModelState.IsValid) { db.Entry(bill).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(bill)); }
public async Task EditClient(Client client) { db.Entry(client).State = EntityState.Modified; await db.SaveChangesAsync(); }
public async Task EditCompany(Company company) { db.Entry(company).State = EntityState.Modified; await db.SaveChangesAsync(); }