Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            FFLType ffltype = db.FFLTypes.Find(id);

            db.FFLTypes.Remove(ffltype);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
        //
        // GET: /FFLType/Delete/5

        public ActionResult Delete(int id = 0)
        {
            FFLType ffltype = db.FFLTypes.Find(id);

            if (ffltype == null)
            {
                return(HttpNotFound());
            }
            return(View(ffltype));
        }
Exemple #3
0
 public ActionResult Edit(FFLType ffltype)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ffltype).State = EntityState.Modified;
         int userid = int.Parse(Session.Contents["UserID"].ToString());
         ffltype.ModifiedBy   = userid;
         ffltype.ModifiedDate = DateTime.Now;
         return(RedirectToAction("Index"));
     }
     return(View(ffltype));
 }
Exemple #4
0
        public ActionResult Create([Bind(Exclude = "FFLType_Id")] FFLType ffltype)
        {
            if (ModelState.IsValid)
            {
                db.FFLTypes.Add(ffltype);
                int userid = int.Parse(Session.Contents["UserID"].ToString());
                ffltype.ModifiedBy   = userid;
                ffltype.ModifiedDate = DateTime.Now;

                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(ffltype));
        }