import { ProvinceCityDistrictDto } from "../DTO/province-city-district-dto.model"; import { HostConfig } from '../config/host.config'; import { Injectable } from '@angular/core'; import { HttpHandler } from './http-handler.service'; import { Page } from '../response/page.type'; @Injectable({ providedIn: 'root', }) export class ProvinceCityDistrictService { static PATH = '/provinceCityDistrict'; constructor(private httpHandler: HttpHandler) {} searchCascade(pid: number, header?: any): Promise { return this.httpHandler.get(`${HostConfig.DEV_HOST}${ProvinceCityDistrictService.PATH}/searchCascade?pid=${pid}`, header); } findAll(f: boolean, header?: any): Promise { return this.httpHandler.get(`${HostConfig.DEV_HOST}${ProvinceCityDistrictService.PATH}/findAll?f=${f}`, header); } findAllJson(f: boolean, header?: any): Promise { return this.httpHandler.get(`${HostConfig.DEV_HOST}${ProvinceCityDistrictService.PATH}/findAllJson?f=${f}`, header); } flush(header?: any): Promise { return this.httpHandler.get(`${HostConfig.DEV_HOST}${ProvinceCityDistrictService.PATH}flush`, header); } }