public ActionResult Edit(timetable_module timetable_module)
 {
     if (ModelState.IsValid)
     {
         db.timetable_module.Attach(timetable_module);
         db.ObjectStateManager.ChangeObjectState(timetable_module, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(timetable_module);
 }
        public ActionResult Create(timetable_module timetable_module)
        {
            if (ModelState.IsValid)
            {
                db.timetable_module.AddObject(timetable_module);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(timetable_module);
        }
 /// <summary>
 /// Create a new timetable_module object.
 /// </summary>
 /// <param name="department_Code">Initial value of the Department_Code property.</param>
 /// <param name="part_Code">Initial value of the Part_Code property.</param>
 /// <param name="module_Code">Initial value of the Module_Code property.</param>
 /// <param name="module_Title">Initial value of the Module_Title property.</param>
 /// <param name="active">Initial value of the Active property.</param>
 public static timetable_module Createtimetable_module(global::System.String department_Code, global::System.String part_Code, global::System.String module_Code, global::System.String module_Title, global::System.Boolean active)
 {
     timetable_module timetable_module = new timetable_module();
     timetable_module.Department_Code = department_Code;
     timetable_module.Part_Code = part_Code;
     timetable_module.Module_Code = module_Code;
     timetable_module.Module_Title = module_Title;
     timetable_module.Active = active;
     return timetable_module;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the timetable_module EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotimetable_module(timetable_module timetable_module)
 {
     base.AddObject("timetable_module", timetable_module);
 }