Exemplo n.º 1
0
        public void RemovePeriode(int nIdSite, int nIdPeriode)
        {
            CTypeTicketContrat_Site ts = GetRelationSite(nIdSite);

            if (ts != null)
            {
                ts.RemovePeriode(nIdPeriode);
                if (ts.Periodes.Count == 0)
                {
                    ts.Delete(true);
                }
            }
        }
Exemplo n.º 2
0
        //--------------------------------------------------------
        public CTypeTicketContrat_Site_Periode SetPeriode(int nIdSite, int?nIdPeriode, DateTime dateDebut, DateTime dateFin)
        {
            CTypeTicketContrat_Site ts = GetRelationSite(nIdSite);

            CContrat_Site cs = Contrat.GetRelationSite(nIdSite, true);

            if (cs != null)
            {
                if (ts == null)
                {
                    ts = new CTypeTicketContrat_Site(ContexteDonnee);
                    ts.CreateNewInCurrentContexte();
                    ts.TypeTicket_Contrat = this;
                    ts.ContratSite        = cs;
                }
                return(ts.SetPeriode(nIdPeriode, dateDebut, dateFin));
            }
            return(null);
        }