Esempio n. 1
0
 public ActionResult Edit([Bind(Include = "CariUyruk_ID,CariUyruk_Adi,CariUyruk_Status,CariUyruk_CreateDate")] CariUyruk cariUyruk)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cariUyruk).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cariUyruk));
 }
Esempio n. 2
0
        public ActionResult Create([Bind(Include = "CariUyruk_ID,CariUyruk_Adi,CariUyruk_Status,CariUyruk_CreateDate")] CariUyruk cariUyruk)
        {
            if (ModelState.IsValid)
            {
                cariUyruk.CariUyruk_Status     = (int)DBStatus.Active;
                cariUyruk.CariUyruk_CreateDate = DateTime.Now;
                db.CariUyruk.Add(cariUyruk);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(cariUyruk));
        }
Esempio n. 3
0
        // GET: CariUyruk/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CariUyruk cariUyruk = db.CariUyruk.Find(id);

            if (cariUyruk == null)
            {
                return(HttpNotFound());
            }
            return(View(cariUyruk));
        }
Esempio n. 4
0
        // GET: CariUyruk/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CariUyruk cariUyruk = db.CariUyruk.Find(id);

            if (cariUyruk == null)
            {
                return(HttpNotFound());
            }
            cariUyruk.CariUyruk_Status = (int)DBStatus.Deleted;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }