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 FOutlay;
(function (FOutlay) {
    var ExcelExport = (function () {
        function ExcelExport(_document) {
            this._document = _document;
        }
        ExcelExport.prototype.GetAttachName = function () {
            if (this._document.OutlayType === 1) {
                result = "\u0411\u042E\u0414\u0416\u0415\u0422\u041D\u0410\u042F \u0421\u041C\u0415\u0422\u0410 \u0424\u0415\u0414\u0415\u0420\u0410\u041B\u042C\u041D\u041E\u0413\u041E \u041A\u0410\u0417\u0415\u041D\u041D\u041E\u0413\u041E \u0423\u0427\u0420\u0415\u0416\u0414\u0415\u041D\u0418\u042F \u043D\u0430 " + ObasStageSettings.CurrentYear + "\n\r " +
                    ("\u0444\u0438\u043D\u0430\u043D\u0441\u043E\u0432\u044B\u0439 \u0433\u043E\u0434 (\u043D\u0430 " + ObasStageSettings.CurrentYear + " \u0444\u0438\u043D\u0430\u043D\u0441\u043E\u0432\u044B\u0439 \u0433\u043E\u0434 \u0438 \u043D\u0430 \u043F\u043B\u0430\u043D\u043E\u0432\u044B\u0439 \u043F\u0435\u0440\u0438\u043E\u0434 ") +
                    (ObasStageSettings.CurrentYear + 1 + " \u0438 " + (ObasStageSettings.CurrentYear + 2) + " \u0433\u043E\u0434\u043E\u0432 *)");
            }
            else {
                result = "\u0418\u0417\u041C\u0415\u041D\u0415\u041D\u0418\u042F \u041F\u041E\u041A\u0410\u0417\u0410\u0422\u0415\u041B\u0415\u0419 \u0411\u042E\u0414\u0416\u0415\u0422\u041D\u041E\u0419 \u0421\u041C\u0415\u0422\u042B \u0424\u0415\u0414\u0415\u0420\u0410\u041B\u042C\u041D\u041E\u0413\u041E\n\r \u041A\u0410\u0417\u0415\u041D\u041D\u041E\u0413\u041E \u0423\u0427\u0420\u0415\u0416\u0414\u0415\u041D\u0418\u042F " +
                    ("\u043D\u0430 " + ObasStageSettings.CurrentYear + " \u0444\u0438\u043D\u0430\u043D\u0441\u043E\u0432\u044B\u0439 \u0433\u043E\u0434 (\u043D\u0430 " + ObasStageSettings.CurrentYear + " \u0444\u0438\u043D\u0430\u043D\u0441\u043E\u0432\u044B\u0439 \u0433\u043E\u0434\n\r ") +
                    ("\u0438 \u043D\u0430 \u043F\u043B\u0430\u043D\u043E\u0432\u044B\u0439 \u043F\u0435\u0440\u0438\u043E\u0434 " + (ObasStageSettings.CurrentYear + 1) + " \u0438 " + (ObasStageSettings.CurrentYear + 2) + " \u0433\u043E\u0434\u043E\u0432 *) ") +
                    (" \u2116  " + (ObasTableCollection.RroOutlayTable.RowCount - 1));
            }
            return result;
        };
        ExcelExport.prototype.GetAgreedPost = function () {
            return ObasTableCollection.RroObasRecvisitsTable.Agreed.Post.Value;
        };
        ExcelExport.prototype.GetAgreedName = function () {
            return ObasTableCollection.RroObasRecvisitsTable.Agreed.Name.Value;
        };
        ExcelExport.prototype.GetApprovedPost = function () {
            return ObasTableCollection.RroObasRecvisitsTable.Approved.Post.Value;
        };
        ExcelExport.prototype.GetApprovedName = function () {
            return ObasTableCollection.RroObasRecvisitsTable.Approved.Name.Value;
        };
        ExcelExport.prototype.GetAgreedDate = function () {
            var outlayTable = ObasTableCollection.RroOutlayTable;
            return ObasHelper.ConvertToString(outlayTable.AgreedDate.LookupByKeys(outlayTable.GetActive(false)), DateFormat.Middle);
        };
        ExcelExport.prototype.GetApprovedDate = function () {
            var outlayTable = ObasTableCollection.RroOutlayTable;
            return ObasHelper.ConvertToString(outlayTable.ApprovedDate.LookupByKeys(outlayTable.GetActive(false)), DateFormat.Middle);
        };
        ExcelExport.prototype.GetChangeType = function () {
            var outlayTable = ObasTableCollection.RroOutlayTable;
            return outlayTable.ChangeType.Code + " - " + outlayTable.ChangeType.Name;
        };
        return ExcelExport;
    }());
    FOutlay.ExcelExport = ExcelExport;
})(FOutlay || (FOutlay = {}));
