Exemplo n.º 1
0
 public ActionResult Edit(MasterList masterlist)
 {
     if (ModelState.IsValid)
     {
         db.MasterList.Attach(masterlist);
         db.ObjectStateManager.ChangeObjectState(masterlist, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(masterlist);
 }
Exemplo n.º 2
0
        public ActionResult Create(MasterList masterlist)
        {
            if (ModelState.IsValid)
            {
                db.MasterList.AddObject(masterlist);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(masterlist);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the MasterList EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMasterList(MasterList masterList)
 {
     base.AddObject("MasterList", masterList);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Create a new MasterList object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="sSMA_TimeStamp">Initial value of the SSMA_TimeStamp property.</param>
 public static MasterList CreateMasterList(global::System.Int32 id, global::System.Byte[] sSMA_TimeStamp)
 {
     MasterList masterList = new MasterList();
     masterList.ID = id;
     masterList.SSMA_TimeStamp = sSMA_TimeStamp;
     return masterList;
 }