Created
January 21, 2015 13:36
-
-
Save stdray/3d12a6e384987e7722bf to your computer and use it in GitHub Desktop.
map many
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public MapPlanGraphPositions(src : ZakupkiV1.zfcs_tenderPlanType) : array[PlanGraphPositionType] | |
| { | |
| from pos in src.providedPurchases.positions | |
| select entity() <- | |
| { | |
| Conditions <- | |
| { | |
| Advance = pos.purchaseConditions.advance; | |
| ContractFinanceCondition <- | |
| { | |
| Amount = tryParseDecimal(pos.purchaseConditions.contractFinCondition.amount); | |
| Procedure = pos.purchaseConditions.contractFinCondition.procedure; | |
| } | |
| Graph <- | |
| { | |
| ContractExecutionDate = date(pos.purchaseConditions.purchaseGraph.contractExecutionTerm); | |
| ContractExecutionStages = pos.purchaseConditions.purchaseGraph.contractExecutionStages; | |
| Periodicity = pos.purchaseConditions.purchaseGraph.periodicity; | |
| TenderPlacingDate = date(pos.purchaseConditions.purchaseGraph.purchasePlacingTerm); | |
| } | |
| Preferences = | |
| from pref in pos.purchaseConditions.preferensesRequirement.preferenses | |
| select entity() <- | |
| { | |
| Preference <- { Code = str(pref.code); Name = pref.name } | |
| Value = cast(decimal?, pref.prefValue); | |
| } | |
| Prohibitions = pos.purchaseConditions.prohibitions; | |
| Requirements = | |
| from req in pos.purchaseConditions.preferensesRequirement.requirements | |
| select entity() <- | |
| { | |
| Content = req.content; | |
| Requirement <- { Code = str(req.code); Name = req.name; } | |
| } | |
| TenderFinanceCondition <- | |
| { | |
| Amount = tryParseDecimal(pos.purchaseConditions.purchaseFinCondition.amount); | |
| Procedure = pos.purchaseConditions.purchaseFinCondition.procedure; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment