public async Task <JsonResult> Get(string kodegol, int?periodemulaiberlaku, string namagolongan, bool?status)
        {
            var watch = Stopwatch.StartNew();

            try
            {
                var param = new MasterGolonganDto()
                {
                    KodeGol             = kodegol,
                    NamaGolongan        = namagolongan,
                    PeriodeMulaiBerlaku = periodemulaiberlaku,
                    Status = status
                };

                AppResponse.ResponseGetData(await GolonganService.GetAll(param));
            }
            catch (Exception e)
            {
                AppResponse.ResponseErrorGetData(e.InnerException != null ? e.InnerException.Message : e.Message);
            }

            watch.Stop();
            AppResponse._result.execution_time = watch.ElapsedMilliseconds;
            return(new JsonResult(AppResponse._result));
        }
Example #2
0
        public async Task <JsonResult> Get(string koderayon, string namarayon, string kodearea, string namaarea, string kodewil, string namawilayah)
        {
            var watch = Stopwatch.StartNew();

            try
            {
                var param = new MasterRayonDto()
                {
                    KodeRayon   = koderayon,
                    NamaRayon   = namarayon,
                    KodeArea    = kodearea,
                    NamaArea    = namaarea,
                    KodeWil     = kodewil,
                    NamaWilayah = namawilayah,
                };

                AppResponse.ResponseGetData(await rayonService.GetAll(param));
            }
            catch (Exception e)
            {
                AppResponse.ResponseErrorGetData(e.InnerException != null ? e.InnerException.Message : e.Message);
            }

            watch.Stop();
            AppResponse._result.execution_time = watch.ElapsedMilliseconds;
            return(new JsonResult(AppResponse._result));
        }
        public async Task <JsonResult> Get(string kodekelurahan, string namakelurahan, string kodekecamatan, string namakecamatan, string kodecabang, string namacabang)
        {
            var watch = Stopwatch.StartNew();

            try
            {
                var param = new MasterKelurahanDto()
                {
                    KodeKelurahan = kodekelurahan,
                    NamaKelurahan = namakelurahan,
                    KodeKecamatan = kodekecamatan,
                    NamaKecamatan = namakecamatan,
                    KodeCabang    = kodecabang,
                    NamaCabang    = namacabang,
                };

                AppResponse.ResponseGetData(await kelurahanService.GetAll(param));
            }
            catch (Exception e)
            {
                AppResponse.ResponseErrorGetData(e.InnerException != null ? e.InnerException.Message : e.Message);
            }

            watch.Stop();
            AppResponse._result.execution_time = watch.ElapsedMilliseconds;
            return(new JsonResult(AppResponse._result));
        }
Example #4
0
        public async Task <JsonResult> Get(int limit, string nosamb, string nama, string alamat, string koderayon, string kodekelurahan,
                                           string kodegol, string kodediameter, string kodekolektif, string kodekondisimeter, string kodesumberair, string kodeblok, string kodemerekmeter,
                                           string nohp, string notelp, string noktp, string norekening, string serimeter, int?status, int?flag, string email, DateTime?tgldaftar)
        {
            var watch = Stopwatch.StartNew();

            try
            {
                var param = new MasterPelangganDto()
                {
                    NoSamb           = nosamb,
                    Nama             = nama,
                    Alamat           = alamat,
                    KodeRayon        = koderayon,
                    KodeKelurahan    = kodekelurahan,
                    KodeGol          = kodegol,
                    KodeDiameter     = kodediameter,
                    KodeKolektif     = kodekolektif,
                    KodeKondisiMeter = kodekondisimeter,
                    KodeSumberAir    = kodesumberair,
                    KodeBlok         = kodeblok,
                    KodeMerekMeter   = kodemerekmeter,
                    NoHp             = nohp,
                    NoTelp           = notelp,
                    NoKtp            = noktp,
                    NoRekening       = norekening,
                    SeriMeter        = serimeter,
                    Status           = status,
                    Flag             = flag,
                    Email            = email,
                    TglDaftar        = tgldaftar,
                };

                AppResponse.ResponseGetData(await pelangganService.GetAll(limit, param));
            }
            catch (Exception e)
            {
                AppResponse.ResponseErrorGetData(e.InnerException != null ? e.InnerException.Message : e.Message);
            }

            watch.Stop();
            AppResponse._result.execution_time = watch.ElapsedMilliseconds;
            return(new JsonResult(AppResponse._result));
        }
        public async Task <JsonResult> Get(string kodeKolektif, string namakolektif)
        {
            var watch = Stopwatch.StartNew();

            try
            {
                var param = new MasterKolektifDto()
                {
                    KodeKolektif = kodeKolektif,
                    NamaKolektif = namakolektif,
                };

                AppResponse.ResponseGetData(await kolektifService.GetAll(param));
            }
            catch (Exception e)
            {
                AppResponse.ResponseErrorGetData(e.InnerException != null ? e.InnerException.Message : e.Message);
            }

            watch.Stop();
            AppResponse._result.execution_time = watch.ElapsedMilliseconds;
            return(new JsonResult(AppResponse._result));
        }