コード例 #1
0
 //insert
 public void Insert(Organisation newOrg)
 {
     dataAccess.Organisations.InsertOnSubmit(newOrg);
     dataAccess.SubmitChanges();
 }
コード例 #2
0
 //insert
 public void Insert(Organisation newOrg)
 {
     _db.Organisations.InsertOnSubmit(newOrg);
     _db.SubmitChanges();
 }
コード例 #3
0
        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});
            }
        }
コード例 #4
0
		private void detach_Organisations(Organisation entity)
		{
			this.SendPropertyChanging();
			entity.Contact = null;
		}
コード例 #5
0
 partial void DeleteOrganisation(Organisation instance);
コード例 #6
0
 partial void UpdateOrganisation(Organisation instance);
コード例 #7
0
 partial void InsertOrganisation(Organisation instance);