コード例 #1
0
        //
        // /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});
        }
コード例 #2
0
 //insert
 public void Insert(Directorate newOrg)
 {
     dataAccess.Directorates.InsertOnSubmit(newOrg);
     dataAccess.SubmitChanges();
 }
コード例 #3
0
		private void detach_Directorates(Directorate entity)
		{
			this.SendPropertyChanging();
			entity.Contact = null;
		}
コード例 #4
0
 partial void DeleteDirectorate(Directorate instance);
コード例 #5
0
 partial void UpdateDirectorate(Directorate instance);
コード例 #6
0
 partial void InsertDirectorate(Directorate instance);
コード例 #7
0
		private void detach_Directorates(Directorate entity)
		{
			this.SendPropertyChanging();
			entity.Organisation = null;
		}