コード例 #1
0
 public Description(Product product)
 {
     this.Id                 = product._id.IdString;
     this.Name               = product._name;
     this.CostRate           = product._costRate;
     this.Price              = product._price;
     this.IngredientsTable   = product._ingredientsTable.ToDictionary(x => x.Key.IdString, x => x.Value);
     this.IsSellingYearRound = SalesPeriod.SellYearRound().SameValueAs(product._salesPeriod);
     this.SellingFromMonth   = product._salesPeriod.From.Month;
     this.SellingFromDay     = product._salesPeriod.From.RoughDay;
     this.SellingTillMonth   = product._salesPeriod.Till.Month;
     this.SellingTillDay     = product._salesPeriod.Till.RoughDay;
 }
コード例 #2
0
 public bool IsLaterThan(int month, RoughDay roughDay)
 {
     return(this._month > month || this._month == month && this._roughDay >= roughDay);
 }
コード例 #3
0
 public bool IsEarlierThan(int month, RoughDay roughDay)
 {
     return(this._month < month || this._month == month && this._roughDay <= roughDay);
 }
コード例 #4
0
 public RoughDate(int month, RoughDay roughDay)
 {
     this._month    = month;
     this._roughDay = roughDay;
 }
コード例 #5
0
ファイル: SalesPeriod.cs プロジェクト: epirevolve/StoreHelper
 public SalesPeriod PostponeTheEndOfSelling(int month, RoughDay day)
 {
     return(new SalesPeriod(this._from, new RoughDate(month, day)));
 }
コード例 #6
0
ファイル: SalesPeriod.cs プロジェクト: epirevolve/StoreHelper
 public SalesPeriod StartSellingEarlier(int month, RoughDay day)
 {
     return(new SalesPeriod(new RoughDate(month, day), this._till));
 }
コード例 #7
0
ファイル: SalesPeriod.cs プロジェクト: epirevolve/StoreHelper
 public static SalesPeriod SellInLimitedTime(int fromMonth, RoughDay fromDay, int tillMonth, RoughDay tillDay)
 {
     return(new SalesPeriod(new RoughDate(fromMonth, fromDay), new RoughDate(tillMonth, tillDay)));
 }
コード例 #8
0
 public void PostponeTheEndOfSelling(int month, RoughDay day)
 {
     this._salesPeriod = this._salesPeriod.PostponeTheEndOfSelling(month, day);
 }
コード例 #9
0
 public void StartSellingEarlier(int month, RoughDay day)
 {
     this._salesPeriod = this._salesPeriod.StartSellingEarlier(month, day);
 }
コード例 #10
0
 public void SellInLimitedTime(int fromMonth, RoughDay fromDay, int tillMonth, RoughDay tillDay)
 {
     this._salesPeriod = SalesPeriod.SellInLimitedTime(fromMonth, fromDay, tillMonth, tillDay);
 }