//
        // /Directorate/Create/1
        public ActionResult Create(int id,string DirName, string DirShortDescription, string TypeOfBusinessID, int? ContactID,
            string AddressLine1, string AddressLine2, string AddressLine3, string DirFullDescription, string PhoneNumber,
            string PostCode, string Fax, string CityTown, string Email, string County, string WebAddress,
            int CountryID, int? CharityNumber, int? CompanyNumber)
        {
            Directorate newDir = new Directorate();

            newDir.DirName = DirName;
            newDir.DirShortDescription = DirShortDescription;
            newDir.TypeOfBusiness = TypeOfBusinessID;
            newDir.LeadContactID = ContactID;
            newDir.DirAddr1 = AddressLine1;
            newDir.DirAddr2 = AddressLine2;
            newDir.DirAddr3 = AddressLine3;
            newDir.DirFullDescription = DirFullDescription;
            newDir.DirPhone = PhoneNumber;
            newDir.DirPostCode = PostCode;
            newDir.DirFax = Fax;
            newDir.CityTown = CityTown;
            newDir.DirEmail = Email;
            newDir.County = County;
            newDir.DirWebAddr = WebAddress;
            newDir.CountryID = CountryID;
            newDir.DirCharNumb = CharityNumber;
            newDir.DirCompNumb = CompanyNumber;

            newDir.OrgID = id;
            newDir.DirIsActive = 1;

            directorateModel.Insert(newDir);
            ViewBag.Alert = "true";
            ViewBag.Message = "Action success!";
            ViewBag.URL = "/Directorate/Amend/" + newDir.DirID;

            return View("../Shared/Redirect");
            //return RedirectToAction("Amend", "Directorate", new { id = newDir.DirID});
        }
 //insert
 public void Insert(Directorate newOrg)
 {
     dataAccess.Directorates.InsertOnSubmit(newOrg);
     dataAccess.SubmitChanges();
 }
		private void detach_Directorates(Directorate entity)
		{
			this.SendPropertyChanging();
			entity.Contact = null;
		}
 partial void DeleteDirectorate(Directorate instance);
 partial void UpdateDirectorate(Directorate instance);
 partial void InsertDirectorate(Directorate instance);
		private void detach_Directorates(Directorate entity)
		{
			this.SendPropertyChanging();
			entity.Organisation = null;
		}