diff --git a/DataCenter_Windows/WindowsDataCenter/Interfaces/IRepository.cs b/DataCenter_Windows/WindowsDataCenter/Interfaces/IRepository.cs new file mode 100644 index 0000000..cffe1de --- /dev/null +++ b/DataCenter_Windows/WindowsDataCenter/Interfaces/IRepository.cs @@ -0,0 +1,17 @@ +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Interfaces +{ + public interface IRepository + { + UserList GetUsers(); + User GetUser(int id); + TimeLogList GetTimeLogs(int userId); + TimeLogList GetTimeLogs(int userId, int calendarWeek); + IdentifierList GetUnassignedList(); + OperationResponse UpdateUser(User user); + OperationResponse LogEventTime(Identifier identifier); + } +} diff --git a/DataCenter_Windows/WindowsDataCenter/Interfaces/Identifier.cs b/DataCenter_Windows/WindowsDataCenter/Interfaces/Identifier.cs new file mode 100644 index 0000000..1c3b7a6 --- /dev/null +++ b/DataCenter_Windows/WindowsDataCenter/Interfaces/Identifier.cs @@ -0,0 +1,9 @@ +namespace Interfaces +{ + public class Identifier + { + public int Id { get; set; } + public string UniqueId { get; set; } + public bool IsAssociatedToUser { get; set; } + } +} \ No newline at end of file diff --git a/DataCenter_Windows/WindowsDataCenter/Interfaces/IdentifierList.cs b/DataCenter_Windows/WindowsDataCenter/Interfaces/IdentifierList.cs new file mode 100644 index 0000000..a39fa96 --- /dev/null +++ b/DataCenter_Windows/WindowsDataCenter/Interfaces/IdentifierList.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; + +namespace Interfaces +{ + public class IdentifierList + { + public IdentifierList() + { + data = new List(); + } + public List data { get; set; } + } +} \ No newline at end of file diff --git a/DataCenter_Windows/WindowsDataCenter/Interfaces/Interfaces.csproj b/DataCenter_Windows/WindowsDataCenter/Interfaces/Interfaces.csproj new file mode 100644 index 0000000..6d1a25d --- /dev/null +++ b/DataCenter_Windows/WindowsDataCenter/Interfaces/Interfaces.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {B7347B72-E208-423A-9D99-723B558EA3D7} + Library + Properties + Interfaces + Interfaces + v4.5.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DataCenter_Windows/WindowsDataCenter/Interfaces/OperationResponse.cs b/DataCenter_Windows/WindowsDataCenter/Interfaces/OperationResponse.cs new file mode 100644 index 0000000..3851a5c --- /dev/null +++ b/DataCenter_Windows/WindowsDataCenter/Interfaces/OperationResponse.cs @@ -0,0 +1,12 @@ +namespace Interfaces +{ + public enum OperationResponse + { + NONE = 0, + SUCCESS = 1, + CREATED = 2, + UPDATED = 3, + DELETED = 4, + FAILED = 5 + } +} \ No newline at end of file diff --git a/DataCenter_Windows/WindowsDataCenter/Interfaces/Properties/AssemblyInfo.cs b/DataCenter_Windows/WindowsDataCenter/Interfaces/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1cf91d9 --- /dev/null +++ b/DataCenter_Windows/WindowsDataCenter/Interfaces/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Interfaces")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Interfaces")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b7347b72-e208-423a-9d99-723b558ea3d7")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/DataCenter_Windows/WindowsDataCenter/Interfaces/TimeLog.cs b/DataCenter_Windows/WindowsDataCenter/Interfaces/TimeLog.cs new file mode 100644 index 0000000..e144834 --- /dev/null +++ b/DataCenter_Windows/WindowsDataCenter/Interfaces/TimeLog.cs @@ -0,0 +1,11 @@ +using System; + +namespace Interfaces +{ + public class TimeLog + { + public DateTimeOffset EventTime { get; set; } + public int UserId { get; set; } + public bool Direction { get; set; } + } +} \ No newline at end of file diff --git a/DataCenter_Windows/WindowsDataCenter/Interfaces/TimeLogList.cs b/DataCenter_Windows/WindowsDataCenter/Interfaces/TimeLogList.cs new file mode 100644 index 0000000..cb7e9f5 --- /dev/null +++ b/DataCenter_Windows/WindowsDataCenter/Interfaces/TimeLogList.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace Interfaces +{ + public class TimeLogList + { + public int CalendarWeek { get; set; } + public List TimeLogs { get; set; } + } +} \ No newline at end of file diff --git a/DataCenter_Windows/WindowsDataCenter/Interfaces/User.cs b/DataCenter_Windows/WindowsDataCenter/Interfaces/User.cs new file mode 100644 index 0000000..e232428 --- /dev/null +++ b/DataCenter_Windows/WindowsDataCenter/Interfaces/User.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; + +namespace Interfaces +{ + public class User + { + public User() + { + AssociatedIdentifiers = new List(); + } + public int UserId { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public int HoursPerWeek { get; set; } + public int AssociatedIdentifierCount { get; set; } + public List AssociatedIdentifiers { get; set; } + } +} \ No newline at end of file diff --git a/DataCenter_Windows/WindowsDataCenter/Interfaces/UserList.cs b/DataCenter_Windows/WindowsDataCenter/Interfaces/UserList.cs new file mode 100644 index 0000000..18e57ee --- /dev/null +++ b/DataCenter_Windows/WindowsDataCenter/Interfaces/UserList.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace Interfaces +{ + public class UserList + { + public int UserCount { get; set; } + public List Users { get; set; } + public int PageSize { get; set; } + public int PageNumber { get; set; } + } +} \ No newline at end of file diff --git a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter.sln b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter.sln index 131620a..9d51054 100644 --- a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter.sln +++ b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter.sln @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsDataCenter", "Window EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsDataServiceHost", "WindowsDataServiceHost\WindowsDataServiceHost.csproj", "{5A4E2CF2-FA51-413E-82C7-14A19A50766D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interfaces", "Interfaces\Interfaces.csproj", "{B7347B72-E208-423A-9D99-723B558EA3D7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +23,10 @@ Global {5A4E2CF2-FA51-413E-82C7-14A19A50766D}.Debug|Any CPU.Build.0 = Debug|Any CPU {5A4E2CF2-FA51-413E-82C7-14A19A50766D}.Release|Any CPU.ActiveCfg = Release|Any CPU {5A4E2CF2-FA51-413E-82C7-14A19A50766D}.Release|Any CPU.Build.0 = Release|Any CPU + {B7347B72-E208-423A-9D99-723B558EA3D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7347B72-E208-423A-9D99-723B558EA3D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7347B72-E208-423A-9D99-723B558EA3D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7347B72-E208-423A-9D99-723B558EA3D7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE