This question is locked. New answers and comments are not allowed.
Quick question I have a forward mapped class that is basically a person class. I am wanting to add a BitmapSource field to the class so that I can have an easy way to display a gender specific icon. Currently this is working off of a placeholder class I developed just so I could see the UI work until I could incorporate the OpenAccess live data. I am now at that point. Would an Artificial Field be the best way to handle this or am I looking at this from the wrong point of view? I basically want to add this
to this
Any help or suggestions would greatly be appreciated.
Thanks!
| public BitmapSource GenderIcon |
| { |
| get |
| { |
| if (Gender.StartsWith("F", StringComparison.OrdinalIgnoreCase)) |
| { |
| return ResourceService.CreateBitmapSource(new System.Drawing.Bitmap(Resources.Female)); |
| } |
| else |
| { |
| return ResourceService.CreateBitmapSource(new System.Drawing.Bitmap(Resources.Male)); |
| } |
| } |
| } |
to this
| using System; |
| using System.Collections.Generic; |
| namespace EliteExtender.Infrastructure.Models.Elite |
| { |
| // Generated by Telerik OpenAccess |
| // Used template: c:\program files (x86)\telerik\openaccess orm\sdk\IDEIntegrations\templates\PCClassGeneration\cs\templates\classgen\class\partialuserdefault.vm |
| // NOTE: Field declarations and 'Object ID' class implementation are added to the 'designer' file. |
| // Changes made to the 'designer' file will be overwritten by the wizard. |
| public partial class PtWMember |
| { |
| //The 'no-args' constructor required by OpenAccess. |
| public PtWMember() |
| { |
| } |
| [Telerik.OpenAccess.FieldAlias("pk")] |
| public int Pk |
| { |
| get { return pk; } |
| set { this.pk = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("alienRegistrationNumber")] |
| public string AlienRegistrationNumber |
| { |
| get { return alienRegistrationNumber; } |
| set { this.alienRegistrationNumber = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("cityOfBirth")] |
| public string CityOfBirth |
| { |
| get { return cityOfBirth; } |
| set { this.cityOfBirth = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("countryOfBirth")] |
| public string CountryOfBirth |
| { |
| get { return countryOfBirth; } |
| set { this.countryOfBirth = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("dateOfBirth")] |
| public DateTime? DateOfBirth |
| { |
| get { return dateOfBirth; } |
| set { this.dateOfBirth = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("disguisedSSN")] |
| public string DisguisedSSN |
| { |
| get { return disguisedSSN; } |
| set { this.disguisedSSN = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("driversLicenseNumber")] |
| public string DriversLicenseNumber |
| { |
| get { return driversLicenseNumber; } |
| set { this.driversLicenseNumber = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("elevatedBloodLeadLevel")] |
| public string ElevatedBloodLeadLevel |
| { |
| get { return elevatedBloodLeadLevel; } |
| set { this.elevatedBloodLeadLevel = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("emailAddress")] |
| public string EmailAddress |
| { |
| get { return emailAddress; } |
| set { this.emailAddress = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("evictingAgency")] |
| public string EvictingAgency |
| { |
| get { return evictingAgency; } |
| set { this.evictingAgency = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("evictionCity")] |
| public string EvictionCity |
| { |
| get { return evictionCity; } |
| set { this.evictionCity = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("evictionDate")] |
| public DateTime? EvictionDate |
| { |
| get { return evictionDate; } |
| set { this.evictionDate = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("evictionState")] |
| public string EvictionState |
| { |
| get { return evictionState; } |
| set { this.evictionState = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("familyMemberID")] |
| public string FamilyMemberID |
| { |
| get { return familyMemberID; } |
| set { this.familyMemberID = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("firstName")] |
| public string FirstName |
| { |
| get { return firstName; } |
| set { this.firstName = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("fkMLSosCodeCitizenship")] |
| public int? FkMLSosCodeCitizenship |
| { |
| get { return fkMLSosCodeCitizenship; } |
| set { this.fkMLSosCodeCitizenship = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("fkMLSosCodeCommunityService")] |
| public int? FkMLSosCodeCommunityService |
| { |
| get { return fkMLSosCodeCommunityService; } |
| set { this.fkMLSosCodeCommunityService = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("fkMLSosCodeEthnicity")] |
| public int? FkMLSosCodeEthnicity |
| { |
| get { return fkMLSosCodeEthnicity; } |
| set { this.fkMLSosCodeEthnicity = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("fkMLSosCodeRelationship")] |
| public int? FkMLSosCodeRelationship |
| { |
| get { return fkMLSosCodeRelationship; } |
| set { this.fkMLSosCodeRelationship = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("fkptCustomRelationship")] |
| public int? FkptCustomRelationship |
| { |
| get { return fkptCustomRelationship; } |
| set { this.fkptCustomRelationship = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("fkptWCertification")] |
| public int FkptWCertification |
| { |
| get { return fkptWCertification; } |
| set { this.fkptWCertification = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("gender")] |
| public string Gender |
| { |
| get { return gender; } |
| set { this.gender = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("isOwnBedroomRequired")] |
| public string IsOwnBedroomRequired |
| { |
| get { return isOwnBedroomRequired; } |
| set { this.isOwnBedroomRequired = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("isVeteran")] |
| public string IsVeteran |
| { |
| get { return isVeteran; } |
| set { this.isVeteran = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("lastName")] |
| public string LastName |
| { |
| get { return lastName; } |
| set { this.lastName = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("lastTestElevatedBloodLeadLevel")] |
| public DateTime? LastTestElevatedBloodLeadLevel |
| { |
| get { return lastTestElevatedBloodLeadLevel; } |
| set { this.lastTestElevatedBloodLeadLevel = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("middleName")] |
| public string MiddleName |
| { |
| get { return middleName; } |
| set { this.middleName = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("namePrefix")] |
| public string NamePrefix |
| { |
| get { return namePrefix; } |
| set { this.namePrefix = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("nameSuffix")] |
| public string NameSuffix |
| { |
| get { return nameSuffix; } |
| set { this.nameSuffix = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("pregnancyDueDate")] |
| public DateTime? PregnancyDueDate |
| { |
| get { return pregnancyDueDate; } |
| set { this.pregnancyDueDate = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("qualifiedDisabilityAllowance")] |
| public string QualifiedDisabilityAllowance |
| { |
| get { return qualifiedDisabilityAllowance; } |
| set { this.qualifiedDisabilityAllowance = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("qualifiedElderlyAllowance")] |
| public string QualifiedElderlyAllowance |
| { |
| get { return qualifiedElderlyAllowance; } |
| set { this.qualifiedElderlyAllowance = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("qualifiedMinorAllowance")] |
| public string QualifiedMinorAllowance |
| { |
| get { return qualifiedMinorAllowance; } |
| set { this.qualifiedMinorAllowance = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("qualifiedStudentAllowance")] |
| public string QualifiedStudentAllowance |
| { |
| get { return qualifiedStudentAllowance; } |
| set { this.qualifiedStudentAllowance = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("socialSecurityNumber")] |
| public string SocialSecurityNumber |
| { |
| get { return socialSecurityNumber; } |
| set { this.socialSecurityNumber = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("stateOfBirth")] |
| public string StateOfBirth |
| { |
| get { return stateOfBirth; } |
| set { this.stateOfBirth = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("mLSosCodeCitzenship")] |
| public MLSosCode MLSosCodeCitzenship |
| { |
| get { return mLSosCodeCitzenship; } |
| set { this.mLSosCodeCitzenship = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("mLSosCodeCommunityService")] |
| public MLSosCode MLSosCodeCommunityService |
| { |
| get { return mLSosCodeCommunityService; } |
| set { this.mLSosCodeCommunityService = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("mLSosCodeEthnicity")] |
| public MLSosCode MLSosCodeEthnicity |
| { |
| get { return mLSosCodeEthnicity; } |
| set { this.mLSosCodeEthnicity = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("mLSosCodeRelationship")] |
| public MLSosCode MLSosCodeRelationship |
| { |
| get { return mLSosCodeRelationship; } |
| set { this.mLSosCodeRelationship = value; } |
| } |
| [Telerik.OpenAccess.FieldAlias("ptWorkingCertification")] |
| public PtWorkingCertification PtWorkingCertification |
| { |
| get { return ptWorkingCertification; } |
| set { this.ptWorkingCertification = value; } |
| } |
| } |
| } |
Any help or suggestions would greatly be appreciated.
Thanks!