var Address=function(){function n(){this.SearchByChangedProvince=function(){var r=$("#ProvinceSourceDropDownChoice").data("kendoDropDownList"),t=r.dataItem().Key,n=$("#MunicipalitySourceDropDownChoice").data("kendoDropDownList"),i=$("#SettlementSourceDropDownChoice").data("kendoDropDownList");(n&&n.setDataSource(null),i&&i.setDataSource(null),t!=null)&&core.requestOptional("GetMunicipality","Address",{useArea:!0,data:{provinceId:t},success:function(t){for(var r,u=[],i=0;i<t.length;i++)r=t[i],u.push({Key:r.Id,Value:r.Name});n&&n.setDataSource(u)}})};this.SearchByChangedMunicipality=function(){var i=$("#MunicipalitySourceDropDownChoice").data("kendoDropDownList"),t=i.dataItem().Key,n=$("#SettlementSourceDropDownChoice").data("kendoDropDownList");(n&&n.setDataSource(null),t!=null)&&core.requestOptional("GetSettlementByMunicipalityId","Address",{useArea:!0,data:{id:t},success:function(t){for(var r,u=[],i=0;i<t.length;i++)r=t[i],u.push({Key:r.Id,Value:r.Name});n&&n.setDataSource(u)}})};this.init()}return n.prototype.init=function(){var n=this;n.bindEvents()},n.prototype.bindEvents=function(){var n=this;$(document).on("change","#ProvinceSourceDropDownChoice",function(t){n.SearchByChangedProvince(t)});$(document).on("change","#MunicipalitySourceDropDownChoice",function(t){n.SearchByChangedMunicipality(t)})},n}(),adress=new Address;
