통화 속성
개요
Microsoft Project를 사용하면 사용자가 프로젝트에 표시되는 통화 비용을 설정할 수 있습니다. 통화 코드, 소수점 다음 숫자 및 통화 기호를 설정하여 비용이 읽기 쉽고 직관적 인 방식으로 표시되도록 정의 할 수 있습니다. ASPOSE.TASK의 C ++는 이러한 기능을 지원하고 개발자가 통화 속성을 설정하고 제어하는 데 도움이되는 일련의 속성을 제공합니다. 이 주제는 통화 속성을 읽는 방법과 설정 방법을 설명합니다.
Aspose.Tasks는 통화 속성 관리를 위해 Project 클래스에서 노출 된 속성을 제공합니다.
CurrencyCode : 예를 들어 USD, GBP 또는 AUD와 같은 3 글자 통화 코드는 문자열로 전달되었습니다.
CurrencyDigits : 소수점 이후의 숫자, 예를 들어, 2 (100.00) 또는 3 (100.000)과 같은 정수로 통과했습니다.
CurrencySymbol: the currency symbol, for example, $ or £, passed as a string.
CurrencySymbolPosition: the position of the currency symbol, for example before ($100) or after (100$). CurrencySymbolPosition takes a value from the CurrencySymbolPositionType enumeration.
Reading Currency Properties
The code example given below demonstrates how to read a project’s currency properties.
Writing Currency Properties
To see the currency properties in Microsoft Project:
Open the project file.
On the Tools menu, select Options.
Click the View tab and for Project 2016 Display. It will look like the one shown below.
The code example given below demonstrates how to write currency properties to the project.
1// The path to the documents directory.
2System::String dataDir = RunExamples::GetDataDir(System::Reflection::MethodBase::GetCurrentMethod(ASPOSE_CURRENT_FUNCTION)->get_DeclaringType().get_FullName());
3
4// Create a project instance
5System::SharedPtr<Project> project = System::MakeObject<Project>(dataDir + u"WriteCurrencyProperties.mpp");
6
7// Set currency properties
8project->Set<System::String>(Prj::CurrencyCode(), u"AUD");
9project->Set<int32_t>(Prj::CurrencyDigits(), 2);
10project->Set<System::String>(Prj::CurrencySymbol(), u"$");
11project->Set<CurrencySymbolPositionType>(Prj::CurrencySymbolPosition(), Aspose::Tasks::CurrencySymbolPositionType::After);
12
13// Save the project as XML project file
14project->Save(dataDir + u"WriteCurrencyProperties_out.xml", Aspose::Tasks::Saving::SaveFileFormat::XML);