//insert
 public void Insert(Organisation newOrg)
 {
     dataAccess.Organisations.InsertOnSubmit(newOrg);
     dataAccess.SubmitChanges();
 }
 //insert
 public void Insert(Organisation newOrg)
 {
     _db.Organisations.InsertOnSubmit(newOrg);
     _db.SubmitChanges();
 }
        public ActionResult Create(string OrgName, string OrgShortDescription, string TypeOfBusinessID, int? ContactID,
            string AddressLine1, string PhoneNumber, string PostCode,
            int CountryID, decimal? CharityNumber, decimal? CompanyNumber, FormCollection collection)
        {
            if (OrgName == "")
            {
                ViewBag.ErrorMessage = "Please input the organisation name";
                return RedirectToAction("Add", "Organisation");
            }
            else
            {

                Organisation newOrg = new Organisation();

                newOrg.OrgName = OrgName;
                newOrg.OrgShortDescription = OrgShortDescription;
                newOrg.TypeOfBusiness = TypeOfBusinessID;
                newOrg.LeadContactID = ContactID;
                newOrg.OrgAddr1 = AddressLine1;
                newOrg.OrgAddr2 = collection["AddressLine2"];
                newOrg.OrgAddr3 = collection["AddressLine3"];
                newOrg.OrgFullDescription = collection["OrgFullDescription"];
                newOrg.OrgPhone = PhoneNumber;
                newOrg.OrgPostCode = PostCode;
                newOrg.OrgFax = collection["Fax"];
                newOrg.CityTown = collection["CityTown"];
                newOrg.OrgEmail = collection["Email"];
                newOrg.County = collection["County"];
                newOrg.OrgWebAddr = collection["WebAddress"];
                newOrg.CountryID = CountryID;
                newOrg.OrgCharNumb = CharityNumber;
                newOrg.OrgCompNumb = CompanyNumber;
                newOrg.OrgProgrammeList = "," + collection["EOIProgramme[]"] + ",";
                newOrg.OrgServiceList = "," + collection["EOIService[]"] + ",";
                newOrg.OrgIsActive = 1;
                newOrg.RefListID = "," + collection["OrganisationDetail2[]"] + ",";
                orgModel.Insert(newOrg);

                orgModel.AddLinkService(newOrg.OrgID, collection["EOIService[]"]);
                ViewBag.Alert = "true";
                ViewBag.Message = "Action success!";
                ViewBag.URL = "/Organisation/Amend/" + newOrg.OrgID;

                return View("../Shared/Redirect");
                //return RedirectToAction("Amend", "Organisation", new { id=newOrg.OrgID});
            }
        }
		private void detach_Organisations(Organisation entity)
		{
			this.SendPropertyChanging();
			entity.Contact = null;
		}
 partial void DeleteOrganisation(Organisation instance);
 partial void UpdateOrganisation(Organisation instance);
 partial void InsertOrganisation(Organisation instance);