public ActionResult Edit(Category category) { if (ModelState.IsValid) { db.Entry(category).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(category)); }
public ActionResult Edit(Warehouse warehouse) { if (ModelState.IsValid) { db.Entry(warehouse).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(warehouse)); }
public ActionResult Edit(Suppliers suppliers) { if (ModelState.IsValid) { db.Entry(suppliers).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(suppliers)); }
public ActionResult Edit(WarehouseProducts warehouseproducts) { if (ModelState.IsValid) { db.Entry(warehouseproducts).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.idProducts = new SelectList(db.Products, "id", "name", warehouseproducts.idProducts); ViewBag.idWarehouse = new SelectList(db.Warehouse, "id", "description", warehouseproducts.idWarehouse); return(View(warehouseproducts)); }
public ActionResult Edit(Bill bill) { if (ModelState.IsValid) { db.Entry(bill).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.client_Id = new SelectList(db.Client, "id", "name", bill.client_Id); ViewBag.employee_Id = new SelectList(db.Employee, "id", "name", bill.employee_Id); return(View(bill)); }
public ActionResult Edit(Products products) { if (ModelState.IsValid) { db.Entry(products).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.brand_Id = new SelectList(db.Brand, "id", "name", products.brand_Id); ViewBag.category_Id = new SelectList(db.Category, "id", "name", products.category_Id); return(View(products)); }
public ActionResult Edit(ProductSuppliers productsuppliers) { if (ModelState.IsValid) { db.Entry(productsuppliers).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.products_Id = new SelectList(db.Products, "id", "name", productsuppliers.products_Id); ViewBag.suppliers_Id = new SelectList(db.Suppliers, "id", "name", productsuppliers.suppliers_Id); return(View(productsuppliers)); }
public ActionResult Edit(BillDetail billdetail) { if (ModelState.IsValid) { db.Entry(billdetail).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.bill_Id = new SelectList(db.Bill, "id", "paymentType", billdetail.bill_Id); ViewBag.products_Id = new SelectList(db.Products, "id", "name", billdetail.products_Id); return(View(billdetail)); }