Combine layouts
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
using System;
|
||||
using System.Web.Mvc;
|
||||
using MileageTraker.Web.DAL;
|
||||
using MileageTraker.Web.Attributes;
|
||||
using MileageTraker.Web.Models;
|
||||
using MileageTraker.Web.Utility;
|
||||
using MileageTraker.Web.ViewModels;
|
||||
using MileageTraker.Web.ViewModels.CreateLog;
|
||||
|
||||
namespace MileageTraker.Web.Controllers
|
||||
@@ -13,7 +12,6 @@ namespace MileageTraker.Web.Controllers
|
||||
private const string CookieKeyEmployeename = "mr_employeeName";
|
||||
private const string CookeNameVehicleid = "mr_vehicleId";
|
||||
private const string CookieKeyLogtype = "mr_logType";
|
||||
private readonly DataService _dataService = new DataService();
|
||||
|
||||
public ViewResult Index()
|
||||
{
|
||||
@@ -61,7 +59,7 @@ namespace MileageTraker.Web.Controllers
|
||||
log.Source = HttpContext.Request.Url.AbsolutePath;
|
||||
log.UserHostAddress = HttpContext.Request.UserHostAddress;
|
||||
log.UserAgent = HttpContext.Request.UserAgent;
|
||||
_dataService.AddLog(log);
|
||||
DataService.AddLog(log);
|
||||
return View("Success", model);
|
||||
}
|
||||
|
||||
@@ -70,7 +68,7 @@ namespace MileageTraker.Web.Controllers
|
||||
|
||||
public PartialViewResult RecentLogs(string employeeName)
|
||||
{
|
||||
var logs = _dataService.GetRecentLogsByEmployee(employeeName);
|
||||
var logs = DataService.GetRecentLogsByEmployee(employeeName);
|
||||
ViewData["employeeName"] = employeeName;
|
||||
return PartialView(logs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user