public HurdaNegatifRaporuResponse HurdaNegatifeDusenlerRaporuGetir(HurdaNegatifSearchRequest Srequest)
        {
            var request = new RestRequest("api/Scrap/HurdaNegatifeDusenlerRaporuGetir", Method.POST, DataFormat.Json)
                          .AddJsonBody(Srequest);

            var resp = Globals.ApiClient.Execute <HurdaNegatifRaporuResponse>(request);

            return(resp.Data);
        }
        public IActionResult HurdaNegatifeDusenlerRaporuGetir(HurdaNegatifSearchRequest request)
        {
            var response = _mesScrapService.HurdaNegatifeDusenlerRaporuGetir(request);

            if (response.isSuccess == false)
            {
                return(null);
            }
            return(Ok(response));
        }
        public HurdaNegatifRaporuResponse HurdaNegatifeDusenlerRaporuGetir(HurdaNegatifSearchRequest request)
        {
            HurdaNegatifRaporuResponse resp = new HurdaNegatifRaporuResponse();

            List <sp_Mes_V2_HurdaNegatifeDusenler> hurdaNegatif = _dbContext.sp_Mes_V2_HurdaNegatifeDusenler.FromSqlInterpolated($"EXECUTE dbo.sp_Mes_V2_HurdaNegatifeDusenler {request.NegatifValue},{request.BaslangicTarihi},{request.BitisTarihi},{request.SelectedMakineListesi},{request.SelectedMudurlukListesi}").ToList();

            if (hurdaNegatif != null)
            {
                resp.HurdaNegatifRaporList = hurdaNegatif;
                resp.isSuccess             = true;
            }
            else
            {
                resp.isSuccess    = false;
                resp.ErrorMessage = "Bir Hata Oluştu! Lütfen Daha Sonra Tekrar Deneyiniz.";
            }
            return(resp);
        }