public async Task <IActionResult> Edit(int id, [Bind("Id,DisplayName,Icon,Type,Ordinal,Path,ParentId,IsEnable")] TblMenu tblMenu) { if (id != tblMenu.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tblMenu); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblMenuExists(tblMenu.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tblMenu)); }
public async Task <IActionResult> Edit(int id, [Bind("ItemTypeId,ItemType")] TblItemType tblItemType) { if (id != tblItemType.ItemTypeId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tblItemType); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblItemTypeExists(tblItemType.ItemTypeId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tblItemType)); }
public async Task <IActionResult> Edit(string id, [Bind("AutoId,Id,PaymentDate,PartyName,Amount,PaymentMode,Remark,CreatedDatetime")] TblPayment tblPayment) { if (id != tblPayment.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tblPayment); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblPaymentExists(tblPayment.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["PartyName"] = new SelectList(_context.TblVendor, "Id", "Id", tblPayment.PartyName); return(View(tblPayment)); }
public async Task <IActionResult> Edit(string id, [Bind( "AutoId,SaleId,InvoiceId,InvoiceDate,CustomerId,DiscountAfterTax,OtherChargeAfterTax,SubTotal,Tax,TotalValueafterTax,RoundOff,GrandTotal,CreatedDatetime,ReverseCharge,Remark")] TblSale tblSale) { if (id != tblSale.SaleId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tblSale); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblSaleExists(tblSale.SaleId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["CustomerId"] = new SelectList(_context.TblVendor, "Id", "Name", tblSale.CustomerId); return(View(tblSale)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Gst,Sgst,Cgst,Igst,Comment,Name")] TblGst tblGst) { if (id != tblGst.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tblGst); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblGstExists(tblGst.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tblGst)); }
public async Task <IActionResult> Edit(string id, [Bind( "Id,PartyInvoiceDate,PurchaseDate,PartyInvoiceNo,PartyName,PaymentDueAfter,ReverseCharge,Remark,DiscountAmount,OtherCharge,TotalAmountBeforeTax,TaxAmount,TotalAmountAfterTax,RoundOff,GrandTotal,PurchaseBook,PaymentMode,ScanCopy,CreatedDatetime,Amount")] TblPurchase tblPurchase) { if (id != tblPurchase.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tblPurchase); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblPurchaseExists(tblPurchase.Id)) { return(NotFound()); } throw; } return(RedirectToAction(nameof(Index))); } ViewData["PartyName"] = new SelectList(_context.TblVendor, "Id", "Name", tblPurchase.PartyName); ViewData["PaymentMode"] = new SelectList(_context.TblPaymentMode, "Id", "Mode", tblPurchase.PaymentMode); return(View(tblPurchase)); }
public async Task <IActionResult> Edit(string id, [Bind("AutoId,Id,StockType,PurchaseId,SaleId,InvoiceNo,ItemId,Qty,PricePerUnit,ItemwiseDiscount,PricePerUnitAfterDiscount,TotalPriceBeforeTax,Sgst,Cgst,Igst,Gst,TotalPriceAfterTax,Mrp,ManufactureDate,Expirydate,BatchNo,CreatedDatetime")] TblItemStock tblItemStock) { if (id != tblItemStock.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tblItemStock); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblItemStockExists(tblItemStock.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["ItemId"] = new SelectList(_context.TblItems, "Id", "Id", tblItemStock.ItemId); ViewData["PurchaseId"] = new SelectList(_context.TblPurchase, "Id", "Id", tblItemStock.PurchaseId); ViewData["SaleId"] = new SelectList(_context.TblSale, "SaleId", "SaleId", tblItemStock.SaleId); return(View(tblItemStock)); }
public async Task <IActionResult> Edit(string id, [Bind("Id,Name,ContactPerson,ContactNo,PhoneNo,VendorType,Type,Place,Dob,Gstno,Tinno,Panno,Cinno,AdhaarNo,OpeningBalance,OpeningBalanceType,OpeningBalanceDate,CreditLimit,CreditPeriod,CreditInterestRate,DebitInterestRate,CreatedDatetime,Photo,Remark,SuretyPerson,SuretyPersonContactNo,SuretyPersonAddress")] TblVendor tblVendor) { if (id != tblVendor.Id) { return(NotFound()); } if (ModelState.IsValid) { try { //_context.Update(tblVendor).Property(x => x.AutoId).IsModified = false; _context.Update(tblVendor); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblVendorExists(tblVendor.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["Type"] = new SelectList(_context.TblVendorType, "Id", "Id", tblVendor.Type); return(View(tblVendor)); }
public async Task <IActionResult> Edit(string id, [Bind("AutoId,Id,VendorId,PurchaseId,SalesId,EntryId,EntryDate,EntryType,Amount,Status,CreatedDatetime,TransactionType,TransactionRef,PaymentId")] TblTransaction tblTransaction) { if (id != tblTransaction.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tblTransaction); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblTransactionExists(tblTransaction.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["PaymentId"] = new SelectList(_context.TblPayment, "Id", "Id", tblTransaction.PaymentId); ViewData["PurchaseId"] = new SelectList(_context.TblPurchase, "Id", "Id", tblTransaction.PurchaseId); ViewData["SalesId"] = new SelectList(_context.TblSale, "SaleId", "SaleId", tblTransaction.SalesId); ViewData["VendorId"] = new SelectList(_context.TblVendor, "Id", "Id", tblTransaction.VendorId); return(View(tblTransaction)); }
public async Task <IActionResult> Edit(string id, [Bind( "Id,Name,HsnSacNo,Type,MeasuringUnit,Manufacture,BarCode,ItemUniqueDescription,Supplier,Photo,UseBatchNo,UseMfgDate,UseExpiryDate,CreatedDatetime,Gst")] TblItems tblItems) { if (id != tblItems.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tblItems); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblItemsExists(tblItems.Id)) { return(NotFound()); } throw; } return(RedirectToAction(nameof(Index))); } ViewData["Gst"] = new SelectList(_context.TblGst, "Id", "Name", tblItems.Gst); ViewData["MeasuringUnit"] = new SelectList(_context.TblItemUnits, "MeasurintUnitId", "MeasuringUnits", tblItems.MeasuringUnit); ViewData["Supplier"] = new SelectList(_context.TblVendor, "Id", "Name", tblItems.Supplier); ViewData["Type"] = new SelectList(_context.TblItemType, "ItemTypeId", "ItemType", tblItems.Type); return(View(tblItems)); }