public ActionResult Edit([Bind(Include = "Client_ID,Client_Name,Client_Email,Client_TFN,Client_Signature,Client_Address,Client_City,Client_State,Client_CityPostCode")] Client client)
 {
     if (ModelState.IsValid)
     {
         db.Entry(client).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(client);
 }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Product_ID,Product_Name,Product_Price,Product_DDV_Percent,Product_Price_with_DDV,Firm_ID")] Product product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Firm_ID = new SelectList(db.Firms, "Firm_ID", "Firm_Name", product.Firm_ID);
     return(View(product));
 }
 public ActionResult Edit([Bind(Include = "Faktura_ID,Firm_ID,Client_ID,Faktura_Status,Faktura_Suma,Faktura_DatumIzdavanje,Faktura_DatumDospevanje,Faktura_TotalDDV,Faktura_Zabeleska")] Faktura faktura)
 {
     if (ModelState.IsValid)
     {
         db.Entry(faktura).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Client_ID = new SelectList(db.Clients, "Client_ID", "Client_Name", faktura.Client_ID);
     ViewBag.Firm_ID   = new SelectList(db.Firms, "Firm_ID", "Firm_Name", faktura.Firm_ID);
     return(View(faktura));
 }