Example #1
0
        public static string FetchSourceName(SourceType sourceType, int sourceId)
        {
            var result = string.Empty;

            switch (sourceType)
            {
            case SourceType.Task:
                result = sourceId.ToString();
                break;

            case SourceType.Project:
                result = ForeignKeyMapper.FetchProjectName(sourceId);
                break;

            case SourceType.Invoice:
                result = ForeignKeyMapper.FetchInvoiceNumber(sourceId);
                break;

            case SourceType.User:
                result = ForeignKeyMapper.FetchUserName(sourceId);
                break;

            default:
                break;
            }

            return(result);
        }
Example #2
0
 private void OnAssignedToChanged()
 {
     this.LoadProperty(AssignedToNameProperty, ForeignKeyMapper.FetchUserName(this.AssignedTo));
 }
Example #3
0
 private void OnUserIdChanged()
 {
     this.LoadProperty(UserNameProperty, ForeignKeyMapper.FetchUserName(this.UserId));
 }