Beispiel #1
0
        internal ReasonChangesEntity Add(ReasonChangesEntity obje)
        {
            ReasonChangesEntity ReasonChanges = db.ReasonChangesEntities.Add(obje);

            db.SaveChanges();
            return(ReasonChanges);
        }
Beispiel #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            ReasonChangesEntity reasonChangesEntity = db.Find(id);

            db.Remove(reasonChangesEntity);

            return(RedirectToAction("Index"));
        }
Beispiel #3
0
 public ActionResult Edit([Bind(Include = "ReasonChangesID,Description,Status,DateChanges,OrderID")] ReasonChangesEntity reasonChangesEntity)
 {
     if (ModelState.IsValid)
     {
         db.Change(reasonChangesEntity);
         return(RedirectToAction("Index"));
     }
     ViewBag.OrderID = new SelectList(of.ToList(), "OrderID", "Description", reasonChangesEntity.OrderID);
     return(View(reasonChangesEntity));
 }
Beispiel #4
0
        // GET: Reason/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ReasonChangesEntity reasonChangesEntity = db.Find(id);

            if (reasonChangesEntity == null)
            {
                return(HttpNotFound());
            }
            return(View(reasonChangesEntity));
        }
Beispiel #5
0
        // GET: Reason/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ReasonChangesEntity reasonChangesEntity = db.Find(id);

            if (reasonChangesEntity == null)
            {
                return(HttpNotFound());
            }
            ViewBag.OrderID = new SelectList(of.ToList(), "OrderID", "Description", reasonChangesEntity.OrderID);
            return(View(reasonChangesEntity));
        }
 public ReasonChangesEntity Remove(ReasonChangesEntity obje)
 {
     return(ob.Remove(obje));
 }
        public bool Change(ReasonChangesEntity obje)
        {
            ob.Change(obje);

            return(true);
        }
        public bool Add(ReasonChangesEntity obje)
        {
            ob.Add(obje);

            return(true);
        }
Beispiel #9
0
 internal bool Change(ReasonChangesEntity obje)
 {
     db.Entry(obje).State = EntityState.Modified;
     db.SaveChanges();
     return(true);
 }