Project class: Difference between revisions
From Catglobe Wiki
More actions
Created page with "{{CGscriptClass_Template|Name=<nowiki>Project</nowiki>|Description=<nowiki>Represents a Project resource.</nowiki>|InheritsFrom=Array|Constructors={{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Template|Type=int|Name=<nowiki>Project unique id</nowiki>|Description=<nowiki>Project resource id</nowiki>}} |Description=<nowiki>Get an existing project by resource id</nowiki>}} {{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Template|Type=stri..." Â |
No edit summary  |
||
| Line 1: | Line 1: | ||
{{CGscriptClass_Template|Name=<nowiki>Project</nowiki>|Description=<nowiki>Represents a Project resource.</nowiki>|InheritsFrom=Array|Constructors={{CGscriptConstructors_Template|Parameters= | {{CGscriptClass_Template | ||
|Name=<nowiki>Project</nowiki> | |||
|Description=<nowiki>Represents a Project resource.</nowiki> | |||
|InheritsFrom=Array|Constructors= | |||
{{CGscriptConstructors_Template|Parameters= | |||
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Project unique id</nowiki>|Description=<nowiki>Project resource id</nowiki>}} | {{CGscriptParameters_Template|Type=int|Name=<nowiki>Project unique id</nowiki>|Description=<nowiki>Project resource id</nowiki>}} | ||
|Description=<nowiki>Get an existing project by resource id</nowiki>}} | |Description=<nowiki>Get an existing project by resource id</nowiki>}} | ||
{{CGscriptConstructors_Template|Parameters= | {{CGscriptConstructors_Template|Parameters= | ||
{{CGscriptParameters_Template|Type=string|Name=<nowiki>Project name</nowiki>|Description=<nowiki>Name of the new project</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Project template unique id</nowiki>|Description=<nowiki>Resource id of the project resource template</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Parent resource unique id</nowiki>|Description=<nowiki>Resource id of the parent resource</nowiki>}} | {{CGscriptParameters_Template|Type=string|Name=<nowiki>Project name</nowiki>|Description=<nowiki>Name of the new project</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Project template unique id</nowiki>|Description=<nowiki>Resource id of the project resource template</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Parent resource unique id</nowiki>|Description=<nowiki>Resource id of the parent resource</nowiki>}} | ||
|Description=<nowiki>Create a new project</nowiki>}}|Methods={{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Save</nowiki>|Description=<nowiki>Save this project to the database, creating or updating the underlying project resource</nowiki>}} | |Description=<nowiki>Create a new project</nowiki>}} | ||
|Methods= | |||
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Save</nowiki>|Description=<nowiki>Save this project to the database, creating or updating the underlying project resource</nowiki>}} | |||
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}} | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=object|Name=<nowiki>this[] { get; }</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=object|Name=<nowiki>this[] { get; }</nowiki>|Parameters= | ||
| Line 11: | Line 17: | ||
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>this[] { get; }</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>this[] { get; }</nowiki>|Parameters= | ||
{{CGscriptParameters_Template|Type=int|Name=<nowiki>index</nowiki>|Description=<nowiki>Index</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=object|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to set</nowiki>}} | {{CGscriptParameters_Template|Type=int|Name=<nowiki>index</nowiki>|Description=<nowiki>Index</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=object|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to set</nowiki>}} | ||
|Description=<nowiki>Backward-compatible indexer</nowiki>}}|Properties={{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>ActualEndDate</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Actual end date</nowiki>}} | |Description=<nowiki>Backward-compatible indexer</nowiki>}} | ||
|Properties= | |||
{{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>ActualEndDate</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Actual end date</nowiki>}} | |||
{{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>ActualStartDate</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Actual start date</nowiki>}} | {{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>ActualStartDate</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Actual start date</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Average</nowiki>|HasGetter=1|Description=<nowiki>Average of the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}} | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Average</nowiki>|HasGetter=1|Description=<nowiki>Average of the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}} | ||
| Line 31: | Line 39: | ||
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>TimeBudget</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Man-hours budget</nowiki>}} | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>TimeBudget</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Man-hours budget</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>TimeRegistration</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Whether time registration is enabled</nowiki>}} | {{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>TimeRegistration</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Whether time registration is enabled</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}|StaticMethods={{CGscriptMethods_Template|ReturnType=Project|Name=<nowiki>Project_getProjectByCode</nowiki>|Parameters= | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}} | ||
|StaticMethods= | |||
{{CGscriptMethods_Template|ReturnType=Project|Name=<nowiki>Project_getProjectByCode</nowiki>|Parameters= | |||
{{CGscriptParameters_Template|Type=string|Name=<nowiki>Project code</nowiki>|Description=<nowiki>Project code</nowiki>}} | {{CGscriptParameters_Template|Type=string|Name=<nowiki>Project code</nowiki>|Description=<nowiki>Project code</nowiki>}} | ||
|Description=<nowiki>Get the existed project array object by using project code.</nowiki>}} | |Description=<nowiki>Get the existed project array object by using project code.</nowiki>}} | ||
| Line 39: | Line 49: | ||
{{CGscriptMethods_Template|ReturnType=Project|Name=<nowiki>Project_getProjectByResourceId</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=Project|Name=<nowiki>Project_getProjectByResourceId</nowiki>|Parameters= | ||
{{CGscriptParameters_Template|Type=int|Name=<nowiki>Project unique id</nowiki>|Description=<nowiki>Project unique id</nowiki>}} | {{CGscriptParameters_Template|Type=int|Name=<nowiki>Project unique id</nowiki>|Description=<nowiki>Project unique id</nowiki>}} | ||
|Description=<nowiki>Get the existed project array object by using project unique id.</nowiki>}}}} | |Description=<nowiki>Get the existed project array object by using project unique id.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=Project|Name=<nowiki>Project_new</nowiki>|Parameters= | |||
{{CGscriptParameters_Template|Type=string|Name=<nowiki>Project name</nowiki>|Description=<nowiki>Name of the new project</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Project template unique id</nowiki>|Description=<nowiki>Resource id of the project resource template</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>Parent resource unique id</nowiki>|Description=<nowiki>Resource id of the parent resource</nowiki>}} | |||
|Obsolete=1 | |||
|Description=<nowiki>Create a new project array object with the given name, resource template and parent resource</nowiki>}} | |||
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Project_save</nowiki>|Parameters= | |||
{{CGscriptParameters_Template|Type=Project|Name=<nowiki>Project</nowiki>|Description=<nowiki>The project to save</nowiki>}} | |||
|Obsolete=1 | |||
|Description=<nowiki>Save a project to the database, creating or updating the underlying project resource</nowiki>}} | |||
}} | |||
Latest revision as of 09:40, 11 May 2026
Project
Represents a Project resource.
Parent class
Inherits from Array
Constructors
- (int Project unique id "Project resource id") - Get an existing project by resource id
- (string Project name "Name of the new project", int Project template unique id "Resource id of the project resource template", int Parent resource unique id "Resource id of the parent resource") - Create a new project
Methods
- Empty Save() - Save this project to the database, creating or updating the underlying project resource
- string ToString() - The string representation of the object.
- object this[] { get; }(int index "Index") - Backward-compatible indexer
- Empty this[] { get; }(int index "Index", object value "Value to set") - Backward-compatible indexer
Properties
- DateTime ActualEndDate { get; set; } - Actual end date
- DateTime ActualStartDate { get; set; } - Actual start date
- number Average { get; } - Average of the objects in the Array object. Can only use if all the elements are of type Number
- bool CalculatedManHours { get; set; } - Whether man-hours are calculated automatically
- string ClientRefNo { get; set; } - Client reference number
- string Code { get; set; } - Project code
- bool Completed { get; set; } - Whether the project is completed
- number Max { get; } - Largest of all the objects in the Array object. Can only use if all the elements are of type Number
- number Min { get; } - Smallest of all the objects in the Array object. Can only use if all the elements are of type Number
- string Name { get; set; } - Name of the project
- string ObjectTypeName { get; } - The name of the type of object.
- int ParentResourceId { get; set; } - Resource id of the parent resource
- DateTime PlannedEndDate { get; set; } - Planned end date
- DateTime PlannedStartDate { get; set; } - Planned start date
- int ProposeCode { get; } - Proposed project code number
- int ResourceId { get; } - Resource id of the project
- number Sum { get; } - Sum of all the objects in the Array object. Can only use if all the elements are of type Number
- int TemplateResourceId { get; } - Resource id of the project template
- int TimeBudget { get; set; } - Man-hours budget
- bool TimeRegistration { get; set; } - Whether time registration is enabled
- TypeInformation TypeInformation { get; } - Get information about this class.
Static Methods
- Project Project_getProjectByCode(string Project code "Project code") - Get the existed project array object by using project code.
- Project Project_getProjectByName(string Project qualified name "Project qualified name") - Get the existed project array object by using project name.
- Project Project_getProjectByResourceId(int Project unique id "Project unique id") - Get the existed project array object by using project unique id.
- Project Project_new(string Project name "Name of the new project", int Project template unique id "Resource id of the project resource template", int Parent resource unique id "Resource id of the parent resource") - Create a new project array object with the given name, resource template and parent resource
- Empty Project_save(Project Project "The project to save") - Save a project to the database, creating or updating the underlying project resource