public ActionResult DeleteConfirmed(int id)
        {
            Exprience exprience = db.Exprience.Find(id);

            db.Exprience.Remove(exprience);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Companyname,Companyspecial,Minidesc")] Exprience exprience)
 {
     if (ModelState.IsValid)
     {
         db.Entry(exprience).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(exprience));
 }
Esempio n. 3
0
 public ActionResult Edit([Bind(Include = "Id,Position,Location,Description,EndDate")] Exprience exprience)
 {
     if (ModelState.IsValid)
     {
         db.Entry(exprience).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(exprience));
 }
        public ActionResult Create([Bind(Include = "Id,Companyname,Companyspecial,Minidesc")] Exprience exprience)
        {
            if (ModelState.IsValid)
            {
                db.Exprience.Add(exprience);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(exprience));
        }
Esempio n. 5
0
        public ActionResult Create([Bind(Include = "Position,Location,Description,EndDate")] Exprience exprience)
        {
            if (ModelState.IsValid)
            {
                db.Expriences.Add(exprience);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(exprience));
        }
        // GET: Admin/Expriences/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Exprience exprience = db.Exprience.Find(id);

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