///<summary> /// Returns a String that represents the current object. ///</summary> public override string ToString() { string retval = string.Empty; retval = string.Format("Position Description ID:{0}, Total Points:{1}, Grade: GS-{2}", PositionDescriptionID.ToString(), TotalPoints.ToString(), Grade.ToString()); return(retval); }
public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound) { switch (strPropertyName.ToLower()) { case "flightid": // Int return(FlightId.ToString(strFormat, formatProvider)); case "portalid": // Int return(PortalId.ToString(strFormat, formatProvider)); case "userid": // Int return(UserId.ToString(strFormat, formatProvider)); case "category": // Int return(Category.ToString(strFormat, formatProvider)); case "takeoffdescription": // NVarChar return(PropertyAccess.FormatString(TakeoffDescription, strFormat)); case "takeofftime": // DateTime return(TakeoffTime.ToString(strFormat, formatProvider)); case "takeoffcoords": // NVarChar if (TakeoffCoords == null) { return(""); } ; return(PropertyAccess.FormatString(TakeoffCoords, strFormat)); case "takeofflatitude": // Float return(TakeoffLatitude.ToString(strFormat, formatProvider)); case "takeofflongitude": // Float return(TakeoffLongitude.ToString(strFormat, formatProvider)); case "takeoffaltitude": // Int if (TakeoffAltitude == null) { return(""); } ; return(((int)TakeoffAltitude).ToString(strFormat, formatProvider)); case "landingdescription": // NVarChar if (LandingDescription == null) { return(""); } ; return(PropertyAccess.FormatString(LandingDescription, strFormat)); case "landingtime": // DateTime return(LandingTime.ToString(strFormat, formatProvider)); case "landingcoords": // NVarChar if (LandingCoords == null) { return(""); } ; return(PropertyAccess.FormatString(LandingCoords, strFormat)); case "landinglatitude": // Float return(LandingLatitude.ToString(strFormat, formatProvider)); case "landinglongitude": // Float return(LandingLongitude.ToString(strFormat, formatProvider)); case "landingaltitude": // Int if (LandingAltitude == null) { return(""); } ; return(((int)LandingAltitude).ToString(strFormat, formatProvider)); case "landingbeaconid": // Int if (LandingBeaconId == null) { return(""); } ; return(((int)LandingBeaconId).ToString(strFormat, formatProvider)); case "maxheight": // Int if (MaxHeight == null) { return(""); } ; return(((int)MaxHeight).ToString(strFormat, formatProvider)); case "maxvario": // Float if (MaxVario == null) { return(""); } ; return(((double)MaxVario).ToString(strFormat, formatProvider)); case "maxspeed": // Float if (MaxSpeed == null) { return(""); } ; return(((double)MaxSpeed).ToString(strFormat, formatProvider)); case "averagespeed": // Float if (AverageSpeed == null) { return(""); } ; return(((double)AverageSpeed).ToString(strFormat, formatProvider)); case "durationmins": // Int return(DurationMins.ToString(strFormat, formatProvider)); case "distance": // Int return(Distance.ToString(strFormat, formatProvider)); case "status": // Int return(Status.ToString(strFormat, formatProvider)); case "totalpoints": // Int return(TotalPoints.ToString(strFormat, formatProvider)); case "entrymethod": // Int return(EntryMethod.ToString(strFormat, formatProvider)); case "summary": // NVarChar if (Summary == null) { return(""); } ; return(PropertyAccess.FormatString(Summary, strFormat)); case "validatedbyuserid": // Int if (ValidatedByUserID == null) { return(""); } ; return(((int)ValidatedByUserID).ToString(strFormat, formatProvider)); case "validatedondate": // DateTime if (ValidatedOnDate == null) { return(""); } ; return(((DateTime)ValidatedOnDate).ToString(strFormat, formatProvider)); default: propertyNotFound = true; break; } return(Null.NullString); }