/// /// var TP; (function (TP) { var Branches = /** @class */ (function () { function Branches() { } Branches.FillSelectsFromBranches = function (IdTree, ParentIdBranch, SelectId, ValueId, ValueText, attributes, Function) { if (attributes === void 0) { attributes = null; } if (Function === void 0) { Function = null; } Branches.GetBranchesByTreeParentLanguage(IdTree, ParentIdBranch, TP.Commons.LanguageCode, function (result) { TP.Commons.FillSelects(SelectId, result.Data, ValueId == "" ? "idBranch" : ValueId, ValueText == "" ? "description" : ValueText, attributes); if (typeof Function === "function") Function(result.Data); }); }; Branches.GetBranchesByTreeParentLanguage = function (IdTree, ParentIdBranch, LanguageCode, Function) { TP.Commons.LoadingStart(); if (IdTree == "") { TP.Commons.LoadingStop(); return; } TP.Commons.AjaxServicePromisePost(TP.Commons.GetUrlService("GetBranchesByTreeParentLanguage"), { IdTree: IdTree, ParentIdBranch: ParentIdBranch, LanguageCode: LanguageCode }, null, TP.Commons.antiforgeryToken) .done(function (result) { if (typeof Function === "function") Function(result); TP.Commons.LoadingStop(); return; }) .fail(function (error) { TP.Commons.LoadingStop(); TP.Commons.AlertMessageError('Error', "Error getting information."); return; }); }; Branches.GetBranchByIdBranchLanguage = function (ParentIdBranch, LanguageCode, Function) { TP.Commons.LoadingStart(); TP.Commons.AjaxServicePromisePost(TP.Commons.GetUrlService("GetBranchByIdBranchLanguage"), { ParentIdBranch: ParentIdBranch, LanguageCode: LanguageCode }, null, TP.Commons.antiforgeryToken) .done(function (result) { if (typeof Function === "function") Function(result); TP.Commons.LoadingStop(); return; }) .fail(function (error) { TP.Commons.LoadingStop(); TP.Commons.AlertMessageError('Error', "Error getting information."); return; }); }; return Branches; }()); TP.Branches = Branches; })(TP || (TP = {})); //# sourceMappingURL=Branches.js.map