Пример #1
0
        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;
            query.Price          = appt.Price;
            db.SubmitChanges();
        }
Пример #2
0
        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();
        }
Пример #3
0
        public static void InsertAppointment(CarScheduling appt)
        {
            if (appt == null)
            {
                return;
            }
            SchedulingDataClassesDataContext db = new SchedulingDataClassesDataContext();

            appt.ID = appt.GetHashCode();
            db.CarSchedulings.InsertOnSubmit(appt);
            db.SubmitChanges();
        }
 partial void DeleteCarScheduling(CarScheduling instance);
 partial void UpdateCarScheduling(CarScheduling instance);
 partial void InsertCarScheduling(CarScheduling instance);