public override CResultAErreur MajChamps() { CResultAErreur result = base.MajChamps(); CPlanificationTacheMensuelleJourSemaine plj = (CPlanificationTacheMensuelleJourSemaine)Planification; plj.NumeroJour = m_cmbNumJour.SelectedIndex + 1; int nDay = m_cmbJourSemaine.SelectedIndex; nDay = (nDay + 8) % 7; plj.JourSemaine = (DayOfWeek)nDay; return(result); }
public override void InitChamps(CPlanificationTache planification) { base.InitChamps(planification); CPlanificationTacheMensuelleJourSemaine plj = (CPlanificationTacheMensuelleJourSemaine)planification; if (plj.NumeroJour > 0 && plj.NumeroJour < 6) { m_cmbNumJour.SelectedIndex = plj.NumeroJour - 1; } int nDay = (int)plj.JourSemaine; nDay = (nDay + 6) % 7; m_cmbJourSemaine.SelectedIndex = nDay; }