示例#1
0
        public ActionResult DeleteConfirmed(string id)
        {
            EMPINFO eMPINFO = db.EMPINFOes.Find(id);

            db.EMPINFOes.Remove(eMPINFO);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "EmpID,Imię,Wiek,Stan_Konta")] EMPINFO eMPINFO)
 {
     if (ModelState.IsValid)
     {
         db.Entry(eMPINFO).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(eMPINFO));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "EmpID,Imię,Wiek,Stan_Konta")] EMPINFO eMPINFO)
        {
            if (ModelState.IsValid)
            {
                db.EMPINFOes.Add(eMPINFO);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(eMPINFO));
        }
示例#4
0
        // GET: EMPINFOes/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EMPINFO eMPINFO = db.EMPINFOes.Find(id);

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