Ejemplo n.º 1
0
 /// <summary>Updates a Stylesheet record using Metadata Parameters.</summary>
 /// <param name="transaction">Contains the parameters and exceptions for this command.</param>
 public static void Update(ParameterList parameters)
 {
     // Accessor for the Stylesheet Table.
     ServerMarketData.StylesheetDataTable stylesheetTable = ServerMarketData.Stylesheet;
     // Extract the parameters from the command batch.
     AdoTransaction adoTransaction = parameters["adoTransaction"];
     SqlTransaction sqlTransaction = parameters["sqlTransaction"];
     object configurationId = parameters["configurationId"].Value;
     object name = parameters["name"].Value;
     string externalStylesheetId = ((string)(parameters["stylesheetId"]));
     object externalStylesheetTypeCode = parameters["stylesheetTypeCode"].Value;
     object text = parameters["text"].Value;
     // The row versioning is largely disabled for external operations.
     long rowVersion = long.MinValue;
     // Resolve External Identifiers
     int stylesheetId = Stylesheet.FindRequiredKey(configurationId, "stylesheetId", externalStylesheetId);
     object stylesheetTypeCode = StylesheetType.FindOptionalKey(configurationId, "stylesheetTypeCode", externalStylesheetTypeCode);
     // While the optimistic concurrency checking is disabled for the external methods, the internal methods
     // still need to perform the check.  This ncurrency checking logic by finding the current row version to be
     // will bypass the coused when the internal method is called.
     ServerMarketData.StylesheetRow stylesheetRow = stylesheetTable.FindByStylesheetId(stylesheetId);
     rowVersion = ((long)(stylesheetRow[stylesheetTable.RowVersionColumn]));
     // Call the internal method to complete the operation.
     MarkThree.Guardian.Core.Stylesheet.Update(adoTransaction, sqlTransaction, ref rowVersion, null, null, name, stylesheetId, stylesheetTypeCode, text);
     // Return values.
     parameters["rowVersion"] = rowVersion;
 }
Ejemplo n.º 2
0
 /// <summary>Archives a Stylesheet record using Metadata Parameters.</summary>
 /// <param name="transaction">Contains the parameters and exceptions for this command.</param>
 public static void Archive(ParameterList parameters)
 {
     // Accessor for the Stylesheet Table.
     ServerMarketData.StylesheetDataTable stylesheetTable = ServerMarketData.Stylesheet;
     // Extract the parameters from the command batch.
     AdoTransaction adoTransaction = parameters["adoTransaction"];
     SqlTransaction sqlTransaction = parameters["sqlTransaction"];
     object configurationId = parameters["configurationId"].Value;
     string externalStylesheetId = parameters["stylesheetId"];
     // The row versioning is largely disabled for external operations.
     long rowVersion = long.MinValue;
     // Find the internal identifier using the primar key elements.
     // identifier is used to determine if a record exists with the same key.
     int stylesheetId = Stylesheet.FindRequiredKey(configurationId, "stylesheetId", externalStylesheetId);
     // While the optimistic concurrency checking is disabled for the external methods, the internal methods
     // still need to perform the check.  This ncurrency checking logic by finding the current row version to be
     // will bypass the coused when the internal method is called.
     ServerMarketData.StylesheetRow stylesheetRow = stylesheetTable.FindByStylesheetId(stylesheetId);
     rowVersion = ((long)(stylesheetRow[stylesheetTable.RowVersionColumn]));
     // Call the internal method to complete the operation.
     MarkThree.Guardian.Core.Stylesheet.Archive(adoTransaction, sqlTransaction, rowVersion, stylesheetId);
 }