private void frmReporting_Load(object sender, EventArgs e)
        {
            Log.Debug("Formulaire de Synchronisation Google...");
            frm = (frmAppli)this.Owner;
            p_periode = frm.getPeriode();
            lblInfoSaison.Text = String.Format("Saison {0} du {1} au {2}", p_periode.ToString(), p_periode.StartDate.ToString("dd/MM/yyyy"), p_periode.EndDate.ToString("dd/MM/yyyy"));
            TimeSpan p_tsheureDebut = new TimeSpan(00, 00, 0);
            TimeSpan p_tsheureFin = new TimeSpan(23, 59, 0);
            dateDebutPicker.Value = p_periode.StartDate.Date + p_tsheureDebut;
            dateFinPicker.Value = p_periode.EndDate.Date + p_tsheureFin;

            dateDebutPicker.MinDate = p_periode.StartDate;
            dateDebutPicker.MaxDate = p_periode.EndDate;
            dateFinPicker.MinDate = p_periode.StartDate;
            dateFinPicker.MaxDate = p_periode.EndDate;

            cmbTypeReport.Items.Add("Liste des écoles planifiées");
            cmbTypeReport.SelectedIndex = 0;
        }
示例#2
0
        /// <summary>
        /// Chargement du Formulaire
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frmSynchro_Load(object sender, EventArgs e)
        {
            Log.Debug("Formulaire de Synchronisation Google...");
            frm = (frmAppli)this.Owner;
            p_periode = frm.getPeriode();

            lblInfoSaison.Text = String.Format("Saison {0} du {1} au {2}", p_periode.ToString(), p_periode.StartDate.ToString("dd/MM/yyyy"), p_periode.EndDate.ToString("dd/MM/yyyy"));
            for (int i = 0; i < p_applClass.Param.ListPhotographe.Count; i++)
            {
                chkListPhoto.Items.Add(p_applClass.Param.ListPhotographe[i]);
            }
            TimeSpan p_tsheureDebut = new TimeSpan(00, 00, 0);
            TimeSpan p_tsheureFin = new TimeSpan(23, 59, 0);
            dateDebutPicker.Value = p_periode.StartDate.Date + p_tsheureDebut;
            dateFinPicker.Value = p_periode.EndDate.Date + p_tsheureFin;

            dateDebutPicker.MinDate = p_periode.StartDate;
            dateDebutPicker.MaxDate = p_periode.EndDate;
            dateFinPicker.MinDate = p_periode.StartDate;
            dateFinPicker.MaxDate = p_periode.EndDate;
        }
示例#3
0
        /// <summary>
        /// Ajout d'une période scolaire
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnActPeriode_Click(object sender, EventArgs e)
        {

            bool _hasError = false;
            // Contrôle des informations
            if (txtDateDebut.Text == String.Empty) { _hasError = true; }
            if (txtDateFin.Text == String.Empty) { _hasError = true; }
            if (!_hasError)
            {
                if (p_update)
                {
                    Periode _infoPeriode = p_applClass.Param.ListPeriode[n_numLignePeriode];
                    DateTime _startDate; DateTime.TryParse(txtDateDebut.Text, out _startDate);
                    DateTime _endDate; DateTime.TryParse(txtDateFin.Text, out _endDate);
                    _infoPeriode.StartDate = _startDate;
                    _infoPeriode.EndDate = _endDate;
                    p_updateSchool = true;      // On autorise la mise à jour des données
                }
                else
                {
                    Periode _infoPeriode = new Periode();
                    DateTime _startDate; DateTime.TryParse(txtDateDebut.Text, out _startDate);
                    DateTime _endDate; DateTime.TryParse(txtDateFin.Text, out _endDate);
                    _infoPeriode.StartDate = _startDate;
                    _infoPeriode.EndDate = _endDate;
                    p_applClass.Param.ListPeriode.Add(_infoPeriode);
                    txtDateFin.Text = String.Empty;
                    txtDateDebut.Text = String.Empty;
                }
            }
            grid2.Rows.RemoveRange(1, grid2.RowsCount - 1);
            this.loadLstPeriodes();
        }