Esempio n. 1
0
 public ScheduleEvent(Event.Event @event, Schedule.Schedule schedule)
 {
     EventId    = @event.Id;
     ScheduleId = schedule.Id;
     Event      = @event;
     Schedule   = schedule;
 }
Esempio n. 2
0
        public String ValidateSchedule(Schedule.Schedule schedule, Registration.Registration vehicle)
        {
            String information = "";

            try
            {

                if (comboBoxCountry.SelectedItem.ToString() == Registration.Country.country_name.Ecuador.ToString())
                {
                    vehicle = new Registration.EcuadorRegistration(this.textBoxRegistration.Text);

                    schedule = new Schedule.EcuadorSchedule();

                    DateTime dt = new DateTime();

                    dt = Convert.ToDateTime(dateTimePicker.Text);

                    if (!(schedule as Schedule.EcuadorSchedule).EcuadorValidator(vehicle, dt))

                        information = "El vehículo con matrícula " + vehicle.Number + " no puede conducir en la ciudad de Quito entre las las 7:00 y las 9:30 en la mañana y entre las 16:00 y las 19:30 en la tarde y noche.";
                    else
                        information = "El vehículo con matrícula " + vehicle.Number + " puede conducir libremente en la ciudad de Quito en la fecha seleccionada.";
                }
                else
                    information = "Información solo disponible para " + Registration.Country.country_name.Ecuador.ToString();

            }
            catch (Exception exception)
            {
                information = exception.Message;
            }

            return information;
        }
Esempio n. 3
0
 private void btnAddSubscription_Click(object sender, EventArgs e)
 {
     try
     {
         Schedule.Schedule schedule = new Schedule.Schedule(PROF_IT.Common.Enumerations.TypeForm.NewForm);
         if (schedule.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             TaskScheduleObject taskSchedule = new TaskScheduleObject();
             taskSchedule.Schedule = schedule.ScheduleMember;
             taskSchedule.Task     = TaskMember;
             taskSchedule.State    = PROF_IT.Common.Enumerations.ObjectState.Created;
             TaskMember.Subscriptions.Add(taskSchedule);
             gdcSubscription.DataSource = TaskMember.Subscriptions.GetActive();
         }
     }
     catch (System.Exception exception1)
     {
         System.Exception thisException = exception1;
         Management.ShowException(thisException);
     }
 }
Esempio n. 4
0
        public String ValidateSchedule(Schedule.Schedule schedule, Registration.Registration vehicle)
        {
            String information = "";

            try
            {
                if (comboBoxCountry.SelectedItem.ToString() == Registration.Country.country_name.Ecuador.ToString())
                {
                    vehicle = new Registration.EcuadorRegistration(this.textBoxRegistration.Text);

                    schedule = new Schedule.EcuadorSchedule();

                    DateTime dt = new DateTime();

                    dt = Convert.ToDateTime(dateTimePicker.Text);

                    if (!(schedule as Schedule.EcuadorSchedule).EcuadorValidator(vehicle, dt))
                    {
                        information = "El vehículo con matrícula " + vehicle.Number + " no puede conducir en la ciudad de Quito entre las las 7:00 y las 9:30 en la mañana y entre las 16:00 y las 19:30 en la tarde y noche.";
                    }
                    else
                    {
                        information = "El vehículo con matrícula " + vehicle.Number + " puede conducir libremente en la ciudad de Quito en la fecha seleccionada.";
                    }
                }
                else
                {
                    information = "Información solo disponible para " + Registration.Country.country_name.Ecuador.ToString();
                }
            }
            catch (Exception exception)
            {
                information = exception.Message;
            }

            return(information);
        }