Esempio n. 1
0
 /// <summary>Finds a a StylesheetType record using a configuration and an external identifier.</summary>
 /// <param name="configurationId">Specified which mappings (user id columns) to use when looking up external identifiers.</param>
 /// <param name="externalId">The external identifier for the record.</param>
 public static int FindRequiredKey(object configurationId, string parameterId, string externalId)
 {
     // Look up the internal identifier using the configuration to select the ExternalId column and the external identifier to identify the record
     int internalId = StylesheetType.FindKey(configurationId, parameterId, externalId);
     if ((internalId == int.MinValue))
     {
         throw new Exception(string.Format("The StylesheetType table does not have a record identified by \'{0}\'", externalId));
     }
     // Return the internal identifier.
     return internalId;
 }
Esempio n. 2
0
 /// <summary>Finds a a StylesheetType record using a configuration and an external identifier.</summary>
 /// <param name="configurationId">Specified which mappings (user id columns) to use when looking up external identifiers.</param>
 /// <param name="externalId">The external (user supplied) identifier for the record.</param>
 public static object FindOptionalKey(object configurationId, string parameterId, object externalId)
 {
     // Look up the internal identifier using the the configuration to specify which ExternalId column to use as an index.
     object internalId = null;
     if ((externalId != null))
     {
         internalId = StylesheetType.FindKey(configurationId, parameterId, ((string)(externalId)));
         if ((((int)(internalId)) == int.MinValue))
         {
             throw new Exception(string.Format("The StylesheetType table does not have a record identified by \'{0}\'", externalId));
         }
     }
     // Return the internal identifier.
     return internalId;
 }