Difference between revisions of "ReportTemplate class"

From Catglobe Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 
{{CGscriptClass_Template
 
{{CGscriptClass_Template
|Name=ReportTemplate
+
|Name=<nowiki>ReportTemplate</nowiki>
|Description=A report template
+
|Description=<nowiki>A report template</nowiki>
|Constructors=
+
|InheritsFrom=object|Constructors=
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
{{CGscriptParameters_Template|Type=int|Name=resourceId|Description=ResourceId of existing template}}
+
{{CGscriptParameters_Template|Type=int|Name=<nowiki>resourceId</nowiki>|Description=<nowiki>ResourceId of existing template</nowiki>}}
|Description=Fetch existing template}}
+
|Description=<nowiki>Fetch existing template</nowiki>}}
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
{{CGscriptParameters_Template|Type=string|Name=name|Description=Resource name|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=parentResourceId|Description=Parent resource}}
+
{{CGscriptParameters_Template|Type=string|Name=<nowiki>name</nowiki>|Description=<nowiki>Resource name</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>parentResourceId</nowiki>|Description=<nowiki>Parent resource</nowiki>}}
|Description=Create new template}}
+
|Description=<nowiki>Create new template</nowiki>}}
 
|Methods=
 
|Methods=
{{CGscriptMethods_Template|ReturnType=Empty|Name=DefaultLanguage|Parameters=
+
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>DefaultLanguage</nowiki>|Parameters=
{{CGscriptParameters_Template|Type=string|Name=isocode|Description=Iso code to set as default}}
+
{{CGscriptParameters_Template|Type=string|Name=<nowiki>isocode</nowiki>|Description=<nowiki>Iso code to set as default</nowiki>}}
|Description=Which content is the default}}
+
|Description=<nowiki>Which content is the default</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=Save|Description=Save the template}}
+
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Save</nowiki>|Description=<nowiki>Save the template</nowiki>}}
{{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}}
+
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=object|Description=<nowiki>The string representation of the object.</nowiki>}}
 
|Properties=
 
|Properties=
{{CGscriptProperties_Template|ReturnType=Dictionary|Name=LocalizedContent|HasGetter=1|HasSetter=1|Description=Localized content of the template}}
+
{{CGscriptProperties_Template|ReturnType=Dictionary|Name=<nowiki>LocalizedContent</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Localized content of the template</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=Name|HasGetter=1|Description=Name of the template}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Name</nowiki>|HasGetter=1|Description=<nowiki>Name of the template</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
{{CGscriptProperties_Template|ReturnType=int|Name=ResourceId|HasGetter=1|Description=Resource Id of the template}}
+
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ResourceId</nowiki>|HasGetter=1|Description=<nowiki>Resource Id of the template</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
+
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}}
{{CGscriptProperties_Template|ReturnType=string|Name=ViewUrl|HasGetter=1|Description=Url to use to view template}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ViewUrl</nowiki>|HasGetter=1|Description=<nowiki>Url to use to view template</nowiki>}}
 
}}
 
}}
  

Latest revision as of 09:44, 2 July 2020

ReportTemplate



A report template

Parent class

Inherits from object

Constructors

  • (int resourceId "ResourceId of existing template") - Fetch existing template
  • (string name "Resource name", int parentResourceId "Parent resource") - Create new template

Methods

  • Empty DefaultLanguage(string isocode "Iso code to set as default") - Which content is the default
  • Empty Save() - Save the template
  • (From object) string ToString() - The string representation of the object.

Properties

  • Dictionary LocalizedContent { get; set; } - Localized content of the template
  • string Name { get; } - Name of the template
  • string ObjectTypeName { get; } - The name of the type of object.
  • int ResourceId { get; } - Resource Id of the template
  • (From object) TypeInformation TypeInformation { get; } - Get information about this class.
  • string ViewUrl { get; } - Url to use to view template


Examples

//Create new report template:
ReportTemplate rt = new ReportTemplate ("Antest1",11088827);
Dictionary content = {
 "da-DK":"content in DK",
 "en-US":"content in US"
};
rt.LocalizedContent=content;
rt.DefaultLanguage("en-US");
rt.Save();
print(rt.ResourceId);//15550190
//Get an existing report template:
ReportTemplate rt = new ReportTemplate (15550190);
print(rt.ViewUrl);///CatglobeInABox/#Cross/15550190
print(rt.ResourceId);//15550190
print(rt.Name);//Antest1