Difference between revisions of "QuestionnaireResourceTemplate"

From Catglobe Wiki
Jump to: navigation, search
Line 37: Line 37:
 
qnaireRT.LocalizedNames={"da-DK":" name in DK", "en-US":" name in US"};  
 
qnaireRT.LocalizedNames={"da-DK":" name in DK", "en-US":" name in US"};  
 
qnaireRT.DefaultLanguage("da-DK");
 
qnaireRT.DefaultLanguage("da-DK");
 +
qnaireRT.Save();
 +
</source>
 +
 +
<br/><source lang="javascript">
 +
//Example for working with an existing QuestionaireResourceTemplate
 +
number qnaireResourceTemplateRId = 6879;
 +
ResourceTemplateHelper rth = new ResourceTemplateHelper ();
 +
QuestionnaireResourceTemplate qnaireRT = rth.GetTemplate(qnaireResourceTemplateRId);
 +
qnaireRT.GatewayScriptResourceId=6884;
 
qnaireRT.Save();
 
qnaireRT.Save();
 
</source>
 
</source>

Revision as of 06:07, 16 November 2016

QuestionnaireResourceTemplate



A Questionnaire resource template.

Constructors

  • (string name "Resource name") - Create a new Folder resource template

Methods

  • Empty AddProperty(ResourceTemplateProperty property "Property to add") - Add a new property
  • Empty DefaultLanguage(string isocode "Iso code to set as default") - Which Localized Name is the default
  • Empty RemoveProperty(ResourceTemplateProperty property "Property to remove") - Remove existing property
  • Empty Save() - Save the ResourceTemplate resource
  • Empty SaveProperties() - Save the properties of the ResourceTemplate resource. Ignores changes to all constant options in use
  • string ToString() - The string representation of the object.

Properties

  • int GatewayScriptResourceId { get; set; } - Set the gateway script
  • Dictionary LocalizedNames { get; set; } - Localized Name of the ResourceTemplate resource
  • string ObjectTypeName { get; } - The name of the type of object.
  • array Properties { get; } - Get the list of current properties. Use AddProperty/RemoveProperty to edit order
  • int ResourceId { get; } - The Id of the ResourceTemplate
  • string ResourceName { get; } - Name of the ResourceTemplate resource
  • bool ResourceTimeregEnabled { get; set; } - Get/set ResourceTimeregEnabled
  • TypeInformation TypeInformation { get; } - Get information about this class.


Examples

// EX for creating a new QuestionnaireResourceTemplate 
QuestionnaireResourceTemplate qnaireRT = new QuestionnaireResourceTemplate ("qnaireRT Name");
qnaireRT.LocalizedNames={"da-DK":" name in DK", "en-US":" name in US"}; 
qnaireRT.DefaultLanguage("da-DK");
qnaireRT.Save();


//Example for working with an existing QuestionaireResourceTemplate 
number qnaireResourceTemplateRId = 6879;
ResourceTemplateHelper rth = new ResourceTemplateHelper ();
QuestionnaireResourceTemplate qnaireRT = rth.GetTemplate(qnaireResourceTemplateRId);
qnaireRT.GatewayScriptResourceId=6884;
qnaireRT.Save();