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;
 }
 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;
 }
 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;
 }