void Awake() { if (instance == null) { instance = this; } }
public bool addItem(Item_Detail newItem) { using (objItem) { objItem.Item_Details.InsertOnSubmit(newItem); objItem.SubmitChanges(); return true; } }
public ActionResult Create(Item_Detail newItem, FormCollection collection) { try { // TODO: Add insert logic here newItem.item_description = collection["item_description"]; itemObj.addItem(newItem); return RedirectToAction("Create"); } catch { return View(); } }