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

            db.ref_Department.Remove(ref_Department);
            db.SaveChanges();
            return(RedirectToAction("Create"));
        }
 public ActionResult Edit([Bind(Include = "DeptID,DeptCode,DeptDescription")] ref_Department ref_Department)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ref_Department).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Create"));
     }
     return(View(ref_Department));
 }
        public ActionResult Create([Bind(Prefix = "Item1", Include = "DeptID,DeptCode,DeptDescription")] ref_Department ref_Department)
        {
            if (ModelState.IsValid)
            {
                db.ref_Department.Add(ref_Department);
                db.SaveChanges();
                return(RedirectToAction("Create"));
            }

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

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