Exemple #1
0
        public ProStyleBO(ProStyle style)
        {
            //this._styleData = new ProStyleData();
            this.ID         = style.ID;
            this.Code       = style.Code;
            this.CreatorID  = style.CreatorID;
            this.CreateTime = style.CreateTime;
            this.BoduanID   = style.BoduanID;
            this.BYQID      = style.BYQID;
            this.Flag       = style.Flag;
            this.NameID     = style.NameID;
            //this.PictureUrl = style.PictureUrl;
            this.Price     = style.Price;
            this.CostPrice = style.CostPrice;
            this.UnitID    = style.UnitID;
            this.EANCode   = style.EANCode;
            //this.Description = style.Description;
            var byq = VMGlobal.BYQs.Find(o => o.ID == style.BYQID);

            if (byq != null)
            {
                this.BrandID = byq.BrandID;
                this.Quarter = byq.Quarter;
                this.Year    = byq.Year;
            }
        }
Exemple #2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            ProductDataContext context = parameter as ProductDataContext;
            ProStyle           style   = value as ProStyle;

            if (style != null && style.ID != 0)
            {
                var byq = _byqCache.Find(o => o.ID == style.BYQID);
                if (byq == null)
                {
                    byq = VMGlobal.SysProcessQuery.LinqOP.GetById <ProBYQ>(style.BYQID);
                    _byqCache.Add(byq);
                }
                return(byq.Year + context.Quarters.Find(q => q.ID == byq.Quarter).Name);
            }
            return(null);
        }
Exemple #3
0
 public ProStyleForPictureAlbum(ProStyle style)
     : base(style)
 {
 }