Replace previous log search for log detail page
This commit is contained in:
@@ -85,11 +85,10 @@ namespace MileageTraker.Web.Controllers
|
||||
public ActionResult PreviousDetails(int id)
|
||||
{
|
||||
var log = _dataService.GetLog(id);
|
||||
var previousLog = _dataService.SearchPreviousLog(log);
|
||||
int logId;
|
||||
if (previousLog != null)
|
||||
if (log.VehiclePreviousLog != null)
|
||||
{
|
||||
logId = previousLog.LogId;
|
||||
logId = log.VehiclePreviousLog.LogId;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -101,8 +100,7 @@ namespace MileageTraker.Web.Controllers
|
||||
|
||||
public ActionResult NextDetails(int id)
|
||||
{
|
||||
var log = _dataService.GetLog(id);
|
||||
var nextLog = _dataService.SearchNextLog(log);
|
||||
var nextLog = _dataService.GetNextLog(id);
|
||||
int logId;
|
||||
if (nextLog != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user