コード例 #1
0
        private void AgregarEventoButton_Click(object sender, EventArgs e)
        {
            string        nombre       = NombreEventoTextBox.Text;
            string        fecha        = FechaEvento.Value.ToString("dd-MM-yyyy");
            TipoEvento    tipoEvento   = (TipoEvento)TipoEventoComboBox.SelectedItem;
            string        sala         = SalaUser.Text;
            string        horaInicio   = (string)(BloqueHComboBox.SelectedItem);
            int           duracion     = Convert.ToInt32(DuracionComboBox.SelectedItem);
            List <Evento> listaEventos = Gestor.CrearEvento(nombre, fecha, tipoEvento, sala, horaInicio, duracion, (Convert.ToString(((int)FechaEvento.Value.DayOfWeek) - 1) + "-"));

            parent.AñadirEventos(listaEventos);
            this.Close();
        }