public static void RemoveAppointment(CarScheduling appt)
        {
            SchedulingDataClassesDataContext db = new SchedulingDataClassesDataContext();
            CarScheduling query = (CarScheduling)(from carSchedule in db.CarSchedulings where carSchedule.ID == appt.ID select carSchedule).SingleOrDefault();

            db.CarSchedulings.DeleteOnSubmit(query);
            db.SubmitChanges();
        }
        public static void InsertAppointment(CarScheduling appt)
        {
            if (appt == null)
            {
                return;
            }
            SchedulingDataClassesDataContext db = new SchedulingDataClassesDataContext();

            appt.ID = appt.GetHashCode();
            db.CarSchedulings.InsertOnSubmit(appt);
            db.SubmitChanges();
        }
        public static void UpdateAppointment(CarScheduling appt)
        {
            if (appt == null)
            {
                return;
            }
            SchedulingDataClassesDataContext db = new SchedulingDataClassesDataContext();
            CarScheduling query = (CarScheduling)(from carSchedule in db.CarSchedulings where carSchedule.ID == appt.ID select carSchedule).SingleOrDefault();

            query.ID             = appt.ID;
            query.StartTime      = appt.StartTime;
            query.EndTime        = appt.EndTime;
            query.AllDay         = appt.AllDay;
            query.Subject        = appt.Subject;
            query.Description    = appt.Description;
            query.Location       = appt.Location;
            query.RecurrenceInfo = appt.RecurrenceInfo;
            query.ReminderInfo   = appt.ReminderInfo;
            query.Status         = appt.Status;
            query.EventType      = appt.EventType;
            query.Label          = appt.Label;
            query.CarId          = appt.CarId;
            db.SubmitChanges();
        }
 partial void DeleteCarScheduling(CarScheduling instance);
 partial void UpdateCarScheduling(CarScheduling instance);
 partial void InsertCarScheduling(CarScheduling instance);