Esempio n. 1
0
 public bool addItem(Vendor_Detail newVendor)
 {
     using (objVendor)
     {
         objVendor.Vendor_Details.InsertOnSubmit(newVendor);
         objVendor.SubmitChanges();
         return true;
     }
 }
Esempio n. 2
0
        public ActionResult Create(Vendor_Detail newVendor, FormCollection collection)
        {
            try
            {
                // TODO: Add insert logic here

                newVendor.vendor_address = collection["vendor_address"];

                vendorObj.addItem(newVendor);

                return RedirectToAction("Create");
            }
            catch
            {
                return View();
            }
        }