Exemplo n.º 1
0
        private void activityCombox_SelectedIndexChanged(object sender, EventArgs e)
        {
            string description = (string)activityCombox.SelectedItem;

            this.activity = service.FindActivityByName(description);

            BindingList <object> bingdingList = new BindingList <object>();

            string nameMonitor = "";

            if (activity.Instructor != null)
            {
                nameMonitor = activity.Instructor.Name;
            }
            bingdingList.Add(new
            {
                ds_day      = activity.ActivityDays,
                ds_name     = activity.Description,
                ds_duration = activity.Duration,
                ds_iniDate  = activity.StartDate,
                ds_finDate  = activity.FinishDate,
                ds_iniTime  = activity.StartHour,
                ds_min      = activity.MinimumEnrollments,
                ds_max      = activity.MaximumEnrollments,
                ds_precio   = activity.Price,
                ds_monitor  = nameMonitor
            }
                             );

            AddMonitorBindingSource.DataSource = bingdingList;
        }
Exemplo n.º 2
0
 private void comboBoxActividades_SelectedIndexChanged(object sender, EventArgs e)
 {
     actividadSeleccionada = service.FindActivityByName((string)comboBoxActividades.SelectedItem);
 }