/// <summary> /// Evénement déclenché lors du Load du formulaire /// </summary> /// <param name="sender"></param> /// <param name="e"></param> 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); } } if (_infoParam.ListPhotographe.Count == 0) { grpRdv.Enabled = false; } typSecteur.SelectedIndex = 0; // Disponibilité chkDay1.Checked = true; chkDay2.Checked = true; chkDay3.Checked = true; chkDay4.Checked = true; chkDay5.Checked = true; }
/// <summary> /// Chargement du formulaire /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frmInfo_Load(object sender, EventArgs e) { _frm = (frmAppli)this.Owner; txtCode.Text = _infoEcole.IdEcole; txtLibelle.Text = _infoEcole.Libelle; txtAdresse.Text = _infoEcole.Adresse; txtCP.Text = _infoEcole.CodePostal; txtVille.Text = _infoEcole.Ville; txtTelephone.Text = _infoEcole.Telephone; txtPrivateInfo.Text = _infoEcole.PrivateInfo; txtNbClass.Text = _infoEcole.NbClasses; txtEffectif.Text = _infoEcole.Effectif; if (!String.IsNullOrEmpty(_infoEcole.NbClassesMaternelle)) { txtNbMaternelle.Text = _infoEcole.NbClassesMaternelle; } if (!String.IsNullOrEmpty(_infoEcole.NbClassesElementaire)) { txtNbElementaire.Text = _infoEcole.NbClassesElementaire; } if (!String.IsNullOrEmpty(_infoEcole.NbClassesCollege)) { txtNbCollege.Text = _infoEcole.NbClassesCollege; } if (_infoEcole.TypSecteur == "0") { typSecteur.SelectedIndex = 0; } else { typSecteur.SelectedIndex = 1;} // Informations sur le contact if (_infoEcole.Contact != null) { txtNomContact.Text = _infoEcole.Contact.NomCTC; txtFonction.Text = _infoEcole.Contact.FonctionCTC; mskTelContact.Text = _infoEcole.Contact.TelephoneCTC; mskPortContact.Text = _infoEcole.Contact.PortableCTC; mskFaxContact.Text = _infoEcole.Contact.FaxCTC; txtEmail.Text = _infoEcole.Contact.EmailCTC; rchComplements.Text = _infoEcole.Contact.ComplementsCTC; } // Disponibilité chkDay1.Checked = _infoEcole.getDispo(1); chkDay2.Checked = _infoEcole.getDispo(2); chkDay3.Checked = _infoEcole.getDispo(3); chkDay4.Checked = _infoEcole.getDispo(4); chkDay5.Checked = _infoEcole.getDispo(5); // Informations sur les autres planifications grid2.BorderStyle = BorderStyle.FixedSingle; grid2.ColumnsCount = 4; grid2.FixedRows = 1; grid2.Rows.Insert(0); grid2.Selection.FocusStyle = FocusStyle.None; grid2.SelectionMode = GridSelectionMode.Row; grid2[0, 0] = new SourceGrid.Cells.ColumnHeader("Saison"); grid2[0, 1] = new SourceGrid.Cells.ColumnHeader("Du"); grid2[0, 2] = new SourceGrid.Cells.ColumnHeader("Au"); grid2[0, 3] = new SourceGrid.Cells.ColumnHeader("Photographe"); grid2.Columns.SetWidth(0, 100); grid2.Columns.SetWidth(1, 120); grid2.Columns.SetWidth(2, 120); grid2.Columns.SetWidth(3, 100); this.loadLstPlanif(); }
/// <summary> /// Traitement au chargement /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frmMailing_Load(object sender, EventArgs e) { frm = (frmAppli)this.Owner; m_nbSchool = 0; cmbFilter.Items.Add("Les écoles planifiées"); cmbFilter.Items.Add("Les écoles non planifiées"); cmbFilter.Items.Add("Toutes les écoles"); cmbFilter.SelectedIndex = 0; this.loadComboModels(); p_listDocuments = new List<AttachDocument>(); this.loadLstDocument(); }
/// <summary> /// Load du formulaire /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frmParam_Load(object sender, EventArgs e) { frm = (frmAppli)this.Owner; p_googleParamUpdated = false; this.loadTab1(); this.loadTab2(); if (!p_applClass.IsFctAuthorize("Google")) { tabParam.TabPages.Remove(tabParam3); } else { this.loadTab3(); } this.loadTab0(); this.loadTab4(); this.btnAction.Enabled = false; this.mskIdPhoto.Enabled = false; this.txtName.Enabled = false; this.colorPicker.Enabled = false; this.txtGoogleAccount.Text = p_applClass.Param.GoogleAccount; this.txtPrivateKey.Text = p_applClass.Param.PrivateKey; this.lblMainError.Visible = false; tabParam.SelectedIndex = p_numTab; }
/// <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; }
/// <summary> /// Chargement du Formulaire /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frmItemCalendar_Load(object sender, EventArgs e) { _oldPhotographe = ""; lblErreur.Text = ""; frm = (frmAppli)this.Owner; p_applClass = frm.GetApplClass(); if (cmbPhotographe.Items.Count == 0) { for (int i = 0; i < p_applClass.Param.ListPhotographe.Count; i++) { cmbPhotographe.Items.Add(p_applClass.Param.ListPhotographe[i].Nom); if (_infoEcole._planifEnCours != null) { if (_infoEcole._planifEnCours.IdPhotographe == p_applClass.Param.ListPhotographe[i].IdPhotographe) { cmbPhotographe.SelectedIndex = i; } } } } if (_infoEcole._planifEnCours != null) { btnDeletePDV.Enabled = true; if (_infoEcole._planifEnCours.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._planifEnCours.StartDate.Hour, _infoEcole._planifEnCours.StartDate.Minute, _infoEcole._planifEnCours.StartDate.Second); p_dateDebut = _infoEcole._planifEnCours.StartDate; p_tsheureFin = new TimeSpan(_infoEcole._planifEnCours.EndDate.Hour, _infoEcole._planifEnCours.EndDate.Minute, _infoEcole._planifEnCours.EndDate.Second); p_dateFin = _infoEcole._planifEnCours.EndDate; chkConfirm.Checked = _infoEcole._planifEnCours.Confirme; } } else { btnDeletePDV.Enabled = false; 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; } dateDebutPicker.Value = p_dateDebut; dateFinPicker.Value = p_dateFin; txtHeureDebut.Text = p_tsheureDebut.ToString(); txtHeureFin.Text = p_tsheureFin.ToString(); dateDebutPicker.MinDate = p_applClass.Param.GetPeriode(frm._saison).StartDate; dateDebutPicker.MaxDate = p_applClass.Param.GetPeriode(frm._saison).EndDate; // Disponibilité chkDay1.Checked = _infoEcole.getDispo(1); chkDay2.Checked = _infoEcole.getDispo(2); chkDay3.Checked = _infoEcole.getDispo(3); chkDay4.Checked = _infoEcole.getDispo(4); chkDay5.Checked = _infoEcole.getDispo(5); // 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; if (p_modeDuplicate) { txtCode.Enabled = true; txtCode.Mask = "00000000L"; } // Informations sur le contact if (_infoEcole.Contact != null) { lstTitre.SelectedItem = _infoEcole.Contact.TitreCTC; txtNomContact.Text = String.Format("{0}", _infoEcole.Contact.NomCTC); txtFonction.Text = _infoEcole.Contact.FonctionCTC; mskTelContact.Text = _infoEcole.Contact.TelephoneCTC; mskPortContact.Text = _infoEcole.Contact.PortableCTC; mskFaxContact.Text = _infoEcole.Contact.FaxCTC; txtEmail.Text = _infoEcole.Contact.EmailCTC; rchComplements.Text = _infoEcole.Contact.ComplementsCTC; } txtPrivateInfo.Text = _infoEcole.PrivateInfo; txtNbClass.Text = _infoEcole.NbClasses; txtEffectif.Text = _infoEcole.Effectif; if (!String.IsNullOrEmpty(_infoEcole.NbClassesMaternelle)) { txtNbMaternelle.Text = _infoEcole.NbClassesMaternelle; } if (!String.IsNullOrEmpty(_infoEcole.NbClassesElementaire)) { txtNbElementaire.Text = _infoEcole.NbClassesElementaire; } if (!String.IsNullOrEmpty(_infoEcole.NbClassesCollege)) { txtNbCollege.Text = _infoEcole.NbClassesCollege; } if (_infoEcole.TypSecteur == "0") { typSecteur.SelectedIndex = 0; } else { typSecteur.SelectedIndex = 1; } this.calculPrixRevient(); // Informations sur les autres planifications grid2.BorderStyle = BorderStyle.FixedSingle; grid2.ColumnsCount = 4; grid2.FixedRows = 1; grid2.Rows.Insert(0); grid2.Selection.FocusStyle = FocusStyle.None; grid2.SelectionMode = GridSelectionMode.Row; grid2[0, 0] = new SourceGrid.Cells.ColumnHeader("Saison"); grid2[0, 1] = new SourceGrid.Cells.ColumnHeader("Du"); grid2[0, 2] = new SourceGrid.Cells.ColumnHeader("Au"); grid2[0, 3] = new SourceGrid.Cells.ColumnHeader("Photographe"); grid2.Columns.SetWidth(0, 100); grid2.Columns.SetWidth(1, 120); grid2.Columns.SetWidth(2, 120); grid2.Columns.SetWidth(3, 100); this.loadLstPlanif(); }