Set password operational

Sitewide plan for status messages
This commit is contained in:
2012-12-29 20:41:50 -05:00
parent ce6fd9c215
commit 8739251066
32 changed files with 332 additions and 144 deletions
+6 -2
View File
@@ -98,7 +98,7 @@ namespace MileageTraker.Web.Controllers
else
{
logId = id;
TempData["Message"] = "This is the first log for this vehicle";
TempData["StatusMessage"] = "This is the first log for this vehicle";
}
return RedirectToAction("Details", new {id = logId});
}
@@ -114,7 +114,7 @@ namespace MileageTraker.Web.Controllers
else
{
logId = id;
TempData["Message"] = "This is the most recent log for this vehicle";
TempData["StatusMessage"] = "This is the most recent log for this vehicle";
}
return RedirectToAction("Details", new { id = logId });
}
@@ -142,6 +142,8 @@ namespace MileageTraker.Web.Controllers
log.UserAgent = HttpContext.Request.UserAgent;
DataService.AddLog(log);
TempData["StatusMessage"] = "Log created";
return RedirectToAction("Index");
}
@@ -162,6 +164,7 @@ namespace MileageTraker.Web.Controllers
if (ModelState.IsValid)
{
DataService.UpdateLog(log);
TempData["StatusMessage"] = "Log updated";
return RedirectToAction("Details", new{id = log.LogId});
}
return View(log);
@@ -188,6 +191,7 @@ namespace MileageTraker.Web.Controllers
{
DataService.DeleteLog(id);
TempData["StatusMessage"] = "Log deleted";
if (Session["LogPage"] != null)
return Redirect((string) Session["LogPage"]);
return RedirectToAction("Index");