public async Task <IActionResult> Edit(int id, [Bind("Bill_ID,Company_Name,Amount,type,Payment_Date")] Bill_Payment_Master bill_Payment_Master) { if (id != bill_Payment_Master.Bill_ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(bill_Payment_Master); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Bill_Payment_MasterExists(bill_Payment_Master.Bill_ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(bill_Payment_Master)); }
public async Task <IActionResult> Create([Bind("Bill_ID,Company_Name,Amount,type,Payment_Date")] Bill_Payment_Master bill_Payment_Master) { if (ModelState.IsValid) { _context.Add(bill_Payment_Master); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(bill_Payment_Master)); }