private void frmAddEntry_Load(object sender, EventArgs e) { frm = (frmAppli)this.Owner; _infoParam = frm.GetParam(); p_isScheduled = false; lblErr.Text = ""; dateDebutPicker.Enabled = false; dateFinPicker.Enabled = false; chkFullDay.Enabled = false; txtHeureDebut.Text = "0800"; txtHeureFin.Text = "1700"; cmbPhotographe.Enabled = false; txtHeureDebut.Enabled = false; txtHeureFin.Enabled = false; chkConfirm.Enabled = false; if (cmbPhotographe.Items.Count == 0) { for (int i = 0; i < _infoParam.ListPhotographe.Count; i++) { cmbPhotographe.Items.Add(_infoParam.ListPhotographe[i].Nom); } } }
private void frmParam_Load(object sender, EventArgs e) { frm = (frmAppli)this.Owner; }
private void frmImport_Load(object sender, EventArgs e) { frm = (frmAppli)this.Owner; lblCTCRapport.Text = ""; lblRapport.Text = ""; }
private void frmItemCalendar_Load(object sender, EventArgs e) { lblErreur.Text = ""; frm = (frmAppli)this.Owner; _infoParam = frm.GetParam(); if (cmbPhotographe.Items.Count == 0) { for (int i = 0; i < _infoParam.ListPhotographe.Count; i++) { cmbPhotographe.Items.Add(_infoParam.ListPhotographe[i].Nom); if (_infoEcole.Photographe == _infoParam.ListPhotographe[i].IdPhotographe) { cmbPhotographe.SelectedIndex = i; } } } if (_infoEcole.StartDate == DateTime.MinValue) { p_tsheureDebut = new TimeSpan(08, 00, 0); p_dateDebut = new DateTime(_dateSelected.Year, _dateSelected.Month, _dateSelected.Day); p_dateDebut = p_dateDebut.Date + p_tsheureDebut; p_tsheureFin = new TimeSpan(17, 00, 0); p_dateFin = new DateTime(_dateSelected.Year, _dateSelected.Month, _dateSelected.Day); p_dateFin = p_dateDebut.Date + p_tsheureFin; } else { p_tsheureDebut = new TimeSpan(_infoEcole.StartDate.Hour, _infoEcole.StartDate.Minute, _infoEcole.StartDate.Second); p_dateDebut = _infoEcole.StartDate; p_tsheureFin = new TimeSpan(_infoEcole.EndDate.Hour, _infoEcole.EndDate.Minute, _infoEcole.EndDate.Second); p_dateFin = _infoEcole.EndDate; } dateDebutPicker.Value = p_dateDebut; dateFinPicker.Value = p_dateFin; txtHeureDebut.Text = p_tsheureDebut.ToString(); txtHeureFin.Text = p_tsheureFin.ToString(); // Contrôle si la journée entière est planifiée if (p_tsheureDebut.Equals(new TimeSpan(08, 00, 00)) && p_tsheureFin.Equals(new TimeSpan(17, 00, 00))) { chkFullDay.Checked = true; txtHeureDebut.Enabled = false; txtHeureFin.Enabled = false; } else { chkFullDay.Checked = false; txtHeureDebut.Enabled = true; txtHeureFin.Enabled = true; } txtCode.Text = _infoEcole.IdEcole; txtLibelle.Text = _infoEcole.Libelle; txtAdresse.Text = _infoEcole.Adresse; txtCP.Text = _infoEcole.CodePostal; txtVille.Text = _infoEcole.Ville; txtTelephone.Text = _infoEcole.Telephone; chkConfirm.Checked = _infoEcole.Confirme; if (p_modeDuplicate) { txtCode.Enabled = true; txtCode.Mask = "00000000L"; } // Informations sur le contact if (_infoEcole.Contact != null) { txtNomContact.Text = String.Format("{0} {1}", _infoEcole.Contact.Titre, _infoEcole.Contact.Nom); txtFonction.Text = _infoEcole.Contact.Fonction; mskTelContact.Text = _infoEcole.Contact.Telephone; mskPortContact.Text = _infoEcole.Contact.Portable; mskFaxContact.Text = _infoEcole.Contact.Fax; txtEmail.Text = _infoEcole.Contact.Email; txtComplements.Text = _infoEcole.Contact.Complements; } }