public ActionResult Create([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.Clients.Add(client); db.SaveChanges(); return RedirectToAction("Index"); } return View(client); }
public ActionResult Create([Bind(Include = "Product_ID,Product_Name,Product_Price,Product_DDV_Percent,Product_Price_with_DDV,Firm_ID")] Product product) { if (ModelState.IsValid) { db.Products.Add(product); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Firm_ID = new SelectList(db.Firms, "Firm_ID", "Firm_Name", product.Firm_ID); return(View(product)); }
public ActionResult Create([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.Fakturas.Add(faktura); 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)); }