コード例 #1
0
 public SailingBoatAdDetailsModel(SailingBoatAd ad, IHelperService helper)
     : base(ad)
 {
     BoatType = ad.SailingBoatType != null ? ad.SailingBoatType.Label : String.Empty;
     HullType = ad.HullType != null ? ad.HullType.Label : String.Empty;
     Year     = ad.Year != 0 ? ad.Year : (int?)null;
     Length   = ad.Length != 0 ? String.Format(helper.GetCulture(), "{0:F2} Mtr", ad.Length) : String.Empty;
 }
コード例 #2
0
 public SailingBoatAdDetailsModel(SailingBoatAd ad, IHelperService helper)
     : base(ad)
 {
     BoatType = ad.SailingBoatType != null ? ad.SailingBoatType.Label : String.Empty;
     HullType = ad.HullType != null ? ad.HullType.Label : String.Empty;
     Year = ad.Year != 0 ? ad.Year : (int?) null;
     Length = ad.Length != 0 ? String.Format(helper.GetCulture(), "{0:F2} Mtr", ad.Length) : String.Empty;
 }
コード例 #3
0
 public MotorBoatAdDetailsModel(MotorBoatAd ad, IHelperService helper)
     : base(ad)
 {
     BoatType = ad.MotorBoatType != null ? ad.MotorBoatType.Label : String.Empty;
     MotorType = ad.MotorType != null ? ad.MotorType.Label : String.Empty;
     Year = ad.Year != 0 ? ad.Year : (int?) null;
     Length = ad.Length != 0 ? String.Format(helper.GetCulture(), "{0:F2} Mtr", ad.Length) : String.Empty;
     Hp = ad.Hp != 0 ? String.Format("{0} Cv", ad.Hp) : String.Empty;
 }
コード例 #4
0
 public MotorBoatAdDetailsModel(MotorBoatAd ad, IHelperService helper)
     : base(ad)
 {
     BoatType  = ad.MotorBoatType != null ? ad.MotorBoatType.Label : String.Empty;
     MotorType = ad.MotorType != null ? ad.MotorType.Label : String.Empty;
     Year      = ad.Year != 0 ? ad.Year : (int?)null;
     Length    = ad.Length != 0 ? String.Format(helper.GetCulture(), "{0:F2} Mtr", ad.Length) : String.Empty;
     Hp        = ad.Hp != 0 ? String.Format("{0} Cv", ad.Hp) : String.Empty;
 }