public async Task <IActionResult> Edit(int id, [Bind("ChipSalesId,OnDate,PartyName,TruckNumber,PartyMobileNo,DriverName,DriverMobileNo,Size,Quantity,Rate,Amount,PaidAmount,ClearDate,Remarks,BillMaker,SlipNo")] ChipSales chipSales) { if (id != chipSales.ChipSalesId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(chipSales); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ChipSalesExists(chipSales.ChipSalesId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(chipSales)); }
public async Task <IActionResult> Create([Bind("ChipSalesId,OnDate,PartyName,TruckNumber,PartyMobileNo,DriverName,DriverMobileNo,Size,Quantity,Rate,Amount,PaidAmount,ClearDate,Remarks,BillMaker,SlipNo")] ChipSales chipSales) { if (ModelState.IsValid) { _context.Add(chipSales); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(chipSales)); }