Пример #1
0
        public void ChangeOutfitUpdatersStatus(OutfitUpdaterStatus from, OutfitUpdaterStatus to, Season currentSeason)
        {
            string query = string.Format("call uspUpdateOutfitUpdaterStatusPerSeason({0},{1},{2});", (int)from, (int)to, (int)currentSeason);
            IQuery q     = NHibernateSession.Current.CreateSQLQuery(query);

            q.ExecuteUpdate();
        }
Пример #2
0
        public bool HasUpdaters(OutfitUpdaterStatus atLeastFrom, Season currentSeason)
        {
            ICriteria crit = Session.CreateCriteria(typeof(OutfitUpdater));

            crit.Add(Expression.Ge("Status", atLeastFrom));
            crit.Add(Expression.Eq("Season", currentSeason));
            crit.SetProjection(Projections.Count("Id"));
            int count = crit.UniqueResult <int>();

            return(count != 0);
        }
Пример #3
0
 public OutfitUpdater(int id, string name, string keywords, string description, string externalId, double price, string buyUrl, string imageUrl, int partnerId, int silouhetteId, int patternId, int colorFamilyId, int status)
 {
     this.Id          = id;
     this.name        = name;
     this.description = description;
     this.keywords    = keywords;
     this.externalId  = externalId;
     if (price > 0)
     {
         this.price = Convert.ToDecimal(price);
     }
     this.buyUrl      = buyUrl;
     this.imageUrl    = imageUrl;
     this.partner     = new Partner(partnerId);
     this.silouhette  = new Silouhette(silouhetteId);
     this.pattern     = new Pattern(patternId);
     this.colorFamily = new ColorFamily(colorFamilyId);
     this.status      = (OutfitUpdaterStatus)status;
 }