public string GetProperty(string strPropertyName, string strFormat, CultureInfo formatProvider, UserInfo accessingUser, Scope accessLevel, ref bool propertyNotFound) { strPropertyName = strPropertyName.ToLowerInvariant(); switch (strPropertyName) { case "md5hash": return(PropertyAccess.FormatString(Md5Hash(_email), strFormat)); case "url": return (PropertyAccess.FormatString( string.Format("http://www.gravatar.com/avatar/{0}", Md5Hash(_email)), strFormat)); case "image": return (PropertyAccess.FormatString( string.Format("<img alt=\"gravatar\" src=\"http://www.gravatar.com/avatar/{0}\" />", Md5Hash(_email)), strFormat)); default: propertyNotFound = true; return(string.Empty); } }
public override 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 "createdbyuser": // NVarChar if (CreatedByUser == null) { return(""); } ; return(PropertyAccess.FormatString(CreatedByUser, strFormat)); case "lastmodifiedbyuser": // NVarChar if (LastModifiedByUser == null) { return(""); } ; return(PropertyAccess.FormatString(LastModifiedByUser, strFormat)); case "nrsessions": // Int if (NrSessions == null) { return(""); } ; return(((int)NrSessions).ToString(strFormat, formatProvider)); default: return(base.GetProperty(strPropertyName, strFormat, formatProvider, accessingUser, accessLevel, ref propertyNotFound)); } }
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 "apikey": // VarChar return(PropertyAccess.FormatString(ApiKey, strFormat)); case "conferenceid": // Int return(ConferenceId.ToString(strFormat, formatProvider)); case "expires": // DateTime if (Expires == null) { return(""); } ; return(((DateTime)Expires).ToString(strFormat, formatProvider)); case "createdbyuserid": // Int return(CreatedByUserID.ToString(strFormat, formatProvider)); case "createdondate": // DateTime return(CreatedOnDate.ToString(strFormat, formatProvider)); default: propertyNotFound = true; break; } return(Null.NullString); }
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 "sessionresourceid": // Int return(SessionResourceId.ToString(strFormat, formatProvider)); case "sessionid": // Int return(SessionId.ToString(strFormat, formatProvider)); case "resourcelink": // NVarChar return(PropertyAccess.FormatString(ResourceLink, strFormat)); case "resourcedescription": // NVarChar if (ResourceDescription == null) { return(""); } ; return(PropertyAccess.FormatString(ResourceDescription, strFormat)); case "resourcetype": // Int return(ResourceType.ToString(strFormat, formatProvider)); case "visibility": // Int return(Visibility.ToString(strFormat, formatProvider)); default: propertyNotFound = true; break; } return(Null.NullString); }
public string GetProperty(string propertyName, string format, System.Globalization.CultureInfo formatProvider, Entities.Users.UserInfo accessingUser, Scope accessLevel, ref bool propertyNotFound) { string OutputFormat = string.Empty; if (format == string.Empty) { OutputFormat = "g"; } else { OutputFormat = format; } propertyName = propertyName.ToLowerInvariant(); switch (propertyName) { case "id": return(PropertyAccess.FormatString(Id.ToString(), format)); case "name": return(PropertyAccess.FormatString(Name.ToString(), format)); case "vanity": return(PropertyAccess.FormatString(Vanity.ToString(), format)); case "avatar": return(PropertyAccess.FormatString(Avatar.ToString(), format)); } propertyNotFound = true; return(string.Empty); }
public string GetProperty(string strPropertyName, string strFormat, CultureInfo formatProvider, UserInfo accessingUser, Scope accessLevel, ref bool propertyNotFound) { if (_nameValueCollection == null) { return(string.Empty); } var value = _nameValueCollection[strPropertyName]; if (string.IsNullOrEmpty(strFormat)) { strFormat = string.Empty; } if (value != null) { var security = new PortalSecurity(); value = security.InputFilter(value, PortalSecurity.FilterFlag.NoScripting); return(security.InputFilter(PropertyAccess.FormatString(value, strFormat), PortalSecurity.FilterFlag.NoScripting)); } else { propertyNotFound = true; return(string.Empty); } }
public string GetProperty(string propertyName, string format, System.Globalization.CultureInfo formatProvider, Entities.Users.UserInfo accessingUser, Scope accessLevel, ref bool propertyNotFound) { string OutputFormat = string.Empty; if (format == string.Empty) { OutputFormat = "g"; } else { OutputFormat = format; } propertyName = propertyName.ToLowerInvariant(); switch (propertyName) { case "url": return(PropertyAccess.FormatString(Url, format)); case "title": return(PropertyAccess.FormatString(Title, format)); case "description": return(PropertyAccess.FormatString(Description, format)); case "imageurl": return(PropertyAccess.FormatString(ImageUrl, format)); } propertyNotFound = true; return(string.Empty); }
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 "namespaceid": // Int return(NamespaceId.ToString(strFormat, formatProvider)); case "parentid": // Int return(ParentId.ToString(strFormat, formatProvider)); case "moduleid": // Int return(ModuleId.ToString(strFormat, formatProvider)); case "namespacename": // NVarChar return(PropertyAccess.FormatString(NamespaceName, strFormat)); case "lastqualifier": // NVarChar return(PropertyAccess.FormatString(LastQualifier, strFormat)); case "description": // NVarCharMax if (Description == null) { return(""); } ; return(PropertyAccess.FormatString(Description, strFormat)); default: propertyNotFound = true; break; } return(Null.NullString); }
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 "rideid": // Int return(RideId.ToString(strFormat, formatProvider)); case "moduleid": // Int return(ModuleId.ToString(strFormat, formatProvider)); case "userid": // Int return(UserId.ToString(strFormat, formatProvider)); case "incoming": // Bit return(Incoming.ToString()); case "location": // NVarChar return(PropertyAccess.FormatString(Location, strFormat)); case "notes": // NVarCharMax return(PropertyAccess.FormatString(Notes, strFormat)); case "placesavailable": // Int return(PlacesAvailable.ToString(strFormat, formatProvider)); default: propertyNotFound = true; break; } return(Null.NullString); }
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 "conferenceid": // Int return(ConferenceId.ToString(strFormat, formatProvider)); case "userid": // Int return(UserId.ToString(strFormat, formatProvider)); case "status": // Int return(Status.ToString(strFormat, formatProvider)); case "receivenotifications": // Bit return(ReceiveNotifications.ToString()); case "company": // NVarChar if (Company == null) { return(""); } ; return(PropertyAccess.FormatString(Company, strFormat)); default: propertyNotFound = true; break; } return(Null.NullString); }
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 "commentid": // Int return(CommentId.ToString(strFormat, formatProvider)); case "userid": // Int return(UserId.ToString(strFormat, formatProvider)); case "flightid": // Int return(FlightId.ToString(strFormat, formatProvider)); case "datime": // DateTime return(Datime.ToString(strFormat, formatProvider)); case "remarks": // NVarCharMax return(PropertyAccess.FormatString(Remarks, strFormat)); default: propertyNotFound = true; break; } return(Null.NullString); }
/// <summary> /// Get Property out of NameValueCollection /// </summary> /// <param name="strPropertyName"></param> /// <param name="strFormat"></param> /// <param name="formatProvider"></param> /// <param name="AccessingUser"></param> /// <param name="AccessLevel"></param> /// <param name="PropertyNotFound"></param> /// <returns></returns> public string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, UserInfo AccessingUser, Scope AccessLevel, ref bool PropertyNotFound) { if (NameValueCollection == null) { return(string.Empty); } string value = NameValueCollection[strPropertyName]; string OutputFormat = null; if (strFormat == string.Empty) { OutputFormat = "g"; } else { OutputFormat = string.Empty; } if (value != null) { PortalSecurity Security = new PortalSecurity(); value = Security.InputFilter(value, PortalSecurity.FilterFlag.NoScripting); return(Security.InputFilter(PropertyAccess.FormatString(value, strFormat), PortalSecurity.FilterFlag.NoScripting)); } else { PropertyNotFound = true; return(string.Empty); } }
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 "referenceid": // Int return(ReferenceId.ToString(strFormat, formatProvider)); case "codeblockid": // Int return(CodeBlockId.ToString(strFormat, formatProvider)); case "fullname": // VarChar return(PropertyAccess.FormatString(FullName, strFormat)); case "offset": // Int return(Offset.ToString(strFormat, formatProvider)); case "referencedmemberid": // Int if (ReferencedMemberId == null) { return(""); } ; return(((int)ReferencedMemberId).ToString(strFormat, formatProvider)); default: propertyNotFound = true; break; } return(Null.NullString); }
/// <summary> /// Get Property out of NameValueCollection /// </summary> /// <param name="strPropertyName"></param> /// <param name="strFormat"></param> /// <param name="formatProvider"></param> /// <param name="AccessingUser"></param> /// <param name="AccessLevel"></param> /// <param name="PropertyNotFound"></param> /// <returns></returns> public string GetProperty(string strPropertyName, string strFormat, CultureInfo formatProvider, UserInfo AccessingUser, Scope AccessLevel, ref bool PropertyNotFound) { if (NameValueCollection == null) { return(string.Empty); } var value = NameValueCollection[strPropertyName]; //string OutputFormat = null; //if (strFormat == string.Empty) //{ // OutputFormat = "g"; //} //else //{ // OutputFormat = string.Empty; //} if (value != null) { var Security = new PortalSecurity(); value = Security.InputFilter(value, PortalSecurity.FilterFlag.NoScripting); return(Security.InputFilter(PropertyAccess.FormatString(value, strFormat), PortalSecurity.FilterFlag.NoScripting)); } PropertyNotFound = true; return(string.Empty); }
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 "rideid": // Int return(RideId.ToString(strFormat, formatProvider)); case "userid": // Int return(UserId.ToString(strFormat, formatProvider)); case "accepted": // Bit return(Accepted.ToString()); case "comments": // NVarCharMax if (Comments == null) { return(""); } ; return(PropertyAccess.FormatString(Comments, strFormat)); default: propertyNotFound = true; break; } return(Null.NullString); }
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 "slotid": // Int return(SlotId.ToString(strFormat, formatProvider)); case "conferenceid": // Int return(ConferenceId.ToString(strFormat, formatProvider)); case "start": // Time return(Start.ToString(strFormat, formatProvider)); case "durationmins": // Int return(DurationMins.ToString(strFormat, formatProvider)); case "slottype": // Int return(SlotType.ToString(strFormat, formatProvider)); case "title": // NVarChar if (Title == null) { return(""); } ; return(PropertyAccess.FormatString(Title, strFormat)); case "description": // NVarCharMax if (Description == null) { return(""); } ; return(PropertyAccess.FormatString(Description, strFormat)); case "daynr": // Int if (DayNr == null) { return(""); } ; return(((int)DayNr).ToString(strFormat, formatProvider)); case "locationid": // Int if (LocationId == null) { return(""); } ; return(((int)LocationId).ToString(strFormat, formatProvider)); default: propertyNotFound = true; break; } return(Null.NullString); }
public override 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 "createdbyuserdisplayname": // NVarChar if (CreatedByUserDisplayName == null) { return(""); } ; return(PropertyAccess.FormatString(CreatedByUserDisplayName, strFormat)); case "lastmodifiedbyuserdisplayname": // NVarChar if (LastModifiedByUserDisplayName == null) { return(""); } ; return(PropertyAccess.FormatString(LastModifiedByUserDisplayName, strFormat)); case "documentationcontents": // NVarCharMax if (DocumentationContents == null) { return(""); } ; return(PropertyAccess.FormatString(DocumentationContents, strFormat)); case "classname": // NVarChar return(PropertyAccess.FormatString(ClassName, strFormat)); case "namespacename": // NVarChar return(PropertyAccess.FormatString(NamespaceName, strFormat)); case "fullqualifier": // NVarChar return(PropertyAccess.FormatString(FullQualifier, strFormat)); case "moduleid": // Int return(ModuleId.ToString(strFormat, formatProvider)); case "componentname": // NVarChar return(PropertyAccess.FormatString(ComponentName, strFormat)); case "latestversion": // VarChar return(PropertyAccess.FormatString(LatestVersion, strFormat)); case "codeblockcount": // Int if (CodeBlockCount == null) { return(""); } ; return(((int)CodeBlockCount).ToString(strFormat, formatProvider)); default: return(base.GetProperty(strPropertyName, strFormat, formatProvider, accessingUser, accessLevel, ref propertyNotFound)); } }
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 "conferenceid": // Int return(ConferenceId.ToString(strFormat, formatProvider)); case "userid": // Int return(UserId.ToString(strFormat, formatProvider)); case "company": // NVarChar if (Company == null) { return(""); } ; return(PropertyAccess.FormatString(Company, strFormat)); case "sort": // Int if (Sort == null) { return(""); } ; return(((int)Sort).ToString(strFormat, formatProvider)); case "url": // NVarChar if (Url == null) { return(""); } ; return(PropertyAccess.FormatString(Url, strFormat)); case "description": // NVarCharMax if (Description == null) { return(""); } ; return(PropertyAccess.FormatString(Description, strFormat)); case "descriptionshort": // NVarCharMax if (DescriptionShort == null) { return(""); } ; return(PropertyAccess.FormatString(DescriptionShort, strFormat)); default: propertyNotFound = true; break; } return(Null.NullString); }
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 "locationid": // Int return(LocationId.ToString(strFormat, formatProvider)); case "conferenceid": // Int return(ConferenceId.ToString(strFormat, formatProvider)); case "name": // NVarChar if (Name == null) { return(""); } ; return(PropertyAccess.FormatString(Name, strFormat)); case "description": // NVarCharMax if (Description == null) { return(""); } ; return(PropertyAccess.FormatString(Description, strFormat)); case "capacity": // Int if (Capacity == null) { return(""); } ; return(((int)Capacity).ToString(strFormat, formatProvider)); case "sort": // Int if (Sort == null) { return(""); } ; return(((int)Sort).ToString(strFormat, formatProvider)); case "backgroundcolor": // NVarChar if (BackgroundColor == null) { return(""); } ; return(PropertyAccess.FormatString(BackgroundColor, strFormat)); default: propertyNotFound = true; break; } return(Null.NullString); }
public override 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 "createdbyuser": // NVarChar return(PropertyAccess.FormatString(CreatedByUser, strFormat)); case "createdbyusername": // NVarChar return(PropertyAccess.FormatString(CreatedByUserName, strFormat)); default: return(base.GetProperty(strPropertyName, strFormat, formatProvider, accessingUser, accessLevel, ref propertyNotFound)); } }
public string GetProperty(string propertyName, string format, System.Globalization.CultureInfo formatProvider, Entities.Users.UserInfo accessingUser, Scope accessLevel, ref bool propertyNotFound) { string OutputFormat = string.Empty; if (format == string.Empty) { OutputFormat = "g"; } else { OutputFormat = format; } propertyName = propertyName.ToLowerInvariant(); switch (propertyName) { case "journalid": return(PropertyAccess.FormatString(this.JournalId.ToString(), format)); case "journaltypeid": return(PropertyAccess.FormatString(this.JournalTypeId.ToString(), format)); case "profileid": return(PropertyAccess.FormatString(this.ProfileId.ToString(), format)); case "socialgroupid": return(PropertyAccess.FormatString(this.SocialGroupId.ToString(), format)); case "datecreated": return(PropertyAccess.FormatString(this.DateCreated.ToString(), format)); case "title": return(PropertyAccess.FormatString(this.Title, format)); case "summary": return(PropertyAccess.FormatString(this.Summary, format)); case "body": return(PropertyAccess.FormatString(this.Body, format)); case "timeframe": return(PropertyAccess.FormatString(this.TimeFrame, format)); case "isdeleted": return(this.IsDeleted.ToString()); } propertyNotFound = true; return(string.Empty); }
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 "beaconid": // Int return(BeaconId.ToString(strFormat, formatProvider)); case "portalid": // Int return(PortalId.ToString(strFormat, formatProvider)); case "code": // NVarChar return(PropertyAccess.FormatString(Code, strFormat)); case "name": // NVarChar return(PropertyAccess.FormatString(Name, strFormat)); case "description": // NVarChar if (Description == null) { return(""); } ; return(PropertyAccess.FormatString(Description, strFormat)); case "coords": // VarChar return(PropertyAccess.FormatString(Coords, strFormat)); case "latitude": // Float return(Latitude.ToString(strFormat, formatProvider)); case "longitude": // Float return(Longitude.ToString(strFormat, formatProvider)); case "altitude": // Int return(Altitude.ToString(strFormat, formatProvider)); case "region": // Int return(Region.ToString(strFormat, formatProvider)); case "points": // Int return(Points.ToString(strFormat, formatProvider)); default: propertyNotFound = true; break; } return(Null.NullString); }
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 "sponsorid": // Int return(SponsorId.ToString(strFormat, formatProvider)); case "conferenceid": // Int return(ConferenceId.ToString(strFormat, formatProvider)); case "name": // NVarChar return(PropertyAccess.FormatString(Name, strFormat)); case "url": // VarChar if (Url == null) { return(""); } ; return(PropertyAccess.FormatString(Url, strFormat)); case "description": // NVarCharMax if (Description == null) { return(""); } ; return(PropertyAccess.FormatString(Description, strFormat)); case "vieworder": // Int return(ViewOrder.ToString(strFormat, formatProvider)); case "sponsorlevel": // NVarChar if (SponsorLevel == null) { return(""); } ; return(PropertyAccess.FormatString(SponsorLevel, strFormat)); default: propertyNotFound = true; break; } return(Null.NullString); }
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 "componenthistoryid": // Int return(ComponentHistoryId.ToString(strFormat, formatProvider)); case "componentid": // Int return(ComponentId.ToString(strFormat, formatProvider)); case "version": // VarChar return(PropertyAccess.FormatString(Version, strFormat)); case "versionnormalized": // VarChar return(PropertyAccess.FormatString(VersionNormalized, strFormat)); case "fullname": // VarChar return(PropertyAccess.FormatString(FullName, strFormat)); case "codelines": // Int return(CodeLines.ToString(strFormat, formatProvider)); case "commentlines": // Int if (CommentLines == null) { return(""); } ; return(((int)CommentLines).ToString(strFormat, formatProvider)); case "emptylines": // Int if (EmptyLines == null) { return(""); } ; return(((int)EmptyLines).ToString(strFormat, formatProvider)); default: propertyNotFound = true; break; } return(Null.NullString); }
public string GetProperty(string strPropertyName, string strFormat, CultureInfo formatProvider, UserInfo AccessingUser, Scope AccessLevel, ref bool PropertyNotFound) { PropertyNotFound = false; FAQsController faqController; switch (strPropertyName.ToLower()) { case "question": return(PropertyAccess.FormatString(Question, strFormat)); case "answer": return(PropertyAccess.FormatString(Answer, strFormat)); case "user": UserInfo user = UserController.GetUserById(PortalSettings.Current.PortalId, Convert.ToInt32(CreatedByUser)); return(PropertyAccess.FormatString(user.DisplayName, strFormat)); case "viewcount": return(ViewCount.ToString(String.IsNullOrEmpty(strFormat) ? "g" : strFormat, formatProvider)); case "vieworder": return(ViewOrder.ToString(String.IsNullOrEmpty(strFormat) ? "g" : strFormat, formatProvider)); case "categoryname": faqController = new FAQsController(); return(PropertyAccess.FormatString(faqController.GetCategory(CategoryId).FaqCategoryName, strFormat)); case "categorydesc": faqController = new FAQsController(); return(PropertyAccess.FormatString(faqController.GetCategory(CategoryId).FaqCategoryDescription, strFormat)); case "datecreated": return(CreatedDate.ToString(String.IsNullOrEmpty(strFormat) ? "d" : strFormat, formatProvider)); case "datemodified": return(DateModified.ToString(String.IsNullOrEmpty(strFormat) ? "d" : strFormat, formatProvider)); case "index": return(Index.ToString(String.IsNullOrEmpty(strFormat) ? "g" : strFormat, formatProvider)); default: PropertyNotFound = true; return(String.Empty); } }
public string GetProperty(string strPropertyName, string strFormat, CultureInfo formatProvider, UserInfo accessingUser, Scope accessLevel, ref bool propertyNotFound) { string outputFormat = strFormat == string.Empty ? "g" : strFormat; strPropertyName = strPropertyName.ToLowerInvariant(); if (File != null) { switch (strPropertyName) { case "name": return(PropertyAccess.FormatString(File.FileName, strFormat)); case "folder": return (PropertyAccess.FormatString( FolderManager.Instance.GetFolder(File.FolderId).FolderName, strFormat)); case "path": return (PropertyAccess.FormatString( FolderManager.Instance.GetFolder(File.FolderId).FolderPath, strFormat)); case "size": return(File.Size.ToString(outputFormat, formatProvider)); case "sizemb": return((File.Size / 1024 ^ 2).ToString(outputFormat, formatProvider)); case "extension": return(PropertyAccess.FormatString(File.Extension, strFormat)); } } if (strPropertyName == "clicks") { var tracking = new UrlController().GetUrlTracking(_portalId, _fileIdentifier, _moduleId); return(tracking != null?tracking.Clicks.ToString(outputFormat, formatProvider) : ""); } propertyNotFound = true; return(string.Empty); }
public override 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 "displayname": // NVarChar return(PropertyAccess.FormatString(DisplayName, strFormat)); case "email": // NVarChar if (Email == null) { return(""); } ; return(PropertyAccess.FormatString(Email, strFormat)); default: return(base.GetProperty(strPropertyName, strFormat, formatProvider, accessingUser, accessLevel, ref propertyNotFound)); } }
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 "commentid": // Int return(CommentID.ToString(strFormat, formatProvider)); case "componentid": // Int return(ComponentId.ToString(strFormat, formatProvider)); case "itemtype": // Int return(ItemType.ToString(strFormat, formatProvider)); case "itemid": // Int return(ItemId.ToString(strFormat, formatProvider)); case "parentid": // Int if (ParentId == null) { return(""); } ; return(((int)ParentId).ToString(strFormat, formatProvider)); case "message": // NVarCharMax return(PropertyAccess.FormatString(Message, strFormat)); case "approved": // Bit if (Approved == null) { return(""); } ; return(Approved.ToString()); default: propertyNotFound = true; break; } return(Null.NullString); }
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 "tagid": // Int return(TagId.ToString(strFormat, formatProvider)); case "conferenceid": // Int return(ConferenceId.ToString(strFormat, formatProvider)); case "tagname": // NVarChar return(PropertyAccess.FormatString(TagName, strFormat)); default: propertyNotFound = true; break; } return(Null.NullString); }
public override 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 "membername": // VarChar if (MemberName == null) { return(""); } ; return(PropertyAccess.FormatString(MemberName, strFormat)); case "appearedinversion": // VarChar if (AppearedInVersion == null) { return(""); } ; return(PropertyAccess.FormatString(AppearedInVersion, strFormat)); case "deprecatedinversion": // VarChar if (DeprecatedInVersion == null) { return(""); } ; return(PropertyAccess.FormatString(DeprecatedInVersion, strFormat)); case "disappearedinversion": // VarChar if (DisappearedInVersion == null) { return(""); } ; return(PropertyAccess.FormatString(DisappearedInVersion, strFormat)); default: return(base.GetProperty(strPropertyName, strFormat, formatProvider, accessingUser, accessLevel, ref propertyNotFound)); } }