public async Task <IEnumerable <dynamic> > GetConditionReportList(SearchConditionalMonitoringViewModel scmvm)
        {
            string sql = "dbo.EAppListEquipmentConditionReport";

            using (var conn = util.MasterCon())
            {
                try
                {
                    return(await(conn.QueryAsync <dynamic>(sql, new { scmvm.ClientSiteId, scmvm.ReportFromDate, scmvm.ReportToDate, scmvm.ConditionCodeId, scmvm.LanguageId }, commandType: CommandType.StoredProcedure)));
                }
                catch (Exception ex)
                {
                    throw new CustomException("Unable to Load Data, Please Contact Support!!!", "Error", true, ex);
                }
            }
        }
 public async Task <IActionResult> GetConditionReportList([FromBody] SearchConditionalMonitoringViewModel scmvm)
 {
     try
     {
         CurrentUser cUser = new CurrentUser(HttpContext, _configuration);
         return(Ok(await conditionalMonitoringRepo.GetConditionReportList(scmvm)));
     }
     catch (CustomException cex)
     {
         var responseObj = new EmaintenanceMessage(cex.Message, cex.Type, cex.IsException, cex.Exception?.ToString());
         return(StatusCode(StatusCodes.Status500InternalServerError, responseObj));
     }
     catch (Exception ex)
     {
         return(Ok(new EmaintenanceMessage(ex.Message)));
     }
 }