Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            datang datang = db.datang.Find(id);

            db.datang.Remove(datang);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "id,uid,name,password,grp,time,other")] datang datang)
 {
     if (ModelState.IsValid)
     {
         db.Entry(datang).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(datang));
 }
Ejemplo n.º 3
0
 public ActionResult Create([Bind(Include = "id,uid,name,password,grp,time,other")] datang datang)
 {
     if (ModelState.IsValid)
     {
         db.datang.Add(datang);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(datang));
 }
Ejemplo n.º 4
0
        // GET: datangs/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            datang datang = db.datang.Find(id);

            if (datang == null)
            {
                return(HttpNotFound());
            }
            return(View(datang));
        }