Admin auth functionally complete
This commit is contained in:
@@ -45,7 +45,7 @@ namespace MileageTraker.Web.Controllers
|
||||
[HttpParamAction]
|
||||
[HttpPost]
|
||||
[ActionLog]
|
||||
public ViewResult Confirm(CreateLogViewModel model)
|
||||
public ActionResult Confirm(CreateLogViewModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
@@ -59,7 +59,16 @@ namespace MileageTraker.Web.Controllers
|
||||
log.UserHostAddress = HttpContext.Request.UserHostAddress;
|
||||
log.UserAgent = HttpContext.Request.UserAgent;
|
||||
DataService.AddLog(log);
|
||||
return View("Success", model);
|
||||
TempData["StatusMessage-Type"] = "alert-success";
|
||||
TempData["StatusMessage"] =
|
||||
@"You've successfully created an entry
|
||||
for <strong>" + model.EmployeeName + @"</strong>
|
||||
traveling to <strong>" + model.CityName + @"</strong>
|
||||
on <strong>" + model.Date.ToShortDateString() + @"</strong>
|
||||
in Vehicle Id <strong>" + model.VehicleId + @"</strong>
|
||||
ending in <strong>" + model.EndOdometer + @"</strong>
|
||||
miles on the odometer.";
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
return View("Index", model);
|
||||
|
||||
Reference in New Issue
Block a user