public bool CreateProgramme(Programme program)
 {
     //try
     {
         _db.Programmes.InsertOnSubmit(program);
         _db.SubmitChanges();
         return true;
     }
     //catch
     {
         //return false;
     }
 }
        public ActionResult Save(int? ContactID, FormCollection collection)
        {
            try
            {
                var pro = new Programme();
                pro.ProgrammeName = collection["ProgrammeName"];
                pro.Description = collection["Description"];
                pro.ContactID = ContactID;
                pro.ProgrammeIsActivate = 1;
                _db.CreateProgramme(pro);
                ViewBag.Alert = "true";
                ViewBag.Message = "Action success!";
                ViewBag.URL = "/Programme/List";

                return View("../Shared/Redirect");
                //return RedirectToAction("List");
            }
            catch (Exception ex)
            {
                ViewBag.Mess = ex.Message;
                return View("../Shared/Error");
            }
        }
		private void detach_Programmes(Programme entity)
		{
			this.SendPropertyChanging();
			entity.Contact = null;
		}
		private void attach_Programmes(Programme entity)
		{
			this.SendPropertyChanging();
			entity.Contact = this;
		}
 partial void DeleteProgramme(Programme instance);
 partial void UpdateProgramme(Programme instance);
 partial void InsertProgramme(Programme instance);