Dynamic update for all writes for VehiclePreviousLog
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using MileageTraker.Web.DAL;
|
||||
@@ -86,7 +85,7 @@ namespace MileageTraker.Web.Controllers
|
||||
public ActionResult PreviousDetails(int id)
|
||||
{
|
||||
var log = _dataService.GetLog(id);
|
||||
var previousLog = _dataService.GetPreviousLog(log);
|
||||
var previousLog = _dataService.SearchPreviousLog(log);
|
||||
int logId;
|
||||
if (previousLog != null)
|
||||
{
|
||||
@@ -103,7 +102,7 @@ namespace MileageTraker.Web.Controllers
|
||||
public ActionResult NextDetails(int id)
|
||||
{
|
||||
var log = _dataService.GetLog(id);
|
||||
var nextLog = _dataService.GetNextLog(log);
|
||||
var nextLog = _dataService.SearchNextLog(log);
|
||||
int logId;
|
||||
if (nextLog != null)
|
||||
{
|
||||
@@ -170,6 +169,8 @@ namespace MileageTraker.Web.Controllers
|
||||
ModelState.Remove("Source");
|
||||
ModelState.Remove("UserAgent");
|
||||
ModelState.Remove("UserHostAddress");
|
||||
ModelState.Remove("VehiclePreviousLogId");
|
||||
ModelState.Remove("VehiclePreviousLog");
|
||||
}
|
||||
|
||||
public ActionResult Delete(int id)
|
||||
|
||||
Reference in New Issue
Block a user