Example #1
0
        public Response <DailyKmInfo> DailyKmReport(int UserID)
        {
            Response <DailyKmInfo> res = new Response <DailyKmInfo>();

            try
            {
                using (var reportRepository = new ReportRepository())
                {
                    res.Data = reportRepository.DailyKmReport(UserID);

                    if (res.Data.Count > 0)
                    {
                        res.isSuccess = true;
                        res.Message   = "Günlük kilometreler raporu başarıyla gösterildi";
                    }
                    else
                    {
                        res.Message   = "Günlük kilometre raporu bulunamadı";
                        res.isSuccess = false;
                    }
                }
                return(res);
            }
            catch (Exception ex)
            {
                throw new Exception("An error occured in DailyKmReport func in SpiceApp.BusinessLayer.ReportBusiness", ex);
            }
        }