コード例 #1
0
 public bool AddReg(AReg reg)
 {
     using (DataClassesTourGuideDataContext dc = new DataClassesTourGuideDataContext())
     {
         Registration registration = new Registration();
         registration.IsSentEmail = 0;
         registration.IsPaid = 0;
         registration.Attended = 0;
         registration.RegFirstName = reg.RegFirstName;
         registration.RegLastName = reg.RegLastName;
         registration.RegBirthday = reg.RegBirthday;
         registration.TourDate = reg.TourDate;
         registration.TourID = System.Guid.Parse(reg.TourID);
         registration.UserID = System.Guid.Parse(reg.UserID);
         registration.RegTime = DateTime.Now;
         registration.WillAttend = (byte)(reg.WillAttend?1:0);
         registration.RegID = System.Guid.NewGuid();
         dc.Registrations.InsertOnSubmit(registration);
         dc.SubmitChanges();
         return true;
     }
 }
コード例 #2
0
 partial void DeleteRegistration(Registration instance);
コード例 #3
0
 partial void UpdateRegistration(Registration instance);
コード例 #4
0
 partial void InsertRegistration(Registration instance);
コード例 #5
0
		private void detach_Registrations(Registration entity)
		{
			this.SendPropertyChanging();
			entity.Event = null;
		}
コード例 #6
0
		private void attach_Registrations(Registration entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}