/// ///////////////////////////// private void OnDemandeAffichageEntree(IEntreeAgenda entree) { if (OnAfficherEntreeAgenda != null) { OnAfficherEntreeAgenda(entree); } }
public static void GetCouleursFor(IEntreeAgenda entree, ref Color couleurFond, ref Color couleurText) { couleurFond = c_couleurFondStd; couleurText = c_couleurTextStd; switch (entree.Etat.Etat) { case EtatEntreeAgenda.AFaire: if (entree.DateFin < DateTime.Now) { couleurFond = c_couleurFondEnRetard; couleurText = c_couleurTextEnRetard; } break; case EtatEntreeAgenda.Annulee: couleurFond = c_couleurFondAnnulee; couleurText = c_couleurTextAnnulee; break; case EtatEntreeAgenda.Terminee: couleurFond = c_couleurFondTermine; couleurText = c_couleurTextTermine; break; case EtatEntreeAgenda.EnCours: couleurFond = c_couleurFondEnCours; couleurText = c_couleurTextEnCours; break; } }
////////////////////////////////////////////////////////////////////////// public CVisuEntreeAgenda(IEntreeAgenda entree, IRoleSurEntreeAgenda role, CObjetDonneeAIdNumerique elementLie, DateTime dateDebut, DateTime dateFin) { m_entree = entree; m_role = role; m_objetLie = elementLie; m_dateDebut = dateDebut; m_dateFin = dateFin; }
////////////////////////////////////////////////////////////////////////// public CVisuEntreeAgenda(CRelationEntreeAgenda_ElementAAgenda relation) { m_entree = relation.EntreeAgenda; m_role = relation.RelationTypeEntree_TypeElement.Role; m_objetLie = relation.ElementLie; m_dateDebut = m_entree.DateDebut; m_dateFin = m_entree.DateFin; }
////////////////////////////////////////////////////////////////////////// public CVisuEntreeAgenda(CRelationEntreeAgenda_ElementAAgenda relation, DateTime dtDebut, DateTime dtfin) { m_entree = (CEntreeAgenda)relation.EntreeAgenda; m_role = relation.RelationTypeEntree_TypeElement.Role; m_objetLie = relation.ElementLie; m_dateDebut = dtDebut; m_dateFin = dtfin; }
//---------------------------------------------------------------------- private void m_controlAgenda_OnAfficherEntreeAgenda(IEntreeAgenda entree) { if (entree is CEntreeAgenda) { CTimosApp.Navigateur.AffichePage(new CFormEditionEntreeAgenda((CEntreeAgenda)entree)); } else if (entree is timos.data.CFractionIntervention) { CTimosApp.Navigateur.AffichePage(new CFormEditionIntervention(((timos.data.CFractionIntervention)entree).Intervention)); } else { CFormAlerte.Afficher(I.T("This entry cannot be edited|856"), EFormAlerteType.Erreur); } }