Ejemplo n.º 1
0
        public StdResult<Bundle> SetBundleStatus(DateTime date, BundleStatus status)
        {
            BundleDataService dal = new BundleDataService();
            StdResult<Bundle> result = dal.Get(date);
            if (result.ReturnObject == null)
                throw new CollecteException("Bundle introuvable.");

            result.ReturnObject.Status = status;

            result = dal.Update(result.ReturnObject);

            return result;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Permet de définir pour un bundle combien de participations au jeu il référence au total.
        /// </summary>
        /// <param name="date"></param>
        /// <param name="totalSubs"></param>
        /// <returns></returns>
        public StdResult<Bundle> SetBundleTotalSubs(DateTime date, int totalSubs)
        {
            BundleDataService dal = new BundleDataService();
            StdResult<Bundle> result = dal.Get(date);
            if (result.ReturnObject == null)
                throw new CollecteException("Bundle introuvable.");

            result.ReturnObject.NbInscriptions = totalSubs;

            result = dal.Update(result.ReturnObject);

            return result;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Permet de spécifier combien de profils sont retournés par Canal.
        /// </summary>
        /// <param name="date"></param>
        /// <param name="nb"></param>
        /// <returns></returns>
        public StdResult<Bundle> SetBundleNbReturnsCanal(DateTime date, int nbRetoursCanal, int nbOk, int nbKo)
        {
            BundleDataService dal = new BundleDataService();
            StdResult<Bundle> result = dal.Get(date);
            if (result.ReturnObject == null)
                throw new CollecteException("Bundle introuvable.");

            result.ReturnObject.NbRetoursCanal = nbRetoursCanal;
            result.ReturnObject.NbOk = nbOk;
            result.ReturnObject.NbKo = nbKo;

            result = dal.Update(result.ReturnObject);

            return result;
        }