Exemplo n.º 1
0
        public Response <DailyKmInfo> DailyKmReportByRentID(int UserID, int RentID)
        {
            Response <DailyKmInfo> res = new Response <DailyKmInfo>();

            try
            {
                using (var reportRepository = new ReportRepository())
                {
                    res.Data = reportRepository.DailyKmReportByRentID(UserID, RentID);

                    if (res.Data.Count > 0)
                    {
                        res.isSuccess = true;
                        res.Message   = "İlgili aracın kilometre bilgileri gösterildi";
                    }
                    else
                    {
                        res.isSuccess = false;
                        res.Message   = "İlgili aracın kilometreleri bulunamadı";
                    }
                }
                return(res);
            }
            catch (Exception ex)
            {
                throw new Exception("An error occured in DailyKmReportByRentID() func. in SpiceApp.BusinessLayer.ReportBusiness", ex);
            }
        }