var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var F02110;
(function (F02110) {
    var ObasTableFields = (function (_super) {
        __extends(ObasTableFields, _super);
        function ObasTableFields() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        Object.defineProperty(ObasTableFields, "OtherRubField", {
            get: function () {
                if (this._otherRubField == null) {
                    this._otherRubField = new BaseGenericObasTableField("Other_Rub_Y");
                }
                return this._otherRubField;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObasTableFields, "FnYearField", {
            get: function () {
                if (this._fnYearField == null) {
                    this._fnYearField = new BaseGenericObasTableField("Fn_Y");
                }
                return this._fnYearField;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObasTableFields, "R4YearField", {
            get: function () {
                if (this._r4YearField == null) {
                    this._r4YearField = new BaseGenericObasTableField("R4_Y");
                }
                return this._r4YearField;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObasTableFields, "FnRubField", {
            get: function () {
                if (this._fnRubField == null) {
                    this._fnRubField = new BaseGenericObasTableField("Fn_Rub_Y");
                }
                return this._fnRubField;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObasTableFields, "R4RubField", {
            get: function () {
                if (this._r4RubField == null) {
                    this._r4RubField = new BaseGenericObasTableField("R4_Rub_Y");
                }
                return this._r4RubField;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObasTableFields, "FnUsdField", {
            get: function () {
                if (this._fnUsdField == null) {
                    this._fnUsdField = new BaseGenericObasTableField("Fn_Usd_Y");
                }
                return this._fnUsdField;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObasTableFields, "R4UsdField", {
            get: function () {
                if (this._r4UsdField == null) {
                    this._r4UsdField = new BaseGenericObasTableField("R4_Usd_Y");
                }
                return this._r4UsdField;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObasTableFields, "FnOtherRubField", {
            get: function () {
                if (this._fnOtherRubField == null) {
                    this._fnOtherRubField = new BaseGenericObasTableField("Fn_Other_Rub_Y");
                }
                return this._fnOtherRubField;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObasTableFields, "R4OtherRubField", {
            get: function () {
                if (this._r4OtherRubField == null) {
                    this._r4OtherRubField = new BaseGenericObasTableField("R4_Other_Rub_Y");
                }
                return this._r4OtherRubField;
            },
            enumerable: true,
            configurable: true
        });
        ObasTableFields._otherRubField = null;
        ObasTableFields._fnYearField = null;
        ObasTableFields._r4YearField = null;
        ObasTableFields._fnRubField = null;
        ObasTableFields._r4RubField = null;
        ObasTableFields._fnUsdField = null;
        ObasTableFields._r4UsdField = null;
        ObasTableFields._fnOtherRubField = null;
        ObasTableFields._r4OtherRubField = null;
        return ObasTableFields;
    }(BaseObasTableFields));
    F02110.ObasTableFields = ObasTableFields;
    var TableRules = (function () {
        function TableRules(_document) {
            this._document = _document;
        }
        return TableRules;
    }());
    F02110.TableRules = TableRules;
    var StrKeysP1;
    (function (StrKeysP1) {
        StrKeysP1[StrKeysP1["Total"] = 1] = "Total";
        StrKeysP1[StrKeysP1["P2"] = 2] = "P2";
        StrKeysP1[StrKeysP1["P3"] = 3] = "P3";
    })(StrKeysP1 = F02110.StrKeysP1 || (F02110.StrKeysP1 = {}));
    var FObasTableP1Total = (function (_super) {
        __extends(FObasTableP1Total, _super);
        function FObasTableP1Total() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        FObasTableP1Total.prototype.GetTotalKey = function () {
            return StrKeysP1.Total;
        };
        FObasTableP1Total.prototype.SumChangeEventHandler = function (tableId, oldValue, newValue, fieldId) {
            if (this.StrKey === 100) {
                if (this.GetFieldValue(fieldId) < -100 || this.GetFieldValue(fieldId) > 100) {
                    Client.ShowMessage("\u041E\u0448\u0438\u0431\u043A\u0430", "\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043F\u043E\u043B\u044F \u0434\u043E\u043B\u0436\u043D\u043E \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u044C\u0441\u044F \u0432 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u0435 \u043E\u0442 -100 \u0434\u043E 100.", MessageIcons.Error);
                    this.SetFieldValue(fieldId, oldValue);
                }
            }
            _super.prototype.SumChangeEventHandler.call(this, tableId, oldValue, newValue, fieldId);
        };
        return FObasTableP1Total;
    }(P1TotalObasTable));
    F02110.FObasTableP1Total = FObasTableP1Total;
    var PurchaseObjectsSprTable = (function (_super) {
        __extends(PurchaseObjectsSprTable, _super);
        function PurchaseObjectsSprTable() {
            var _this = _super.call(this, "PurchaseObjects") || this;
            _this._number = null;
            _this._npaGroupKey = null;
            _this._npaGroup = null;
            return _this;
        }
        Object.defineProperty(PurchaseObjectsSprTable.prototype, "Number", {
            get: function () {
                if (this._number == null) {
                    this._number = new ObasTableField("Number", this);
                }
                return this._number;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PurchaseObjectsSprTable.prototype, "NpaGroupKey", {
            get: function () {
                if (this._npaGroupKey == null) {
                    this._npaGroupKey = new NumberObasTableField("SubgroupNormativeExpenses_ID", this);
                }
                return this._npaGroupKey;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PurchaseObjectsSprTable.prototype, "NpaGroup", {
            get: function () {
                if (this._npaGroup == null) {
                    this._npaGroup = new ObasSprTableField(ObasTableCollection.SubgroupNormativeExpensesSprTable, this);
                }
                return this._npaGroup;
            },
            enumerable: true,
            configurable: true
        });
        return PurchaseObjectsSprTable;
    }(SprTable));
    F02110.PurchaseObjectsSprTable = PurchaseObjectsSprTable;
    var PartObjectDataTable = (function (_super) {
        __extends(PartObjectDataTable, _super);
        function PartObjectDataTable(id, _document, _descTable) {
            var _this = _super.call(this, id) || this;
            _this._document = _document;
            _this._descTable = _descTable;
            _this._objectKey = null;
            _this._object = _this._document.PurchaseObjectsSprTable;
            _this._deletedObjKey = 0;
            return _this;
        }
        Object.defineProperty(PartObjectDataTable.prototype, "ObjectKey", {
            get: function () {
                if (this._objectKey == null) {
                    this._objectKey = new NumberObasTableField("PurchaseObjects_ID", this);
                }
                return this._objectKey;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PartObjectDataTable.prototype, "ObjectName", {
            get: function () {
                this._object.LocateByKeys(this.ObjectKey.Value);
                return this._object.Name;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PartObjectDataTable.prototype, "ObjectNumber", {
            get: function () {
                this._object.LocateByKeys(this.ObjectKey.Value);
                return this._object.Number;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PartObjectDataTable.prototype, "ObjectNpaGroupCode", {
            get: function () {
                this._object.LocateByKeys(this.ObjectKey.Value);
                return this._object.NpaGroup.Code;
            },
            enumerable: true,
            configurable: true
        });
        PartObjectDataTable.prototype.CalcSubgroupNormativeExpensesName = function () {
            this._object.LocateByKeys(this.ObjectKey.Value);
            return this._object.NpaGroup.Name || "";
        };
        PartObjectDataTable.prototype.ObjectChangeEventHandler = function (tableId, oldValue, newValue, fieldId) {
            this.AfterDeleteEventHandler(this.Id, oldValue);
            this._descTable.AddObject(newValue);
        };
        PartObjectDataTable.prototype.DeleteEventHandler = function (tableId) {
            this._deletedObjKey = this.ObjectKey.Value;
        };
        PartObjectDataTable.prototype.AfterDeleteEventHandler = function (tableId, objKey) {
            if (objKey === void 0) { objKey = this._deletedObjKey; }
            this._descTable.DeleteObject(objKey);
        };
        return PartObjectDataTable;
    }(ObasTable));
    F02110.PartObjectDataTable = PartObjectDataTable;
    var PartOkpdTable = (function (_super) {
        __extends(PartOkpdTable, _super);
        function PartOkpdTable(id, document, parent) {
            var _this = _super.call(this, id, document, parent) || this;
            _this._okpdKey = null;
            _this._okpd = null;
            return _this;
        }
        Object.defineProperty(PartOkpdTable.prototype, "OKPDKey", {
            get: function () {
                if (this._okpdKey == null) {
                    this._okpdKey = new NumberObasTableField("OKPD_ID", this);
                }
                return this._okpdKey;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PartOkpdTable.prototype, "Okpd", {
            get: function () {
                if (this._okpd == null) {
                    this._okpd = new ObasSprTableField(ObasTableCollection.OkpdSprTable, this);
                }
                return this._okpd;
            },
            enumerable: true,
            configurable: true
        });
        return PartOkpdTable;
    }(ObasTableWithSimpleKeysParent));
    F02110.PartOkpdTable = PartOkpdTable;
    var PartKosguTable = (function (_super) {
        __extends(PartKosguTable, _super);
        function PartKosguTable(id, document, parent) {
            var _this = _super.call(this, id, document, parent) || this;
            _this._kosguKey = null;
            _this._kosgu = null;
            _this._analysisFeatureKey = null;
            _this._analysisFeature = null;
            _this._year = null;
            return _this;
        }
        Object.defineProperty(PartKosguTable.prototype, "KosguKey", {
            get: function () {
                if (this._kosguKey == null) {
                    this._kosguKey = new NumberObasTableField("KOSGU_ID", this);
                }
                return this._kosguKey;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PartKosguTable.prototype, "Kosgu", {
            get: function () {
                if (this._kosgu == null) {
                    this._kosgu = new ObasSprTableField(ObasTableCollection.KosguSprTable, this);
                }
                return this._kosgu;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PartKosguTable.prototype, "AnalysisFeatureKey", {
            get: function () {
                if (this._analysisFeatureKey == null) {
                    this._analysisFeatureKey = new NumberObasTableField("AddAnalysisFeature_ID", this);
                }
                return this._analysisFeatureKey;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PartKosguTable.prototype, "AnalysisFeature", {
            get: function () {
                if (this._analysisFeature == null) {
                    this._analysisFeature = new ObasSprTableField(ObasTableCollection.AddAnalysisFeatureSprtable, this);
                }
                return this._analysisFeature;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(PartKosguTable.prototype, "Year", {
            get: function () {
                if (this._year == null) {
                    this._year = new NumberObasTableField(BaseObasTableFields.YearField.Id, this);
                }
                return this._year;
            },
            enumerable: true,
            configurable: true
        });
        PartKosguTable.prototype.SumPartsChangeEventHandler = function (tableId, oldValue, newValue, fieldId) {
            this.SetFieldValue(BaseObasTableFields.YearDataField.GenerateId(fieldId), (this.GetFieldValue(ObasTableFields.FnYearField.GenerateId(fieldId)) || 0) +
                (this.GetFieldValue(ObasTableFields.R4YearField.GenerateId(fieldId)) || 0));
        };
        PartKosguTable.prototype.TotalSumChangeEventHandler = function (tableId, oldValue, newValue, fieldId) {
            var totalTable = this._document.TotalTable;
            var yearDataField = BaseObasTableFields.YearDataField;
            totalTable.SetSumByKeys(fieldId, totalTable.GetKeys(StrKeysP1.P2), oldValue, newValue);
        };
        PartKosguTable.prototype.DeleteEventHandler = function (tableId) {
            var totalTable = this._document.TotalTable;
            totalTable.Locate("StrKey", StrKeysP1.P2);
            for (var i = 0; i <= ObasStageSettings.YearsCount; i++) {
                var fieldId = "Y" + (i + 1);
                totalTable.SetFieldValue(fieldId, totalTable.GetFieldValue(fieldId) - (this.GetFieldValue(fieldId) || 0));
            }
        };
        return PartKosguTable;
    }(ObasTableWithSimpleKeysParent));
    F02110.PartKosguTable = PartKosguTable;
    var UsdPartObjectDataTable = (function (_super) {
        __extends(UsdPartObjectDataTable, _super);
        function UsdPartObjectDataTable(id, document, parentTable, _descTable) {
            var _this = _super.call(this, id, document, parentTable) || this;
            _this._descTable = _descTable;
            _this._objectKey = null;
            _this._object = _this._document.PurchaseObjectsSprTable;
            _this._deletedObjKey = 0;
            return _this;
        }
        Object.defineProperty(UsdPartObjectDataTable.prototype, "ObjectKey", {
            get: function () {
                if (this._objectKey == null) {
                    this._objectKey = new NumberObasTableField("PurchaseObjects_ID", this);
                }
                return this._objectKey;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(UsdPartObjectDataTable.prototype, "ObjectName", {
            get: function () {
                this._object.LocateByKeys(this.ObjectKey.Value);
                return this._object.Name;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(UsdPartObjectDataTable.prototype, "ObjectNumber", {
            get: function () {
                this._object.LocateByKeys(this.ObjectKey.Value);
                return this._object.Number;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(UsdPartObjectDataTable.prototype, "ObjectNpaGroupCode", {
            get: function () {
                this._object.LocateByKeys(this.ObjectKey.Value);
                return this._object.NpaGroup.Code;
            },
            enumerable: true,
            configurable: true
        });
        UsdPartObjectDataTable.prototype.CalcSubgroupNormativeExpensesName = function () {
            this._object.LocateByKeys(this.ObjectKey.Value);
            return this._object.NpaGroup.Name || "";
        };
        UsdPartObjectDataTable.prototype.ObjectChangeEventHandler = function (tableId, oldValue, newValue, fieldId) {
            this.AfterDeleteEventHandler(this.Id, oldValue);
            this._descTable.AddObject(newValue);
        };
        UsdPartObjectDataTable.prototype.DeleteEventHandler = function (tableId) {
            this._deletedObjKey = this.ObjectKey.Value;
        };
        UsdPartObjectDataTable.prototype.AfterDeleteEventHandler = function (tableId, objKey) {
            if (objKey === void 0) { objKey = this._deletedObjKey; }
            this._descTable.DeleteObject(objKey);
        };
        return UsdPartObjectDataTable;
    }(ObasTableWithSimpleKeysParent));
    F02110.UsdPartObjectDataTable = UsdPartObjectDataTable;
    var UsdPartKosguTable = (function (_super) {
        __extends(UsdPartKosguTable, _super);
        function UsdPartKosguTable(id, document, parent) {
            return _super.call(this, id, document, parent) || this;
        }
        UsdPartKosguTable.prototype.SumPartsUsdChangeEventHandler = function (tableId, oldValue, newValue, fieldId) {
            this.SetFieldValue(BaseObasTableFields.UsdYearDataField.GenerateId(fieldId), (this.GetFieldValue(ObasTableFields.FnUsdField.GenerateId(fieldId)) || 0) +
                (this.GetFieldValue(ObasTableFields.R4UsdField.GenerateId(fieldId)) || 0));
            var yearOffSet = ObasHelper.GetYearOffsetById(fieldId);
            var usdValue = this.Document.CommonRules.GetDollarRateByYear(ObasStageSettings.CurrentYear + yearOffSet);
            fieldId = fieldId.replace(/Usd/g, "Rub");
            this.SetFieldValue(fieldId, usdValue * newValue);
        };
        UsdPartKosguTable.prototype.SumPartsRubChangeEventHandler = function (tableId, oldValue, newValue, fieldId) {
            this.SetFieldValue(BaseObasTableFields.RubYearDataField.GenerateId(fieldId), (this.GetFieldValue(ObasTableFields.FnRubField.GenerateId(fieldId)) || 0) +
                (this.GetFieldValue(ObasTableFields.R4RubField.GenerateId(fieldId)) || 0));
            this.SumPartsChangeEventHandler(tableId, oldValue, newValue, fieldId);
        };
        UsdPartKosguTable.prototype.SumPartsOtherRubChangeEventHandler = function (tableId, oldValue, newValue, fieldId) {
            this.SetFieldValue(ObasTableFields.OtherRubField.GenerateId(fieldId), (this.GetFieldValue(ObasTableFields.FnOtherRubField.GenerateId(fieldId)) || 0) +
                (this.GetFieldValue(ObasTableFields.R4OtherRubField.GenerateId(fieldId)) || 0));
            this.SumPartsChangeEventHandler(tableId, oldValue, newValue, fieldId);
        };
        UsdPartKosguTable.prototype.SumPartsChangeEventHandler = function (tableId, oldValue, newValue, fieldId) {
            if (fieldId.indexOf("Fn") > -1) {
                this.SetFieldValue(ObasTableFields.FnYearField.GenerateId(fieldId), (this.GetFieldValue(ObasTableFields.FnRubField.GenerateId(fieldId)) || 0) +
                    (this.GetFieldValue(ObasTableFields.FnOtherRubField.GenerateId(fieldId)) || 0));
            }
            else {
                this.SetFieldValue(ObasTableFields.R4YearField.GenerateId(fieldId), (this.GetFieldValue(ObasTableFields.R4RubField.GenerateId(fieldId)) || 0) +
                    (this.GetFieldValue(ObasTableFields.R4OtherRubField.GenerateId(fieldId)) || 0));
            }
        };
        UsdPartKosguTable.prototype.TotalSumPartsChangeEventHandler = function (tableId, oldValue, newValue, fieldId) {
            this.SetFieldValue(BaseObasTableFields.YearDataField.GenerateId(fieldId), (this.GetFieldValue(BaseObasTableFields.RubYearDataField.GenerateId(fieldId)) || 0) +
                (this.GetFieldValue(ObasTableFields.OtherRubField.GenerateId(fieldId)) || 0));
        };
        UsdPartKosguTable.prototype.TotalSumChangeEventHandler = function (tableId, oldValue, newValue, fieldId) {
            var totalTable = this._document.TotalTable;
            var yearDataField = BaseObasTableFields.YearDataField;
            totalTable.SetSumByKeys(fieldId, totalTable.GetKeys(StrKeysP1.P3), oldValue, newValue);
        };
        UsdPartKosguTable.prototype.DeleteEventHandler = function (tableId) {
            var totalTable = this._document.TotalTable;
            totalTable.Locate("StrKey", StrKeysP1.P3);
            for (var i = 0; i <= ObasStageSettings.YearsCount; i++) {
                var fieldId = "Y" + (i + 1);
                totalTable.SetFieldValue(fieldId, totalTable.GetFieldValue(fieldId) - (this.GetFieldValue(fieldId) || 0));
            }
        };
        return UsdPartKosguTable;
    }(PartKosguTable));
    F02110.UsdPartKosguTable = UsdPartKosguTable;
    var ObjectDescTable = (function (_super) {
        __extends(ObjectDescTable, _super);
        function ObjectDescTable(id, _document) {
            var _this = _super.call(this, id) || this;
            _this._document = _document;
            _this._program = null;
            _this._action = null;
            _this._result = null;
            _this._rationale = null;
            _this._info = null;
            _this._objectKey = null;
            _this._object = _this._document.PurchaseObjectsSprTable;
            return _this;
        }
        Object.defineProperty(ObjectDescTable.prototype, "Info", {
            get: function () {
                if (this._info == null) {
                    this._info = new ObasTableField("Info", this);
                }
                return this._info;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescTable.prototype, "Rationale", {
            get: function () {
                if (this._rationale == null) {
                    this._rationale = new ObasTableField("Rationale", this);
                }
                return this._rationale;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescTable.prototype, "Result", {
            get: function () {
                if (this._result == null) {
                    this._result = new ObasTableField("Result", this);
                }
                return this._result;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescTable.prototype, "Action", {
            get: function () {
                if (this._action == null) {
                    this._action = new ObasTableField("ActionName", this);
                }
                return this._action;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescTable.prototype, "Program", {
            get: function () {
                if (this._program == null) {
                    this._program = new ObasTableField("ProgName", this);
                }
                return this._program;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescTable.prototype, "ObjectKey", {
            get: function () {
                if (this._objectKey == null) {
                    this._objectKey = new NumberObasTableField("PurchaseObjects_ID", this);
                }
                return this._objectKey;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescTable.prototype, "ObjectName", {
            get: function () {
                this._object.LocateByKeys(this.ObjectKey.Value);
                return this._object.Name;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescTable.prototype, "ObjectNumber", {
            get: function () {
                this._object.LocateByKeys(this.ObjectKey.Value);
                return this._object.Number;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescTable.prototype, "ObjectNpaGroupCode", {
            get: function () {
                this._object.LocateByKeys(this.ObjectKey.Value);
                return this._object.NpaGroup.Code;
            },
            enumerable: true,
            configurable: true
        });
        ObjectDescTable.prototype.CalcSubgroupNormativeExpensesName = function () {
            this._object.LocateByKeys(this.ObjectKey.Value);
            return this._object.NpaGroup.Name || "";
        };
        ObjectDescTable.prototype.AddObject = function (objKey) {
            this._document.CommonRules.AddNewLink(this.Id, [this.ObjectKey.Id], [objKey]);
        };
        ObjectDescTable.prototype.DeleteObject = function (objKey) {
            this._document.CommonRules.DeleteOldLink(this.Id, this._document.ObjectDataTableIds(), [this.ObjectKey.Id], [objKey]);
        };
        return ObjectDescTable;
    }(ObasTable));
    F02110.ObjectDescTable = ObjectDescTable;
    var ObjectDescNpaTable = (function (_super) {
        __extends(ObjectDescNpaTable, _super);
        function ObjectDescNpaTable() {
            var _this = _super !== null && _super.apply(this, arguments) || this;
            _this._npaFields = null;
            _this._npaStatus = null;
            _this._npsStatusChangeDate = null;
            return _this;
        }
        Object.defineProperty(ObjectDescNpaTable.prototype, "NpaFields", {
            get: function () {
                if (this._npaFields == null) {
                    this._npaFields = new NpaRequisitesFields(this);
                }
                return this._npaFields;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescNpaTable.prototype, "NpaNumber", {
            get: function () {
                return this.NpaFields.NpaNumber;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescNpaTable.prototype, "NpaName", {
            get: function () {
                return this.NpaFields.NpaName;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescNpaTable.prototype, "NpaDate", {
            get: function () {
                return this.NpaFields.NpaDate;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescNpaTable.prototype, "NpaType", {
            get: function () {
                return this.NpaFields.NpaType;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescNpaTable.prototype, "NpaStatus", {
            get: function () {
                if (this._npaStatus == null) {
                    this._npaStatus = new ObasSprTableField(ObasTableCollection.NpaStatusesSprTable, this);
                }
                return this._npaStatus;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ObjectDescNpaTable.prototype, "NpaStatusChangeDate", {
            get: function () {
                if (this._npsStatusChangeDate == null) {
                    this._npsStatusChangeDate = new ObasTableField("NpaChangeDate", this);
                }
                return this._npsStatusChangeDate;
            },
            enumerable: true,
            configurable: true
        });
        return ObjectDescNpaTable;
    }(ObasTableWithSimpleKeysParent));
    F02110.ObjectDescNpaTable = ObjectDescNpaTable;
    var ImportedProcurementTable = (function (_super) {
        __extends(ImportedProcurementTable, _super);
        function ImportedProcurementTable() {
            var _this = _super.call(this, "ImportedProcurement") || this;
            _this._isMarked = null;
            _this._procurementKBK = null;
            _this._fullKBKCode = null;
            return _this;
        }
        Object.defineProperty(ImportedProcurementTable.prototype, "IsMarked", {
            get: function () {
                if (this._isMarked == null) {
                    this._isMarked = new ObasTableField("IsMarked", this);
                }
                return this._isMarked;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ImportedProcurementTable.prototype, "ProcurementKBK", {
            get: function () {
                if (this._procurementKBK == null) {
                    this._procurementKBK = new ObasSprTableFieldTyped(ObasTableCollection.RroProcurementKBKTable, this);
                }
                return this._procurementKBK;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ImportedProcurementTable.prototype, "FullKBKCode", {
            get: function () {
                if (this._fullKBKCode == null) {
                    this._fullKBKCode = new ObasTableField("FullKBKCode", this);
                }
                return this._fullKBKCode;
            },
            enumerable: true,
            configurable: true
        });
        return ImportedProcurementTable;
    }(ObasTable));
    F02110.ImportedProcurementTable = ImportedProcurementTable;
})(F02110 || (F02110 = {}));
