void InsertAppointment()
        {
            ValidationSchedule schedule = SchedulerDataHelper.GetAppointmentToInsert <ValidationSchedule>(
                SchedulerDataHelper.CustomDataObject, SchedulerDemoHelper.CustomAppointmentStorage);

            if (schedule != null && TryValidateModel(schedule))
            {
                CarsDataProvider.InsertSchedule <ValidationSchedule>(schedule);
            }
            else
            {
                ViewData["EditableSchedule"] = schedule;
            }
        }
Exemplo n.º 2
0
        public override void Assign(ScheduleBase source)
        {
            base.Assign(source);
            ValidationSchedule validationSchedule = source as ValidationSchedule;

            if (validationSchedule != null)
            {
                Subject     = validationSchedule.Subject;
                Price       = validationSchedule.Price;
                StartTime   = validationSchedule.StartTime;
                EndTime     = validationSchedule.EndTime;
                Description = validationSchedule.Description;
                ContactInfo = validationSchedule.ContactInfo;
            }
        }