public ActionResult Edit(Supplier supplier) { if (ModelState.IsValid && Supplier.Update(supplier)) { return RedirectToAction("Index"); } return View(supplier); }
/// <summary> /// Deprecated Method for adding a new object to the Suppliers EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToSuppliers(Supplier supplier) { base.AddObject("Suppliers", supplier); }
/// <summary> /// Create a new Supplier object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="name">Initial value of the Name property.</param> /// <param name="phone">Initial value of the Phone property.</param> /// <param name="address">Initial value of the Address property.</param> /// <param name="contact_name">Initial value of the Contact_name property.</param> public static Supplier CreateSupplier(global::System.Int32 id, global::System.String name, global::System.String phone, global::System.String address, global::System.String contact_name) { Supplier supplier = new Supplier(); supplier.Id = id; supplier.Name = name; supplier.Phone = phone; supplier.Address = address; supplier.Contact_name = contact_name; return supplier; }