public ActionResult DeleteConfirmed(long id)
        {
            Syain syain = db.Syains.Find(id);

            db.Syains.Remove(syain);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,SyainName,No,Email")] Syain syain)
 {
     if (ModelState.IsValid)
     {
         db.Entry(syain).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(syain));
 }
        public ActionResult Create([Bind(Include = "Id,SyainName,No,Email")] Syain syain)
        {
            if (ModelState.IsValid)
            {
                db.Syains.Add(syain);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(syain));
        }
        // GET: Syains/Edit/5
        public ActionResult Edit(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Syain syain = db.Syains.Find(id);

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