This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MachineConfigurationManager | |
{ | |
private const string ConfigFileCacheKey = "ConfigFileCacheKey"; | |
private static readonly ILog Logger = LogManager.GetLogger(typeof(MachineConfigurationManager)); | |
public static void Init() | |
{ | |
var _file = GetConfigFile(); | |
if (!_file.Exists) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
namespace TimeLog.IO | |
{ | |
public class CsvReader | |
{ | |
public bool HasHeaders { get; private set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using log4net; | |
using log4net.Config; | |
using System; | |
using System.Linq; | |
using System.Diagnostics; | |
using System.IO; | |
namespace APIScaffolding | |
{ | |
public class App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Configuration; | |
using System.Linq; | |
namespace APIScaffolding | |
{ | |
public class TimelogServices | |
{ | |
private TimeLogSecurityService.SecurityServiceClient _securityService; | |
public TimeLogSecurityService.SecurityServiceClient SecurityService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Gets a list of tasks allocated to the currently authenticated user | |
/// </summary> | |
/// <returns>A JsonResult with tasks</returns> | |
public ActionResult Get() | |
{ | |
// Prepare the envelope with a faulty state | |
JsonEnvelope<IEnumerable<Task>> result = new JsonEnvelope<IEnumerable<Task>> { Success = false, Data = new List<Task>(), Message = "No tasks" }; | |
// Query the TimeLog Project web service for tasks allocated to the employee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function DashboardCtrl($scope) { | |
// ¤¤¤ Property definitions ¤¤¤ | |
$scope.tasks = []; | |
$scope.query = ''; | |
// ¤¤¤ Method definitions ¤¤¤ | |
$scope.getTasks = function () { | |
// Fetch the list of tasks from the web service | |
$.getJSON(root + 'Task/Get', {}, function (data) { | |
$scope.$apply(function (scope) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-controller="DashboardCtrl"> | |
... | |
<h2>Tasks</h2> | |
<p>Search: <input type="text" id="query" ng-change="filterChange()" ng-model="query" /></p> | |
<div class="contentband" id="registrationBand"> | |
<label class="overflow gridCol-04 posLeft" title="{{selectedTask}}">{{selectedTask}}</label>: | |
<input type="text" ng-model="registrationHours" id="registrationHours" class="gridCol-01" /> hours - | |
<input type="text" ng-model="registrationText" id="registrationText" class="gridCol-02" /></div> | |
<table id="tasks"> | |
<tr> |