Dynamic update for all writes for VehiclePreviousLog

This commit is contained in:
2012-12-07 13:43:05 -05:00
parent ea2d8b4262
commit 6f28fb1621
6 changed files with 69 additions and 35 deletions
+4 -3
View File
@@ -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)