First import into fresh repo
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<Combine fileversion="2.0" name="PirateWeb" MakePkgConfig="False" MakeLibPC="True">
|
||||
<Configurations active="Debug">
|
||||
<Configuration name="Debug" ctype="CombineConfiguration">
|
||||
<Entry build="True" name="Logic" configuration="Debug|Any CPU" />
|
||||
<Entry build="True" name="Interface" configuration="Debug|Any CPU" />
|
||||
<Entry build="True" name="Console" configuration="Debug|Any CPU" />
|
||||
<Entry build="True" name="Utility" configuration="Debug|Any CPU" />
|
||||
<Entry build="True" name="Database" configuration="Debug|Any CPU" />
|
||||
<Entry build="True" name="Site" configuration="Debug" />
|
||||
<Entry build="True" name="Basic" configuration="Debug" />
|
||||
<Entry build="True" name="Monobot" configuration="Debug" />
|
||||
</Configuration>
|
||||
<Configuration name="Release" ctype="CombineConfiguration">
|
||||
<Entry build="True" name="Logic" configuration="Release|Any CPU" />
|
||||
<Entry build="True" name="Interface" configuration="Release|Any CPU" />
|
||||
<Entry build="True" name="Console" configuration="Release|Any CPU" />
|
||||
<Entry build="True" name="Utility" configuration="Release|Any CPU" />
|
||||
<Entry build="True" name="Database" configuration="Release|Any CPU" />
|
||||
<Entry build="True" name="Site" configuration="Release" />
|
||||
<Entry build="True" name="Basic" configuration="Release" />
|
||||
<Entry build="True" name="Monobot" configuration="Release" />
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<StartMode startupentry="Logic" single="True">
|
||||
<Execute type="None" entry="Logic" />
|
||||
<Execute type="None" entry="Interface" />
|
||||
<Execute type="None" entry="Console" />
|
||||
<Execute type="None" entry="Utility" />
|
||||
<Execute type="None" entry="Database" />
|
||||
<Execute type="None" entry="Site" />
|
||||
<Execute type="None" entry="Basic" />
|
||||
<Execute type="None" entry="Monobot" />
|
||||
</StartMode>
|
||||
<Entries>
|
||||
<Entry filename="Logic/Logic.csproj" />
|
||||
<Entry filename="Interface/Interface.csproj" />
|
||||
<Entry filename="Console/Console.csproj" />
|
||||
<Entry filename="Utility/Utility.csproj" />
|
||||
<Entry filename="Database/Database.csproj" />
|
||||
<Entry filename="Site/Site.mdp" />
|
||||
<Entry filename="Basic/Basic.csproj" />
|
||||
<Entry filename="Monobot/Monobot.csproj" />
|
||||
</Entries>
|
||||
</Combine>
|
||||
+260
@@ -0,0 +1,260 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logic", "Logic\Logic.csproj", "{13E59551-34AC-43DC-9A03-EF5E4721DC61}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interface", "Interface\Interface.csproj", "{BA24FAF7-D518-49E8-952A-45595682877E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Console", "Console\Console.csproj", "{CD1B7DBC-19DB-41A8-80CE-986C66225E8B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utility", "Utility\Utility.csproj", "{C540570C-20E0-4979-84EB-8833810DDDF6}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Database", "Database\Database.csproj", "{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}"
|
||||
EndProject
|
||||
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Site", "Site\", "{D665AEB2-C94A-47D3-8376-AE65325E2E34}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
SccProjectName = "Svn"
|
||||
SccAuxPath = "Svn"
|
||||
SccLocalPath = "Svn"
|
||||
SccProvider = "SubversionScc"
|
||||
TargetFramework = "2.0"
|
||||
ProjectReferences = "{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}|PirateWeb.Basic.dll;{BA24FAF7-D518-49E8-952A-45595682877E}|PirateWeb.Interface.dll;{C540570C-20E0-4979-84EB-8833810DDDF6}|PirateWeb.Utility.dll;{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}|PirateWeb.Database.dll;{13E59551-34AC-43DC-9A03-EF5E4721DC61}|PirateWeb.Logic.dll;"
|
||||
Debug.AspNetCompiler.VirtualPath = "/Site"
|
||||
Debug.AspNetCompiler.PhysicalPath = "Site\"
|
||||
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Site\"
|
||||
Debug.AspNetCompiler.Updateable = "true"
|
||||
Debug.AspNetCompiler.ForceOverwrite = "true"
|
||||
Debug.AspNetCompiler.FixedNames = "false"
|
||||
Debug.AspNetCompiler.Debug = "True"
|
||||
Release.AspNetCompiler.VirtualPath = "/Site"
|
||||
Release.AspNetCompiler.PhysicalPath = "Site\"
|
||||
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\Site\"
|
||||
Release.AspNetCompiler.Updateable = "true"
|
||||
Release.AspNetCompiler.ForceOverwrite = "true"
|
||||
Release.AspNetCompiler.FixedNames = "false"
|
||||
Release.AspNetCompiler.Debug = "False"
|
||||
VWDPort = "3843"
|
||||
VWDVirtualPath = "/"
|
||||
StartServerOnDebug = "false"
|
||||
EndProjectSection
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{13E59551-34AC-43DC-9A03-EF5E4721DC61} = {13E59551-34AC-43DC-9A03-EF5E4721DC61}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic", "Basic\Basic.csproj", "{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}"
|
||||
EndProject
|
||||
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Site-Data", "Site-Data\", "{DFAA322B-2865-4F7B-B08A-1C90A40FA706}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
SccProjectName = "Svn"
|
||||
SccAuxPath = "Svn"
|
||||
SccLocalPath = "Svn"
|
||||
SccProvider = "SubversionScc"
|
||||
TargetFramework = "2.0"
|
||||
ProjectReferences = "{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}|PirateWeb.Basic.dll;{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}|PirateWeb.Database.dll;{BA24FAF7-D518-49E8-952A-45595682877E}|PirateWeb.Interface.dll;{13E59551-34AC-43DC-9A03-EF5E4721DC61}|PirateWeb.Logic.dll;"
|
||||
Debug.AspNetCompiler.VirtualPath = "/Site-Data"
|
||||
Debug.AspNetCompiler.PhysicalPath = "Site-Data\"
|
||||
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Site-Data\"
|
||||
Debug.AspNetCompiler.Updateable = "true"
|
||||
Debug.AspNetCompiler.ForceOverwrite = "true"
|
||||
Debug.AspNetCompiler.FixedNames = "false"
|
||||
Debug.AspNetCompiler.Debug = "True"
|
||||
Release.AspNetCompiler.VirtualPath = "/Site-Data"
|
||||
Release.AspNetCompiler.PhysicalPath = "Site-Data\"
|
||||
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\Site-Data\"
|
||||
Release.AspNetCompiler.Updateable = "true"
|
||||
Release.AspNetCompiler.ForceOverwrite = "true"
|
||||
Release.AspNetCompiler.FixedNames = "false"
|
||||
Release.AspNetCompiler.Debug = "False"
|
||||
VWDPort = "3845"
|
||||
StartServerOnDebug = "false"
|
||||
EndProjectSection
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{13E59551-34AC-43DC-9A03-EF5E4721DC61} = {13E59551-34AC-43DC-9A03-EF5E4721DC61}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{23B3F006-BEDC-4CA3-8E3E-47C25146FB00}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
license-this-code-is-in-public-domain.txt = license-this-code-is-in-public-domain.txt
|
||||
Todo-Roadmap.txt = Todo-Roadmap.txt
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Site5", "Site5\", "{A5BC62D1-61A6-4555-B88D-6E7F1D81D8DC}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
TargetFramework = "2.0"
|
||||
ProjectReferences = "{13E59551-34AC-43DC-9A03-EF5E4721DC61}|PirateWeb.Logic.dll;{BA24FAF7-D518-49E8-952A-45595682877E}|PirateWeb.Interface.dll;{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}|PirateWeb.Basic.dll;{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}|PirateWeb.Database.dll;"
|
||||
Debug.AspNetCompiler.VirtualPath = "/Site5"
|
||||
Debug.AspNetCompiler.PhysicalPath = "Site5\"
|
||||
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Site5\"
|
||||
Debug.AspNetCompiler.Updateable = "true"
|
||||
Debug.AspNetCompiler.ForceOverwrite = "true"
|
||||
Debug.AspNetCompiler.FixedNames = "false"
|
||||
Debug.AspNetCompiler.Debug = "True"
|
||||
Release.AspNetCompiler.VirtualPath = "/Site5"
|
||||
Release.AspNetCompiler.PhysicalPath = "Site5\"
|
||||
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\Site5\"
|
||||
Release.AspNetCompiler.Updateable = "true"
|
||||
Release.AspNetCompiler.ForceOverwrite = "true"
|
||||
Release.AspNetCompiler.FixedNames = "false"
|
||||
Release.AspNetCompiler.Debug = "False"
|
||||
VWDPort = "1044"
|
||||
VWDVirtualPath = "/"
|
||||
DefaultWebSiteLanguage = "Visual C#"
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Site-Empty", "Site-Empty\", "{97DC1344-6B11-482C-8DFB-97282689671C}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
TargetFramework = "2.0"
|
||||
Debug.AspNetCompiler.VirtualPath = "/Site-Empty"
|
||||
Debug.AspNetCompiler.PhysicalPath = "Site-Empty\"
|
||||
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Site-Empty\"
|
||||
Debug.AspNetCompiler.Updateable = "true"
|
||||
Debug.AspNetCompiler.ForceOverwrite = "true"
|
||||
Debug.AspNetCompiler.FixedNames = "false"
|
||||
Debug.AspNetCompiler.Debug = "True"
|
||||
Release.AspNetCompiler.VirtualPath = "/Site-Empty"
|
||||
Release.AspNetCompiler.PhysicalPath = "Site-Empty\"
|
||||
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\Site-Empty\"
|
||||
Release.AspNetCompiler.Updateable = "true"
|
||||
Release.AspNetCompiler.ForceOverwrite = "true"
|
||||
Release.AspNetCompiler.FixedNames = "false"
|
||||
Release.AspNetCompiler.Debug = "False"
|
||||
VWDPort = "1071"
|
||||
DefaultWebSiteLanguage = "Visual C#"
|
||||
StartServerOnDebug = "false"
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2CFEAB61-6A3B-4EB8-B523-560B4BEEF521}") = "Site5-Deployment", "Site5-Deployment\Site5-Deployment.wdproj", "{99E3CFDC-CF5D-46F5-92F5-9F707E71589C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Backend", "Backend\Backend.csproj", "{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SubversionScc) = preSolution
|
||||
Svn-Managed = True
|
||||
Manager = AnkhSVN - Subversion Support for Visual Studio
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|.NET = Debug|.NET
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Release|.NET = Release|.NET
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{13E59551-34AC-43DC-9A03-EF5E4721DC61}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{13E59551-34AC-43DC-9A03-EF5E4721DC61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{13E59551-34AC-43DC-9A03-EF5E4721DC61}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{13E59551-34AC-43DC-9A03-EF5E4721DC61}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{13E59551-34AC-43DC-9A03-EF5E4721DC61}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{13E59551-34AC-43DC-9A03-EF5E4721DC61}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{13E59551-34AC-43DC-9A03-EF5E4721DC61}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{13E59551-34AC-43DC-9A03-EF5E4721DC61}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{13E59551-34AC-43DC-9A03-EF5E4721DC61}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{13E59551-34AC-43DC-9A03-EF5E4721DC61}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{BA24FAF7-D518-49E8-952A-45595682877E}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{BA24FAF7-D518-49E8-952A-45595682877E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BA24FAF7-D518-49E8-952A-45595682877E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BA24FAF7-D518-49E8-952A-45595682877E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{BA24FAF7-D518-49E8-952A-45595682877E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{BA24FAF7-D518-49E8-952A-45595682877E}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{BA24FAF7-D518-49E8-952A-45595682877E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BA24FAF7-D518-49E8-952A-45595682877E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BA24FAF7-D518-49E8-952A-45595682877E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{BA24FAF7-D518-49E8-952A-45595682877E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{CD1B7DBC-19DB-41A8-80CE-986C66225E8B}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{CD1B7DBC-19DB-41A8-80CE-986C66225E8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CD1B7DBC-19DB-41A8-80CE-986C66225E8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CD1B7DBC-19DB-41A8-80CE-986C66225E8B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{CD1B7DBC-19DB-41A8-80CE-986C66225E8B}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{CD1B7DBC-19DB-41A8-80CE-986C66225E8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CD1B7DBC-19DB-41A8-80CE-986C66225E8B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CD1B7DBC-19DB-41A8-80CE-986C66225E8B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{C540570C-20E0-4979-84EB-8833810DDDF6}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{C540570C-20E0-4979-84EB-8833810DDDF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C540570C-20E0-4979-84EB-8833810DDDF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C540570C-20E0-4979-84EB-8833810DDDF6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{C540570C-20E0-4979-84EB-8833810DDDF6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{C540570C-20E0-4979-84EB-8833810DDDF6}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{C540570C-20E0-4979-84EB-8833810DDDF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C540570C-20E0-4979-84EB-8833810DDDF6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C540570C-20E0-4979-84EB-8833810DDDF6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{C540570C-20E0-4979-84EB-8833810DDDF6}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{D665AEB2-C94A-47D3-8376-AE65325E2E34}.Debug|.NET.ActiveCfg = Debug|.NET
|
||||
{D665AEB2-C94A-47D3-8376-AE65325E2E34}.Debug|.NET.Build.0 = Debug|.NET
|
||||
{D665AEB2-C94A-47D3-8376-AE65325E2E34}.Debug|Any CPU.ActiveCfg = Debug|.NET
|
||||
{D665AEB2-C94A-47D3-8376-AE65325E2E34}.Debug|Mixed Platforms.ActiveCfg = Debug|.NET
|
||||
{D665AEB2-C94A-47D3-8376-AE65325E2E34}.Release|.NET.ActiveCfg = Debug|.NET
|
||||
{D665AEB2-C94A-47D3-8376-AE65325E2E34}.Release|.NET.Build.0 = Debug|.NET
|
||||
{D665AEB2-C94A-47D3-8376-AE65325E2E34}.Release|Any CPU.ActiveCfg = Debug|.NET
|
||||
{D665AEB2-C94A-47D3-8376-AE65325E2E34}.Release|Mixed Platforms.ActiveCfg = Debug|.NET
|
||||
{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{DFAA322B-2865-4F7B-B08A-1C90A40FA706}.Debug|.NET.ActiveCfg = Debug|.NET
|
||||
{DFAA322B-2865-4F7B-B08A-1C90A40FA706}.Debug|.NET.Build.0 = Debug|.NET
|
||||
{DFAA322B-2865-4F7B-B08A-1C90A40FA706}.Debug|Any CPU.ActiveCfg = Debug|.NET
|
||||
{DFAA322B-2865-4F7B-B08A-1C90A40FA706}.Debug|Mixed Platforms.ActiveCfg = Debug|.NET
|
||||
{DFAA322B-2865-4F7B-B08A-1C90A40FA706}.Debug|Mixed Platforms.Build.0 = Debug|.NET
|
||||
{DFAA322B-2865-4F7B-B08A-1C90A40FA706}.Release|.NET.ActiveCfg = Debug|.NET
|
||||
{DFAA322B-2865-4F7B-B08A-1C90A40FA706}.Release|.NET.Build.0 = Debug|.NET
|
||||
{DFAA322B-2865-4F7B-B08A-1C90A40FA706}.Release|Any CPU.ActiveCfg = Debug|.NET
|
||||
{DFAA322B-2865-4F7B-B08A-1C90A40FA706}.Release|Mixed Platforms.ActiveCfg = Debug|.NET
|
||||
{DFAA322B-2865-4F7B-B08A-1C90A40FA706}.Release|Mixed Platforms.Build.0 = Debug|.NET
|
||||
{A5BC62D1-61A6-4555-B88D-6E7F1D81D8DC}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{A5BC62D1-61A6-4555-B88D-6E7F1D81D8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A5BC62D1-61A6-4555-B88D-6E7F1D81D8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A5BC62D1-61A6-4555-B88D-6E7F1D81D8DC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{A5BC62D1-61A6-4555-B88D-6E7F1D81D8DC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{A5BC62D1-61A6-4555-B88D-6E7F1D81D8DC}.Release|.NET.ActiveCfg = Debug|Any CPU
|
||||
{A5BC62D1-61A6-4555-B88D-6E7F1D81D8DC}.Release|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A5BC62D1-61A6-4555-B88D-6E7F1D81D8DC}.Release|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A5BC62D1-61A6-4555-B88D-6E7F1D81D8DC}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{A5BC62D1-61A6-4555-B88D-6E7F1D81D8DC}.Release|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{97DC1344-6B11-482C-8DFB-97282689671C}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{97DC1344-6B11-482C-8DFB-97282689671C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{97DC1344-6B11-482C-8DFB-97282689671C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{97DC1344-6B11-482C-8DFB-97282689671C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{97DC1344-6B11-482C-8DFB-97282689671C}.Release|.NET.ActiveCfg = Debug|Any CPU
|
||||
{97DC1344-6B11-482C-8DFB-97282689671C}.Release|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{97DC1344-6B11-482C-8DFB-97282689671C}.Release|Any CPU.Build.0 = Debug|Any CPU
|
||||
{97DC1344-6B11-482C-8DFB-97282689671C}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{99E3CFDC-CF5D-46F5-92F5-9F707E71589C}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{99E3CFDC-CF5D-46F5-92F5-9F707E71589C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{99E3CFDC-CF5D-46F5-92F5-9F707E71589C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{99E3CFDC-CF5D-46F5-92F5-9F707E71589C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{99E3CFDC-CF5D-46F5-92F5-9F707E71589C}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{99E3CFDC-CF5D-46F5-92F5-9F707E71589C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{99E3CFDC-CF5D-46F5-92F5-9F707E71589C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{99E3CFDC-CF5D-46F5-92F5-9F707E71589C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{99E3CFDC-CF5D-46F5-92F5-9F707E71589C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Activizr.Backend</RootNamespace>
|
||||
<AssemblyName>activizr-backend</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<ManifestCertificateThumbprint>2280FA0F5C408893812C70CF59D1DEF99F19AAA5</ManifestCertificateThumbprint>
|
||||
<ManifestKeyFile>Monobot_TemporaryKey.pfx</ManifestKeyFile>
|
||||
<GenerateManifests>true</GenerateManifests>
|
||||
<SignManifests>false</SignManifests>
|
||||
<PublishUrl>\\skybird\piratebot\</PublishUrl>
|
||||
<Install>false</Install>
|
||||
<InstallFrom>Unc</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MySql.Data, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="OneOffs.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Basic\Basic.csproj">
|
||||
<Project>{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}</Project>
|
||||
<Name>Basic</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Database\Database.csproj">
|
||||
<Project>{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}</Project>
|
||||
<Name>Database</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Logic\Logic.csproj">
|
||||
<Project>{13E59551-34AC-43DC-9A03-EF5E4721DC61}</Project>
|
||||
<Name>Logic</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Utility\Utility.csproj">
|
||||
<Project>{C540570C-20E0-4979-84EB-8833810DDDF6}</Project>
|
||||
<Name>Utility</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
+1873
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,729 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Net;
|
||||
using System.Net.Mail;
|
||||
|
||||
using Activizr.Basic;
|
||||
using Activizr.Basic.Enums;
|
||||
using Activizr.Logic.Financial;
|
||||
using Activizr.Logic.Pirates;
|
||||
using Activizr.Logic.Special.Sweden;
|
||||
using Activizr.Logic.Structure;
|
||||
using Activizr.Logic.Support;
|
||||
using Activizr.Utility;
|
||||
using Activizr.Utility.BotCode;
|
||||
using Activizr.Utility.Financial;
|
||||
using Activizr.Utility.Mail;
|
||||
using System.Diagnostics;
|
||||
using Activizr.Utility.Special.Sweden;
|
||||
|
||||
namespace Activizr.Backend
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
private static void Main (string[] args)
|
||||
{
|
||||
testMode = false;
|
||||
|
||||
|
||||
|
||||
BotLog.Write(0, "MainCycle", string.Empty);
|
||||
BotLog.Write(0, "MainCycle", "-----------------------------------------------");
|
||||
BotLog.Write(0, "MainCycle", string.Empty);
|
||||
|
||||
if (args.Length > 0)
|
||||
{
|
||||
if (args[0].ToLower() == "test")
|
||||
{
|
||||
BotLog.Write(0, "MainCycle", "Running self-tests");
|
||||
HeartBeater.Instance.Beat("/var/run/piratebot/heartbeat.txt"); // Otherwise Heartbeater.Beat() will fail in various places
|
||||
|
||||
testMode = true;
|
||||
Console.WriteLine("Testing All Maintenance Processes (except membership-changing ones).");
|
||||
PWLog.Write(PWLogItem.None, 0, PWLogAction.SystemTest, string.Empty, string.Empty);
|
||||
|
||||
Console.WriteLine("\r\n10-second intervals:");
|
||||
OnEveryTenSeconds();
|
||||
Console.WriteLine("\r\nEvery minute:");
|
||||
OnEveryMinute();
|
||||
Console.WriteLine("\r\nEvery five minutes:");
|
||||
OnEveryFiveMinutes();
|
||||
Console.WriteLine("\r\nEvery hour:");
|
||||
OnEveryHour();
|
||||
Console.WriteLine("\r\nNoon:");
|
||||
OnNoon();
|
||||
Console.WriteLine("\r\nMidnight:");
|
||||
OnMidnight();
|
||||
|
||||
Console.Write("\r\nAll tests run. Waiting for mail queue to flush... ");
|
||||
while (!Activizr.Utility.Mail.MailTransmitter.CanExit)
|
||||
{
|
||||
System.Threading.Thread.Sleep(50);
|
||||
}
|
||||
|
||||
Console.WriteLine("done.");
|
||||
BotLog.Write(0, "MainCycle", "Exiting self-tests");
|
||||
return;
|
||||
}
|
||||
|
||||
if (args[0].ToLower() == "console")
|
||||
{
|
||||
Console.WriteLine("\r\nRunning PirateBot-Mono in CONSOLE mode.\r\n");
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
// -------------------------------------------------------------------------------------
|
||||
// -------------------------------------------------------------------------------------
|
||||
|
||||
// ----------------------- INSERT ANY ONE-OFF ACTIONS HERE -------------------------
|
||||
|
||||
Console.WriteLine("Calling closure of 2010 books.");
|
||||
|
||||
OneOffs.CloseBooksForYear(2010);
|
||||
|
||||
/*
|
||||
PWEvents.CreateEvent(EventSource.PirateBot, EventType.ParleyCancelled, 1, 1, 1, 1, 1, string.Empty);
|
||||
PWEvents.CreateEvent(EventSource.PirateBot, EventType.ParleyCancelled, 1, 1, 1, 1, 4, string.Empty);
|
||||
PWEvents.CreateEvent(EventSource.PirateBot, EventType.ParleyCancelled, 1, 1, 1, 1, 5, string.Empty);*/
|
||||
|
||||
// PirateWeb.Utility.BotCode.ActivityMailer.Run();
|
||||
|
||||
// PirateWeb.Utility.BotCode.RosterHousekeeping.RemindExpiriesMail();
|
||||
|
||||
// OneOffs.FixOutboundInvoices();
|
||||
|
||||
// OneOffs.SmsMembersOnElectionDay2010();
|
||||
|
||||
// OneOffs.RepairFinancials();
|
||||
|
||||
// Console.WriteLine("Entering RemindExpiriesMail()");
|
||||
// PirateWeb.Utility.BotCode.RosterHousekeeping.RemindExpiriesMail();
|
||||
|
||||
// OneOffs.CarryOver2010LocalBudgets();
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
// -------------------------------------------------------------------------------------
|
||||
// -------------------------------------------------------------------------------------
|
||||
|
||||
Console.Write("\r\nWaiting for mail queue to flush... ");
|
||||
|
||||
while (!Activizr.Utility.Mail.MailTransmitter.CanExit)
|
||||
{
|
||||
System.Threading.Thread.Sleep(50);
|
||||
}
|
||||
|
||||
Console.WriteLine("done.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (args[0].ToLower() == "rsm")
|
||||
{
|
||||
Console.WriteLine("räksmörgås RÄKSMÖRGÅS");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
MailMessage message = new MailMessage();
|
||||
message.From = new MailAddress(Strings.MailSenderAddress, Strings.MailSenderName);
|
||||
message.To.Add (new MailAddress ("rick@piratpartiet.se", "Rick Falkvinge (Piratpartiet)"));
|
||||
message.Subject = "Räksmörgåsarnas ékÖNÖMÏåvdëlnïng";
|
||||
message.Body = "Hejsan hoppsan Räksmörgåsar.";
|
||||
message.BodyEncoding = Encoding.Default;
|
||||
message.SubjectEncoding = Encoding.Default;
|
||||
|
||||
SmtpClient smtpClient = new SmtpClient ("localhost");
|
||||
smtpClient.Credentials = null; // mono bug
|
||||
smtpClient.Send (message);*/
|
||||
|
||||
Console.WriteLine(" * PirateBot-Lamp starting");
|
||||
|
||||
HeartBeater.Instance.Beat("/var/run/piratebot/heartbeat.txt");
|
||||
|
||||
if (File.Exists("./piratebotexit.flag"))
|
||||
{
|
||||
File.Delete("./piratebotexit.flag");
|
||||
}
|
||||
|
||||
//to debug automatic restart: (Hang here)
|
||||
if (File.Exists("./lock_the_shit")) { while (true) Thread.Sleep(1000); }
|
||||
|
||||
BotLog.Write(0, "MainCycle", "BOT STARTING, sending botstart notices");
|
||||
|
||||
Activizr.Utility.Mail.MailTransmitter statusMail = new Activizr.Utility.Mail.MailTransmitter
|
||||
("PirateWeb-L", "noreply@pirateweb.net", "PirateBot-L starting", string.Empty, Person.FromIdentity(1));
|
||||
statusMail.Send();
|
||||
|
||||
Person.FromIdentity(1).SendOfficerNotice("PirateBot-L active & operational",
|
||||
"PirateBot Lamp - all systems are operational", 1);
|
||||
|
||||
BotLog.Write(0, "MainCycle", "...done");
|
||||
|
||||
DateTime cycleStartTime = DateTime.Now;
|
||||
|
||||
int lastSecond = cycleStartTime.Second;
|
||||
int lastMinute = cycleStartTime.Minute;
|
||||
int lastHour = cycleStartTime.Hour;
|
||||
|
||||
|
||||
while (!File.Exists("./piratebotexit.flag"))
|
||||
{
|
||||
BotLog.Write(0, "MainCycle", "Cycle Start");
|
||||
|
||||
cycleStartTime = DateTime.Now;
|
||||
|
||||
try
|
||||
{
|
||||
HeartBeater.Instance.Beat();
|
||||
OnEveryTenSeconds();
|
||||
|
||||
if (cycleStartTime.Second < lastSecond)
|
||||
{
|
||||
OnEveryMinute();
|
||||
|
||||
if (cycleStartTime.Minute % 5 == 0)
|
||||
{
|
||||
OnEveryFiveMinutes();
|
||||
}
|
||||
}
|
||||
|
||||
if (cycleStartTime.Minute < lastMinute)
|
||||
{
|
||||
OnEveryHour();
|
||||
|
||||
if (DateTime.Now.Hour == 10 && DateTime.Today.DayOfWeek == DayOfWeek.Tuesday)
|
||||
{
|
||||
OnTuesdayMorning();
|
||||
}
|
||||
}
|
||||
|
||||
if (cycleStartTime.Hour >= 12 && lastHour < 12)
|
||||
{
|
||||
OnNoon();
|
||||
}
|
||||
|
||||
if (cycleStartTime.Hour < lastHour)
|
||||
{
|
||||
OnMidnight();
|
||||
}
|
||||
}
|
||||
|
||||
catch (Exception e)
|
||||
{
|
||||
//Note each "OnEvery..." catches its own errors and sends Exception mail now.
|
||||
//so that failure in one should not stop the others from running.
|
||||
ExceptionMail.Send(new Exception("Failed in bot main loop", e), true);
|
||||
}
|
||||
|
||||
lastSecond = cycleStartTime.Second;
|
||||
lastMinute = cycleStartTime.Minute;
|
||||
lastHour = cycleStartTime.Hour;
|
||||
|
||||
// Wait for a maximum of ten seconds
|
||||
|
||||
while (DateTime.Now < cycleStartTime.AddSeconds(10) && !File.Exists("./piratebotexit.flag"))
|
||||
{
|
||||
Thread.Sleep(200);
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine(" * PirateBot-Lamp stopping");
|
||||
BotLog.Write(0, "MainCycle", "BOT EXITING, sending bot-termination notices");
|
||||
|
||||
if (HeartBeater.Instance.WasKilled)
|
||||
{
|
||||
File.Delete("./piratebotexit.flag");
|
||||
// removed unconditional delete, cron jobb that restarts bot uses it to know that it is intentionally down.
|
||||
ExceptionMail.Send(new Exception("HeartBeater triggered restart of MonoBot. Will commence after 800 seconds."), false);
|
||||
}
|
||||
|
||||
statusMail = new Activizr.Utility.Mail.MailTransmitter
|
||||
("PirateWeb-L", "noreply@pirateweb.net", "PirateBot-L exiting", string.Empty, Person.FromIdentity(1));
|
||||
statusMail.Send();
|
||||
|
||||
BotLog.Write(0, "MainCycle", "...done");
|
||||
|
||||
while (!Activizr.Utility.Mail.MailTransmitter.CanExit)
|
||||
{
|
||||
System.Threading.Thread.Sleep(50);
|
||||
}
|
||||
|
||||
Thread.Sleep(2000);
|
||||
}
|
||||
|
||||
private static void OnEveryTenSeconds ()
|
||||
{
|
||||
try
|
||||
{
|
||||
BotLog.Write(0, "MainCycle", "Ten-second entry");
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running EventProcessor.Run()...");
|
||||
Activizr.Utility.BotCode.EventProcessor.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running MailResolver.Run()...");
|
||||
MailResolver.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running MailProcessor.Run()...");
|
||||
MailProcessor.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
BotLog.Write(0, "MainCycle", "Ten-second exit");
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ExceptionMail.Send(e, true);
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnEveryMinute ()
|
||||
{
|
||||
try
|
||||
{
|
||||
BotLog.Write(0, "MainCycle", "One-minute process (empty)");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
// empty
|
||||
}
|
||||
|
||||
|
||||
private static void OnEveryFiveMinutes ()
|
||||
{
|
||||
try
|
||||
{
|
||||
BotLog.Write(0, "MainCycle", "Five-minute entry");
|
||||
|
||||
try
|
||||
{
|
||||
BotLog.Write(1, "FiveMinute", "Starting press release checker");
|
||||
TestTrace("Running PressReleaseChecker.Run()...");
|
||||
PressReleaseChecker.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
BotLog.Write(1, "FiveMinute", "Starting newsletter checker");
|
||||
TestTrace("Running NewsletterChecker.Run()...");
|
||||
NewsletterChecker.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
BotLog.Write(1, "FiveMinute", "Starting turnaround tracker");
|
||||
TestTrace("Running TurnaroundTracker.Run()...");
|
||||
TurnaroundTracker.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// TestTrace(" done.\r\nRunning UpdateStatsCache.Run()...");
|
||||
// UpdateStatsCache.Run();
|
||||
/*TestTrace(" done.\r\nRunning TranslateUrls()...");
|
||||
TranslateUrls();*/
|
||||
|
||||
// Added during election rush 2010: clean up support database every five minutes instead of once a day
|
||||
// SMS notifications for bounces are turned off, so people don't get SMS notifications in the middle of the night
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
BotLog.Write(1, "FiveMinute", "Closing delay warnings");
|
||||
TestTrace("Running SupportDatabase.CloseDelayWarnings()...");
|
||||
SupportDatabase.CloseDelayWarnings();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running SupportDatabase.NotifyBouncingEmails()...");
|
||||
BotLog.Write(1, "FiveMinute", "Notifying bouncing emails");
|
||||
SupportDatabase.NotifyBouncingEmails();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running SupportMailReview.Run()...");
|
||||
BotLog.Write(1, "FiveMinute", "Running support mail review");
|
||||
Activizr.Utility.Special.Sweden.SupportMailReview.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
|
||||
BotLog.Write(0, "MainCycle", "Five-minute exit");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ExceptionMail.Send(e, true);
|
||||
TestTrace(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void OnEveryHour ()
|
||||
{
|
||||
DateTime startTime = DateTime.Now;
|
||||
try
|
||||
{
|
||||
BotLog.Write(0, "MainCycle", "One-hour entry");
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running BlogWatcher.Run()...");
|
||||
BlogWatcher.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running MediaWatcher.Run()...");
|
||||
MediaWatcher.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running PaymentGroupMapper.Run()...");
|
||||
PaymentGroupMapper.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running BlogTop50Scraper.Run()...");
|
||||
BlogTop50Scraper.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running Mappery.CreatePiratpartietOrganizationStrengthCircuitMap()...");
|
||||
Mappery.CreatePiratpartietOrganizationStrengthCircuitMap();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running Mappery.CreatePiratpartietOrganizationStrengthCityMap()...");
|
||||
Mappery.CreatePiratpartietOrganizationStrengthCityMap();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
//run once a month at the 25:th at 5 o'clock in the morning
|
||||
if (startTime.Day == 25 && startTime.Hour == 5 && startTime.Minute < 50)
|
||||
{
|
||||
TestTrace("Running RosterHousekeeping.RemindChangeOrg()...");
|
||||
RosterHousekeeping.RemindChangeOrg();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
BotLog.Write(0, "MainCycle", "One-hour exit");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnMidnight ()
|
||||
{
|
||||
try
|
||||
{
|
||||
BotLog.Write(0, "MainCycle", "Midnight entry");
|
||||
|
||||
try
|
||||
{
|
||||
if (!testMode)
|
||||
{
|
||||
TestTrace("Running RosterHousekeeping.ChurnExpiredMembers()...");
|
||||
RosterHousekeeping.ChurnExpiredMembers();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running InternalPollMaintenance.Run()...");
|
||||
InternalPollMaintenance.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running SwedishForumMemberCheck.Run()...");
|
||||
SwedishForumMemberCheck.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running SalaryProcessor.Run()...");
|
||||
SalaryProcessor.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running TurnaroundTracker.Housekeeping()...");
|
||||
TurnaroundTracker.Housekeeping();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running Mappery.CreateUngPiratUptakeMap()...");
|
||||
Mappery.CreateUngPiratUptakeMap();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running RosterHousekeeping.TimeoutVolunteers()...");
|
||||
RosterHousekeeping.TimeoutVolunteers();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
BotLog.Write(0, "MainCycle", "Midnight exit");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ExceptionMail.Send(e, true);
|
||||
TestTrace(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnNoon ()
|
||||
{
|
||||
BotLog.Write(0, "MainCycle", "Noon entry");
|
||||
|
||||
try
|
||||
{
|
||||
if (!testMode)
|
||||
{
|
||||
TestTrace("Running RosterHousekeeping.RemindAllExpiries()...");
|
||||
RosterHousekeeping.RemindAllExpiries();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (!testMode)
|
||||
{
|
||||
TestTrace("Running SupportDatabase.NotifyBouncingEmails()...");
|
||||
SupportDatabase.NotifyBouncingEmails();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running SupportDatabase.CloseDelayWarnings()...");
|
||||
SupportDatabase.CloseDelayWarnings();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
TestTrace("Running SupportMailReview.Run()...");
|
||||
Activizr.Utility.Special.Sweden.SupportMailReview.Run();
|
||||
TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TraceAndReport(e);
|
||||
}
|
||||
|
||||
|
||||
BotLog.Write(0, "MainCycle", "Noon exit");
|
||||
}
|
||||
|
||||
private static void OnTuesdayMorning ()
|
||||
{
|
||||
try
|
||||
{
|
||||
//TestTrace("Running ActivityMailer.Run()...");
|
||||
// PirateWeb.Utility.BotCode.ActivityMailer.Run();
|
||||
//TestTrace(" done.\r\n");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ExceptionMail.Send(e, true);
|
||||
if (testMode)
|
||||
{
|
||||
Console.WriteLine(e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void TraceAndReport (Exception e)
|
||||
{
|
||||
TestTrace(" failed.\r\n");
|
||||
ExceptionMail.Send(e, true);
|
||||
TestTrace(e.ToString());
|
||||
}
|
||||
|
||||
private static void TestTrace (string message)
|
||||
{
|
||||
if (testMode)
|
||||
{
|
||||
Console.Write(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void TranslateUrls ()
|
||||
{
|
||||
string[] untranslatedUrls = UrlTranslations.GetUntranslated(20);
|
||||
|
||||
foreach (string url in untranslatedUrls)
|
||||
{
|
||||
try
|
||||
{
|
||||
string newUrl = Activizr.Utility.Special.UrlTranslator.Translate(url);
|
||||
UrlTranslations.Set(url, newUrl);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ExceptionMail.Send(new Exception("Tried to translate URL " + url, e));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static bool testMode;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
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 ("Monobot")]
|
||||
[assembly: AssemblyDescription ("")]
|
||||
[assembly: AssemblyConfiguration ("")]
|
||||
[assembly: AssemblyCompany ("Disorganized")]
|
||||
[assembly: AssemblyProduct ("Monobot")]
|
||||
[assembly: AssemblyCopyright ("Copyright © Disorganized 2008")]
|
||||
[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 ("948b695d-d8cc-442c-93a1-1e8928c1a5e8")]
|
||||
|
||||
// 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")]
|
||||
@@ -0,0 +1,177 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<AssemblyName>Activizr.Basic</AssemblyName>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Activizr.Basic</RootNamespace>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>../Site/bin/</OutputPath>
|
||||
<DebugType>full</DebugType>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<Optimize>False</Optimize>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>PirateWeb.Basic</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>../Site/bin/</OutputPath>
|
||||
<DebugType>none</DebugType>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<Optimize>True</Optimize>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>PirateWeb.Basic</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Enums\CommunicationType.cs" />
|
||||
<Compile Include="Enums\ExternalActivityType.cs" />
|
||||
<Compile Include="Types\BasicBallot.cs" />
|
||||
<Compile Include="Types\BasicCommunicationTurnaround.cs" />
|
||||
<Compile Include="Types\BasicElection.cs" />
|
||||
<Compile Include="Types\BasicExceptionLog.cs" />
|
||||
<Compile Include="Types\BasicExternalActivity.cs" />
|
||||
<Compile Include="Types\BasicFinancialValidation.cs" />
|
||||
<Compile Include="Types\Governance\BasicMeeting.cs" />
|
||||
<Compile Include="Config.cs" />
|
||||
<Compile Include="Diagnostics\Logging.cs" />
|
||||
<Compile Include="Enums\AddressValidationResult.cs" />
|
||||
<Compile Include="Enums\DocumentType.cs" />
|
||||
<Compile Include="Enums\ExternalIdentityType.cs" />
|
||||
<Compile Include="Enums\FinancialAccountType.cs" />
|
||||
<Compile Include="Enums\FinancialDependencyType.cs" />
|
||||
<Compile Include="Enums\FinancialValidationType.cs" />
|
||||
<Compile Include="Enums\GeographyLevel.cs" />
|
||||
<Compile Include="Enums\InvalidMembershipType.cs" />
|
||||
<Compile Include="Enums\MailAuthorType.cs" />
|
||||
<Compile Include="Enums\MembershipPaymentStatus.cs" />
|
||||
<Compile Include="Enums\ObjectOptionalDataType.cs" />
|
||||
<Compile Include="Enums\PermissionEnum.cs" />
|
||||
<Compile Include="Enums\PoliticalAffiliation.cs" />
|
||||
<Compile Include="Interfaces\IEmailPerson.cs" />
|
||||
<Compile Include="Interfaces\IHasIdentities.cs" />
|
||||
<Compile Include="Strings.cs" />
|
||||
<Compile Include="Types\BasicAddressValidationRun.cs" />
|
||||
<Compile Include="Types\Security\BasicAuthority.cs" />
|
||||
<Compile Include="Types\Communications\BasicAutoMail.cs" />
|
||||
<Compile Include="Types\BasicChurnDataPoint.cs" />
|
||||
<Compile Include="Types\BasicCity.cs" />
|
||||
<Compile Include="Types\BasicCountry.cs" />
|
||||
<Compile Include="Types\BasicDocument.cs" />
|
||||
<Compile Include="Types\BasicExpenseClaim.cs" />
|
||||
<Compile Include="Types\BasicExternalCredential.cs" />
|
||||
<Compile Include="Types\BasicExternalIdentity.cs" />
|
||||
<Compile Include="Types\BasicFinancialAccount.cs" />
|
||||
<Compile Include="Types\BasicFinancialAccountRow.cs" />
|
||||
<Compile Include="Types\BasicFinancialDependency.cs" />
|
||||
<Compile Include="Types\BasicFinancialTransaction.cs" />
|
||||
<Compile Include="Types\BasicFinancialTransactionRow.cs" />
|
||||
<Compile Include="Types\BasicInboundInvoice.cs" />
|
||||
<Compile Include="Types\BasicInternalPoll.cs" />
|
||||
<Compile Include="Types\BasicInternalPollCandidate.cs" />
|
||||
<Compile Include="Types\BasicInternalPollVote.cs" />
|
||||
<Compile Include="Types\BasicInternalPollVoteDetail.cs" />
|
||||
<Compile Include="Types\BasicMailTemplate.cs" />
|
||||
<Compile Include="Types\BasicMediaCategory.cs" />
|
||||
<Compile Include="Types\BasicMediaEntry.cs" />
|
||||
<Compile Include="Types\BasicMediaKeyword.cs" />
|
||||
<Compile Include="Types\BasicMedium.cs" />
|
||||
<Compile Include="Types\BasicMembershipPaymentStatus.cs" />
|
||||
<Compile Include="Types\Governance\BasicMotion.cs" />
|
||||
<Compile Include="Types\Governance\BasicMotionAmendment.cs" />
|
||||
<Compile Include="Types\BasicNewsletter.cs" />
|
||||
<Compile Include="Types\BasicNewsletterTemplate.cs" />
|
||||
<Compile Include="Types\BasicObjectOptionalData.cs" />
|
||||
<Compile Include="Types\BasicOutboundInvoice.cs" />
|
||||
<Compile Include="Types\BasicOutboundInvoiceItem.cs" />
|
||||
<Compile Include="Types\BasicOutboundMail.cs" />
|
||||
<Compile Include="Types\BasicOutboundMailRecipient.cs" />
|
||||
<Compile Include="Types\BasicPaperLetter.cs" />
|
||||
<Compile Include="Types\BasicParley.cs" />
|
||||
<Compile Include="Types\BasicParleyAttendee.cs" />
|
||||
<Compile Include="Types\BasicParleyOption.cs" />
|
||||
<Compile Include="Types\BasicPayment.cs" />
|
||||
<Compile Include="Types\BasicPaymentCode.cs" />
|
||||
<Compile Include="Enums\AutoMailType.cs" />
|
||||
<Compile Include="Enums\ExpenseEventType.cs" />
|
||||
<Compile Include="Enums\PaymentCodeIssueType.cs" />
|
||||
<Compile Include="Enums\PersonGender.cs" />
|
||||
<Compile Include="Enums\PersonOptionalDataKey.cs" />
|
||||
<Compile Include="Enums\RoleTypeClass.cs" />
|
||||
<Compile Include="Types\BasicPaymentGroup.cs" />
|
||||
<Compile Include="Types\BasicPaymentInformation.cs" />
|
||||
<Compile Include="Types\BasicPayrollAdjustment.cs" />
|
||||
<Compile Include="Types\BasicPWEvent.cs" />
|
||||
<Compile Include="Enums\EventTypeSource.cs" />
|
||||
<Compile Include="Interfaces\IHandleProvider.cs" />
|
||||
<Compile Include="Interfaces\IHasIdentity.cs" />
|
||||
<Compile Include="Types\BasicNewsletterFeed.cs" />
|
||||
<Compile Include="Types\BasicGeography.cs" />
|
||||
<Compile Include="Types\BasicPayout.cs" />
|
||||
<Compile Include="Types\BasicPayrollItem.cs" />
|
||||
<Compile Include="Types\BasicPermission.cs" />
|
||||
<Compile Include="Types\BasicPerson.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Types\BasicMembership.cs" />
|
||||
<Compile Include="Types\BasicOrganization.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Types\BasicPWLog.cs" />
|
||||
<Compile Include="Types\BasicRefund.cs" />
|
||||
<Compile Include="Types\BasicReporter.cs" />
|
||||
<Compile Include="Types\BasicPersonRole.cs" />
|
||||
<Compile Include="Types\BasicSalary.cs" />
|
||||
<Compile Include="Types\BasicSupplier.cs" />
|
||||
<Compile Include="Types\BasicUptakeGeography.cs" />
|
||||
<Compile Include="Types\BasicVolunteer.cs" />
|
||||
<Compile Include="Types\BasicVolunteerRole.cs" />
|
||||
<Compile Include="Types\BasicGeographyDesignation.cs" />
|
||||
<Compile Include="Types\BasicCurrency.cs" />
|
||||
<Compile Include="Types\GeographyWithPeople.cs" />
|
||||
<Compile Include="Types\BasicInternalPollVoter.cs" />
|
||||
<Compile Include="Types\XmlSerializableDictionary.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="DataSets\" />
|
||||
<Folder Include="Statistics\DataPoints\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic
|
||||
{
|
||||
public class Config
|
||||
{
|
||||
static public int SmtpPort
|
||||
{
|
||||
get
|
||||
{
|
||||
string portString = ConfigurationSettings.AppSettings["SmtpPort"];
|
||||
|
||||
if (String.IsNullOrEmpty(portString))
|
||||
{
|
||||
return 587;
|
||||
}
|
||||
|
||||
return Int32.Parse(portString);
|
||||
}
|
||||
}
|
||||
|
||||
static public string SmtpHost
|
||||
{
|
||||
get
|
||||
{
|
||||
string smtpHost = ConfigurationSettings.AppSettings["SmtpHost"];
|
||||
|
||||
if (String.IsNullOrEmpty(smtpHost))
|
||||
{
|
||||
return "piratesmtp";
|
||||
}
|
||||
|
||||
return smtpHost;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Diagnostics
|
||||
{
|
||||
public class Logging
|
||||
{
|
||||
static public void LogError(LogSource source, string message)
|
||||
{
|
||||
EventLog eventLog = new EventLog();
|
||||
eventLog.Source = source.ToString();
|
||||
eventLog.WriteEntry(message, EventLogEntryType.Error);
|
||||
}
|
||||
|
||||
static public void LogException(LogSource source, Exception exception)
|
||||
{
|
||||
LogError(source, exception.ToString());
|
||||
}
|
||||
|
||||
static public void LogWarning(LogSource source, string message)
|
||||
{
|
||||
EventLog eventLog = new EventLog();
|
||||
eventLog.Source = source.ToString();
|
||||
eventLog.WriteEntry(message, EventLogEntryType.Warning);
|
||||
}
|
||||
|
||||
static public void LogInformation(LogSource source, string message)
|
||||
{
|
||||
EventLog eventLog = new EventLog();
|
||||
eventLog.Source = source.ToString();
|
||||
eventLog.WriteEntry(message, EventLogEntryType.Information);
|
||||
}
|
||||
}
|
||||
|
||||
public enum LogSource
|
||||
{
|
||||
Unknown = 0,
|
||||
PirateDb,
|
||||
PirateBot,
|
||||
PirateWeb,
|
||||
PirateLogic
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
namespace Activizr.Basic
|
||||
{
|
||||
public enum AddressValidationResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Unknown or undefined result.
|
||||
/// </summary>
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// Confirmed valid by remote server.
|
||||
/// </summary>
|
||||
Valid = 1,
|
||||
/// <summary>
|
||||
/// Confirmed invalid by remote server.
|
||||
/// </summary>
|
||||
AccountInvalid = 2,
|
||||
/// <summary>
|
||||
/// Remote server does not respond or exist.
|
||||
/// </summary>
|
||||
ServerInvalid = 3,
|
||||
/// <summary>
|
||||
/// Email address syntax is invalid.
|
||||
/// </summary>
|
||||
BadSyntax = 4
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum AutoMailType
|
||||
{
|
||||
Unknown = 0,
|
||||
Welcome,
|
||||
MemberMail,
|
||||
OfficerMail,
|
||||
Reminder,
|
||||
ActivistMail,
|
||||
Expired,
|
||||
Newsletter,
|
||||
PressRelease,
|
||||
WelcomeTimeLimitedContent=100 //Not implemented yet..
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum CommunicationType
|
||||
{
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// Mail to the Press Office for an org
|
||||
/// </summary>
|
||||
PressMail,
|
||||
/// <summary>
|
||||
/// General information inquiry
|
||||
/// </summary>
|
||||
InformationMail
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum DocumentType
|
||||
{
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// A photo that can be used to generate on-the-fly stuff, or for press images.
|
||||
/// </summary>
|
||||
PersonPhoto,
|
||||
/// <summary>
|
||||
/// A receipt for an expense. Filed by the expenser.
|
||||
/// </summary>
|
||||
ExpenseClaim,
|
||||
/// <summary>
|
||||
/// A document supporting a transaction where assets decrease (invoice, etc).
|
||||
/// </summary>
|
||||
FinancialTransaction,
|
||||
/// <summary>
|
||||
/// A temporary identity, used while the basis of the document is still being created.
|
||||
/// </summary>
|
||||
Temporary,
|
||||
/// <summary>
|
||||
/// An inbound invoice, going into accounts payable.
|
||||
/// </summary>
|
||||
InboundInvoice,
|
||||
/// <summary>
|
||||
/// Something physical received in the mail
|
||||
/// </summary>
|
||||
PaperLetter,
|
||||
/// <summary>
|
||||
/// A document (contract or else) that creates or modifies the payroll
|
||||
/// </summary>
|
||||
PayrollItem,
|
||||
/// <summary>
|
||||
/// Photo documenting an external activity
|
||||
/// </summary>
|
||||
ExternalActivityPhoto
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum EventType
|
||||
{
|
||||
Unknown = 0,
|
||||
AddedRole,
|
||||
DeletedRole,
|
||||
AddedMember,
|
||||
AddedMembership,
|
||||
ExtendedMembership,
|
||||
TerminatedMembership,
|
||||
ReceivedMembershipPayment,
|
||||
ExpenseCreated,
|
||||
ExpenseChanged,
|
||||
ExpensesRepaidClosed,
|
||||
EmailAccountRequested,
|
||||
RefreshEmailAccount,
|
||||
LostMember,
|
||||
NewActivist,
|
||||
LostActivist,
|
||||
NewVolunteer,
|
||||
TransferredMembership,
|
||||
ExpenseAttested,
|
||||
ExpenseValidated,
|
||||
InboundInvoiceReceived,
|
||||
InboundInvoiceAttested,
|
||||
InboundInvoiceClosed,
|
||||
PaperLetterReceived,
|
||||
PayoutCreated,
|
||||
SalaryCreated,
|
||||
SalaryAttested,
|
||||
LocalDonationReceived,
|
||||
PhoneMessagesCreated,
|
||||
ActivistMailsCreated,
|
||||
OutboundInvoiceCreated,
|
||||
OutboundInvoicePaid,
|
||||
CandidateDocumentationReceived,
|
||||
ActivismLogged,
|
||||
CryptoKeyRequested,
|
||||
ParleyCreated,
|
||||
ParleyAttested,
|
||||
ParleyCancelled,
|
||||
ParleyClosed,
|
||||
ParleyAttendeeCreated,
|
||||
ParleyAttendeeConfirmed,
|
||||
FinancialDataUploaded,
|
||||
RefundCreated,
|
||||
}
|
||||
|
||||
public enum EventSource
|
||||
{
|
||||
Unknown = 0,
|
||||
PirateWeb,
|
||||
PirateBot,
|
||||
WebServices,
|
||||
SignupPage,
|
||||
CustomServiceInterface,
|
||||
SMS
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum ExpenseEventType
|
||||
{
|
||||
Unknown = 0,
|
||||
Filed = 1,
|
||||
Approved,
|
||||
RepaidClosed,
|
||||
DeniedClosed
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum ExternalActivityType
|
||||
{
|
||||
Unknown = 0,
|
||||
Rally,
|
||||
Flyers,
|
||||
Street,
|
||||
School,
|
||||
Fair,
|
||||
Seminar,
|
||||
PressCoverage,
|
||||
Other
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum ExternalIdentityType
|
||||
{
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
Unknown=0,
|
||||
/// <summary>
|
||||
/// JID on the Pirate Party XMPPServer
|
||||
/// </summary>
|
||||
PPXMPPAccount=1,
|
||||
/// <summary>
|
||||
/// JID on other XMPP
|
||||
/// </summary>
|
||||
ExternalXMPPAccount=2
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum FinancialAccountType
|
||||
{
|
||||
/// <summary>
|
||||
/// Unknown account type.
|
||||
/// </summary>
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// An asset, such as a bank account. Balance account.
|
||||
/// </summary>
|
||||
Asset = 1,
|
||||
/// <summary>
|
||||
/// A debt, such as unprocessed activist expenses. Balance account.
|
||||
/// </summary>
|
||||
Debt = 2,
|
||||
/// <summary>
|
||||
/// An income, any income. Result account. Received money is negative (sign reversed account).
|
||||
/// </summary>
|
||||
Income = 3,
|
||||
/// <summary>
|
||||
/// A cost, any cost. Result account. Spent money is positive (sign reversed account).
|
||||
/// </summary>
|
||||
Cost = 4,
|
||||
/// <summary>
|
||||
/// Assets and debts - accounts that keep accumulating over years.
|
||||
/// </summary>
|
||||
Balance = 5,
|
||||
/// <summary>
|
||||
/// Incomes and costs - accounts that are zeroed at year end. Sign reversed.
|
||||
/// </summary>
|
||||
Result = 6
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum FinancialDependencyType
|
||||
{
|
||||
/// <summary>
|
||||
/// Unknown dependency
|
||||
/// </summary>
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// An expense claim, filed by an activist or officer
|
||||
/// </summary>
|
||||
ExpenseClaim,
|
||||
/// <summary>
|
||||
/// An invoice, received in the mail
|
||||
/// </summary>
|
||||
InboundInvoice,
|
||||
/// <summary>
|
||||
/// Money leaving the organization, documented after processes
|
||||
/// </summary>
|
||||
Payout,
|
||||
/// <summary>
|
||||
/// Salary paid to somebody employed or otherwise monthly compensated
|
||||
/// </summary>
|
||||
Salary,
|
||||
/// <summary>
|
||||
/// An outbound invoice, requesting money from another organization
|
||||
/// </summary>
|
||||
OutboundInvoice,
|
||||
/// <summary>
|
||||
/// A group of inbound payments
|
||||
/// </summary>
|
||||
PaymentGroup,
|
||||
/// <summary>
|
||||
/// A dependency on (another) financial transaction - used for chaining across fiscal years
|
||||
/// </summary>
|
||||
FinancialTransaction,
|
||||
/// <summary>
|
||||
/// A conference or similar event (called 'parley' in lingo)
|
||||
/// </summary>
|
||||
Parley
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum FinancialValidationType
|
||||
{
|
||||
/// <summary>
|
||||
/// Unknown type.
|
||||
/// </summary>
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// An attestation of an expenditure from a budget.
|
||||
/// </summary>
|
||||
Attestation,
|
||||
/// <summary>
|
||||
/// Removal of attested status.
|
||||
/// </summary>
|
||||
Deattestation,
|
||||
/// <summary>
|
||||
/// Validation of expenditure documents.
|
||||
/// </summary>
|
||||
Validation,
|
||||
/// <summary>
|
||||
/// Devalidation - removal of validated status.
|
||||
/// </summary>
|
||||
Devalidation,
|
||||
/// <summary>
|
||||
/// Kill: close this financial doc as not valid.
|
||||
/// </summary>
|
||||
Kill
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum GeographyLevel
|
||||
{
|
||||
/// <summary>
|
||||
/// Unknown level
|
||||
/// </summary>
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// Municipality or city level
|
||||
/// </summary>
|
||||
Municipality = 1,
|
||||
/// <summary>
|
||||
/// Electoral circuit - usually 5-15 cities
|
||||
/// </summary>
|
||||
ElectoralCircuit = 2,
|
||||
/// <summary>
|
||||
/// County - usually same as electoral circuit
|
||||
/// </summary>
|
||||
County = 3,
|
||||
/// <summary>
|
||||
/// District - 4-7 districts per state
|
||||
/// </summary>
|
||||
District = 4,
|
||||
/// <summary>
|
||||
/// State - not necessary for small countries
|
||||
/// </summary>
|
||||
State = 5
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum InvalidMembershipType
|
||||
{
|
||||
/// <summary>
|
||||
/// This membership was closed normally.
|
||||
/// </summary>
|
||||
Valid = 0,
|
||||
/// <summary>
|
||||
/// This membership was closed because it was a duplicate.
|
||||
/// </summary>
|
||||
DuplicateMember = 1,
|
||||
/// <summary>
|
||||
/// This membership was closed because the personae were bogus (like "Mickey Mouse").
|
||||
/// </summary>
|
||||
PersonDoesNotExist = 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using System.Collections.Generic;
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum MailAuthorType
|
||||
{
|
||||
Unknown = 0,
|
||||
Person = 1,
|
||||
MemberService = 2,
|
||||
PirateWeb = 3,
|
||||
ActivistService = 4,
|
||||
Service = 5,
|
||||
PressService = 6,
|
||||
Accounting = 7
|
||||
}
|
||||
|
||||
public class FunctionalMail
|
||||
{
|
||||
public class AddressItem
|
||||
{
|
||||
public AddressItem (string email, string name)
|
||||
{
|
||||
this.email = email;
|
||||
this.name = name;
|
||||
}
|
||||
private string email;
|
||||
private string name;
|
||||
public string Email
|
||||
{
|
||||
get
|
||||
{
|
||||
return email;
|
||||
}
|
||||
}
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static public Dictionary<MailAuthorType, AddressItem> Address = initList();
|
||||
public static Dictionary<MailAuthorType, AddressItem> initList ()
|
||||
{
|
||||
Dictionary<MailAuthorType, AddressItem> retval = new Dictionary<MailAuthorType, AddressItem>();
|
||||
retval.Add(MailAuthorType.MemberService, new AddressItem("medlemsservice@piratpartiet.se", "Piratpartiet Medlemsservice"));
|
||||
retval.Add(MailAuthorType.PirateWeb, new AddressItem("noreply@pirateweb.net", "PirateWeb"));
|
||||
retval.Add(MailAuthorType.ActivistService, new AddressItem("aktivistservice@piratpartiet.se", "Piratpartiet Aktivistservice"));
|
||||
retval.Add(MailAuthorType.Service, new AddressItem("service@piratpartiet.se", "Piratpartiet Service"));
|
||||
retval.Add(MailAuthorType.PressService, new AddressItem("press@piratpartiet.se", "Piratpartiet Press"));
|
||||
retval.Add(MailAuthorType.Accounting, new AddressItem("accounting@piratpartiet.se", "Piratpartiet Accounting"));
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// For handling of membership fee payment
|
||||
/// Also used for marking of accepted memberships for PPFI
|
||||
/// </summary>
|
||||
public enum MembershipPaymentStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Undefined
|
||||
/// </summary>
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// Newly registered
|
||||
/// </summary>
|
||||
NewlyRegistered = 1,
|
||||
/// <summary>
|
||||
/// Membership accepted, used as bit flag
|
||||
/// </summary>
|
||||
MembershipAccepted = 2,
|
||||
/// <summary>
|
||||
/// Due for payment, to be used if payments are
|
||||
/// </summary>
|
||||
DueForNewPayment = 3,
|
||||
/// <summary>
|
||||
/// Has been listed to receive notice of payment
|
||||
/// to be used if the sending out of payments is a manual process
|
||||
/// just to stop them being listed as Due for payment again
|
||||
/// </summary>
|
||||
ListedForPayment = 4,
|
||||
/// <summary>
|
||||
/// Notice of payment have been sent
|
||||
/// </summary>
|
||||
PaymentRequested = 5,
|
||||
/// <summary>
|
||||
/// Payment have been recieved
|
||||
/// </summary>
|
||||
PaymentRecieved = 6
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
|
||||
public enum ObjectType
|
||||
{
|
||||
Unknown = 0,
|
||||
Person,
|
||||
FinancialAccount,
|
||||
Organization,
|
||||
OutboundInvoice
|
||||
}
|
||||
|
||||
public enum ObjectOptionalDataType
|
||||
{
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// The personal number (or equivalent) of somebody. In SE, this is a ten digit number.
|
||||
/// </summary>
|
||||
PersonalNumber,
|
||||
/// <summary>
|
||||
/// If a particular person is invisible to all officers.
|
||||
/// </summary>
|
||||
Anonymous,
|
||||
/// <summary>
|
||||
/// ?
|
||||
/// </summary>
|
||||
CustomEmail,
|
||||
/// <summary>
|
||||
/// If somebody should never ever be mailed for any reason.
|
||||
/// </summary>
|
||||
NeverMail,
|
||||
/// <summary>
|
||||
/// The account id of the (currently just Swedish) forum.
|
||||
/// </summary>
|
||||
ForumAccountId,
|
||||
/// <summary>
|
||||
/// Name of a bank.
|
||||
/// </summary>
|
||||
BankName,
|
||||
/// <summary>
|
||||
/// Clearing number of a bank, usually four digits.
|
||||
/// </summary>
|
||||
BankClearing,
|
||||
/// <summary>
|
||||
/// Account number of a bank. Does NOT include clearing number.
|
||||
/// </summary>
|
||||
BankAccount,
|
||||
/// <summary>
|
||||
/// The party email account of a person.
|
||||
/// </summary>
|
||||
PartyEmail,
|
||||
/// <summary>
|
||||
/// Whether this entity is unreachable by mail.
|
||||
/// </summary>
|
||||
MailUnreachable,
|
||||
/// <summary>
|
||||
/// Whether this entity wants mail in text-only format.
|
||||
/// </summary>
|
||||
LimitMailToText,
|
||||
/// <summary>
|
||||
/// Whether this entity wants mail in ISO-8859-1 (as opposed to UTF-8).
|
||||
/// </summary>
|
||||
LimitMailToLatin1,
|
||||
/// <summary>
|
||||
/// ?
|
||||
/// </summary>
|
||||
ResetPasswordTicket,
|
||||
/// <summary>
|
||||
/// Not sure how this is used
|
||||
/// </summary>
|
||||
EMailIsInvalid,
|
||||
/// <summary>
|
||||
/// The name of the photographer, if the person has a photo (Document type)
|
||||
/// </summary>
|
||||
PortraitPhotographer,
|
||||
/// <summary>
|
||||
/// A flag that this Person should be manually inspected
|
||||
/// </summary>
|
||||
AccountDetailsSuspect,
|
||||
// ReSharper disable InconsistentNaming
|
||||
/// <summary>
|
||||
/// T-shirt size as indicated by Person
|
||||
/// </summary>
|
||||
TShirtSize,
|
||||
// ReSharper restore InconsistentNaming
|
||||
/// <summary>
|
||||
/// Name of a blog in cleartext
|
||||
/// </summary>
|
||||
BlogName,
|
||||
/// <summary>
|
||||
/// Url of a blog, including preceding http://
|
||||
/// </summary>
|
||||
BlogUrl,
|
||||
/// <summary>
|
||||
/// Public key in PGP Armor format.
|
||||
/// </summary>
|
||||
CryptoPublicKey,
|
||||
/// <summary>
|
||||
/// Secret AND public keypair in PGP Armor format.
|
||||
/// </summary>
|
||||
CryptoSecretKey,
|
||||
/// <summary>
|
||||
/// Revocation certificate for a public key. Do not use until time for revocation.
|
||||
/// </summary>
|
||||
CryptoRevocation,
|
||||
/// <summary>
|
||||
/// Fingerprint of a crypto key, in format "ABCD 0123 4567..."
|
||||
/// </summary>
|
||||
CryptoFingerprint,
|
||||
/// <summary>
|
||||
/// Geography of an account
|
||||
/// </summary>
|
||||
GeographyId,
|
||||
/// <summary>
|
||||
/// Transaction tag for a donation to go to a particular account
|
||||
/// </summary>
|
||||
BankTransactionTag,
|
||||
/// <summary>
|
||||
/// The account name of the (currently just Swedish) forum.
|
||||
/// </summary>
|
||||
ForumAccountName,
|
||||
/// <summary>
|
||||
/// The preferred culture (for translations etc) eg. sv-SE
|
||||
/// </summary>
|
||||
PreferredCulture,
|
||||
/// <summary>
|
||||
/// List of functional mail addresses for organization
|
||||
/// </summary>
|
||||
OrgFunctionalMail,
|
||||
/// <summary>
|
||||
/// A temporary place to store password hash until membership confirmed (for PPFI)
|
||||
/// </summary>
|
||||
PersonTempPasswordStore,
|
||||
/// <summary>
|
||||
/// Flag to indicate if officer notifications are allowed to contain member names (for PPFI)
|
||||
/// </summary>
|
||||
OrgShowNamesInNotifications,
|
||||
/// <summary>
|
||||
/// Flag to indicate if organisation is using PaymentStatus (for PPFI)
|
||||
/// </summary>
|
||||
OrgUsePaymentStatus,
|
||||
/// <summary>
|
||||
/// Organizations: If the org has PW do bookkeeping
|
||||
/// </summary>
|
||||
OrgEconomyEnabled,
|
||||
/// <summary>
|
||||
/// The highest year for which fiscal books are closed, or 0 for never
|
||||
/// </summary>
|
||||
OrgBooksClosedForYear,
|
||||
/// <summary>
|
||||
/// The last year for which fiscal books have been audited, or 0 for never
|
||||
/// </summary>
|
||||
OrgBooksAuditedForYear,
|
||||
/// <summary>
|
||||
/// Bank account for an organization's tax payments
|
||||
/// </summary>
|
||||
OrgTaxAccount,
|
||||
/// <summary>
|
||||
/// OCR sequence on tax payments (to the tax account) for an organization
|
||||
/// </summary>
|
||||
OrgTaxOcr,
|
||||
OrgFinancialMailName,
|
||||
OrgFinancialMailAddress,
|
||||
/// <summary>
|
||||
/// If invoice is credited, this is the credit invoice id (normative)
|
||||
/// </summary>
|
||||
OutboundInvoiceCreditedWithInvoice,
|
||||
/// <summary>
|
||||
/// This is a credit invoice, crediting this other invoice (informative)
|
||||
/// </summary>
|
||||
OutboundInvoiceCreditsInvoice,
|
||||
/// <summary>
|
||||
/// If invoice is to a person id, this is the person id
|
||||
/// </summary>
|
||||
OutboundInvoiceToPersonId
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum PaymentCodeIssueType
|
||||
{
|
||||
Unknown = 0,
|
||||
Phone = 1,
|
||||
Person = 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum Permission
|
||||
{
|
||||
/// <summary>
|
||||
/// Undefined.
|
||||
/// </summary>
|
||||
Undefined = 0,
|
||||
CanSeeSelf,
|
||||
CanSeePeople,
|
||||
CanEditPeople,
|
||||
CanViewMemberships,
|
||||
CanEditMemberships,
|
||||
CanSendLocalMail,
|
||||
CanSetUpAutomail,
|
||||
CanHandlePress,
|
||||
CanSendGlobalMail,
|
||||
CanSeeEconomyDetails,
|
||||
CanSeeBudget,
|
||||
CanDoBudget,
|
||||
CanSeeEconomyTransactions,
|
||||
CanDoEconomyTransactions,
|
||||
CanPayOutMoney,
|
||||
CanListOrg,
|
||||
CanEditOrg,
|
||||
CanSeePoll,
|
||||
CanEditPoll,
|
||||
CanEditGeography,
|
||||
CanValidateActivistEmail,
|
||||
CanEditMemberSubscriptions,
|
||||
CanEditPermissions,
|
||||
CanEditOrganisationalRoles,
|
||||
CanEditSystemRoles,
|
||||
CanEditLocalRoles,
|
||||
CanSeeSysadminMenu,
|
||||
CanSeeNonMembers,
|
||||
CanEditMailTemplates,
|
||||
CanSeeInsensitivePaperLetters,
|
||||
CanSeeSensitivePaperLetters,
|
||||
CanBreachPostalSecretPaperLetters,
|
||||
CanManagePayroll,
|
||||
CanUploadReceivedDocuments,
|
||||
CanEditMailDB,
|
||||
CanValidatePolls,
|
||||
CanSeeExpiredDuringGracePeriod
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum PersonGender
|
||||
{
|
||||
Unknown = 0,
|
||||
Male = 1,
|
||||
Female = 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum PersonOptionalDataKey
|
||||
{
|
||||
Unknown = 0,
|
||||
PersonalNumber = 1,
|
||||
Anonymous = 2,
|
||||
CustomEmail = 3,
|
||||
NeverMail = 4,
|
||||
ForumAccountId = 5,
|
||||
BankName = 6,
|
||||
BankAccount = 7,
|
||||
PartyEmail = 8,
|
||||
MailUnreachable = 9,
|
||||
LimitMailToText = 10,
|
||||
LimitMailToLatin1 = 11,
|
||||
ResetPasswordTicket = 12,
|
||||
EMailIsInvalid = 13,
|
||||
PortraitPhotographer = 14,
|
||||
AccountDetailsSuspect = 15,
|
||||
TShirtSize = 16,
|
||||
BlogName,
|
||||
BlogUrl,
|
||||
CryptoPublic,
|
||||
CryptoSecret,
|
||||
CryptoRevocation,
|
||||
CryptoFingerprint
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum PoliticalAffiliation
|
||||
{
|
||||
Unknown = 0,
|
||||
Pirate = 1,
|
||||
Conservative,
|
||||
Brown,
|
||||
LoyalBlue,
|
||||
LoyalRed,
|
||||
LoyalGreen,
|
||||
IndependentBlue,
|
||||
IndependentRed,
|
||||
IndependentGreen,
|
||||
NotPolitical
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// RoleTypes.
|
||||
/// Important that the number corresponds
|
||||
/// to RoleTypeId in database since roles are stored referencing
|
||||
/// id rather than name.
|
||||
///
|
||||
/// Add new roles at the end, and create corresponding record in db.
|
||||
/// </summary>
|
||||
public enum RoleType
|
||||
{
|
||||
/// <summary>
|
||||
/// Undefined
|
||||
/// </summary>
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// The primary contact for a geographical node in an organization
|
||||
/// </summary>
|
||||
LocalLead = 1,
|
||||
/// <summary>
|
||||
/// The secondary contact for a geographical node in an organization
|
||||
/// </summary>
|
||||
LocalDeputy = 2,
|
||||
/// <summary>
|
||||
/// OBSOLETE - DO NOT USE
|
||||
/// </summary>
|
||||
LocalActive = 3,
|
||||
/// <summary>
|
||||
/// Non-public role - full access to organization's node
|
||||
/// </summary>
|
||||
LocalAdmin = 4,
|
||||
/// <summary>
|
||||
/// Public role - PoC for org and can perform any task on the org in the system
|
||||
/// </summary>
|
||||
OrganizationChairman = 5,
|
||||
/// <summary>
|
||||
/// Treasurers in an org can approve and manage expenses
|
||||
/// </summary>
|
||||
OrganizationTreasurer = 6,
|
||||
/// <summary>
|
||||
/// Public role - for display / PoC purposes only
|
||||
/// </summary>
|
||||
OrganizationBoardMember = 7,
|
||||
/// <summary>
|
||||
/// Public role - for display / PoC purposes only
|
||||
/// </summary>
|
||||
OrganizationSecretary = 8,
|
||||
/// <summary>
|
||||
/// Non-public role for people who do administrative work
|
||||
/// </summary>
|
||||
OrganizationAdmin = 9,
|
||||
/// <summary>
|
||||
/// Non-public role - full access to entire PirateWeb
|
||||
/// </summary>
|
||||
SystemAdmin = 10,
|
||||
/// <summary>
|
||||
/// Non-public role - editor of the geography tree (at a certain geo and below)
|
||||
/// </summary>
|
||||
SystemGeographyEditor = 11,
|
||||
/// <summary>
|
||||
/// Non-public role - a member/nonmember who has full access to the organization
|
||||
/// </summary>
|
||||
OrganizationAuditor = 12,
|
||||
/// <summary>
|
||||
/// A deputy board member of an org
|
||||
/// </summary>
|
||||
OrganizationBoardDeputy = 13,
|
||||
/// <summary>
|
||||
/// First vice chairman
|
||||
/// </summary>
|
||||
OrganizationVice1 = 14,
|
||||
/// <summary>
|
||||
/// Second vice chairman
|
||||
/// </summary>
|
||||
OrganizationVice2 = 15,
|
||||
/// <summary>
|
||||
/// This Role is assigned to Memberservice administrators
|
||||
/// </summary>
|
||||
OrganizationMemberService = 17,
|
||||
/// <summary>
|
||||
/// This Role is assigned to Memberservice administrators, extra permissions
|
||||
/// </summary>
|
||||
OrganizationMemberServiceLead = 18,
|
||||
/// <summary>
|
||||
/// Role assigned to elected representatives, mostly for admin purposes. No intrinsic rights.
|
||||
/// </summary>
|
||||
OrganizationElectedRepresentative = 19,
|
||||
/// <summary>
|
||||
/// A role that everybody has, although it is not set in the database on every person.
|
||||
/// Letters may be sent to people in this role, in which case they are private. No intrinsic rights.
|
||||
/// </summary>
|
||||
PrivateIndividual = 20,
|
||||
/// <summary>
|
||||
/// A person who can upload paper documents, like letters/invoices, but not access members.
|
||||
/// </summary>
|
||||
OrganizationClerk = 21,
|
||||
/// <summary>
|
||||
/// A person who can see and manage all of the economy, but not member registry.
|
||||
/// </summary>
|
||||
OrganizationEconomyAssistant = 22,
|
||||
/// <summary>
|
||||
/// An elected meeting official, to be assigned temporarily during a meeting
|
||||
/// </summary>
|
||||
OrganizationMeetingOfficial = 23,
|
||||
/// <summary>
|
||||
/// The board's secretary. Not the same as the org's secretary.
|
||||
/// </summary>
|
||||
OrganizationBoardSecretary = 24,
|
||||
/// <summary>
|
||||
/// Role for non officers helping with ballot distribution etc
|
||||
/// </summary>
|
||||
LocalElectionSupport = 25
|
||||
}
|
||||
|
||||
|
||||
public enum RoleClass
|
||||
{
|
||||
/// <summary>
|
||||
/// Undefined
|
||||
/// </summary>
|
||||
Undefined = 0,
|
||||
/// <summary>
|
||||
/// System-wide privileges and responsibilities
|
||||
/// </summary>
|
||||
System,
|
||||
/// <summary>
|
||||
/// Roles for an entire organization
|
||||
/// </summary>
|
||||
Organization,
|
||||
/// <summary>
|
||||
/// Roles and responsibilities to a node in an organization
|
||||
/// </summary>
|
||||
Local,
|
||||
/// <summary>
|
||||
/// Roles that are org-agnostic but are tied to a geo node
|
||||
/// </summary>
|
||||
Geographic
|
||||
}
|
||||
|
||||
public class RoleTypes
|
||||
{
|
||||
static public readonly RoleType[] AllLocalRoleTypes = new RoleType[]
|
||||
{ RoleType.LocalLead,
|
||||
RoleType.LocalDeputy,
|
||||
RoleType.LocalActive,
|
||||
RoleType.LocalAdmin,
|
||||
RoleType.LocalElectionSupport };
|
||||
|
||||
static public readonly RoleType[] AllOrganizationalRoleTypes = new RoleType[]
|
||||
{ RoleType.OrganizationChairman,
|
||||
RoleType.OrganizationVice1,
|
||||
RoleType.OrganizationVice2,
|
||||
RoleType.OrganizationTreasurer,
|
||||
RoleType.OrganizationSecretary,
|
||||
RoleType.OrganizationBoardMember,
|
||||
RoleType.OrganizationBoardDeputy,
|
||||
RoleType.OrganizationAdmin,
|
||||
RoleType.OrganizationClerk,
|
||||
RoleType.OrganizationAuditor,
|
||||
RoleType.OrganizationMemberService,
|
||||
RoleType.OrganizationMemberServiceLead,
|
||||
RoleType.OrganizationElectedRepresentative,
|
||||
RoleType.OrganizationEconomyAssistant,
|
||||
RoleType.OrganizationMeetingOfficial,
|
||||
RoleType.OrganizationBoardSecretary };
|
||||
|
||||
static public readonly RoleType[] AllSystemRoleTypes = new RoleType[]
|
||||
{ RoleType.SystemAdmin,
|
||||
RoleType.SystemGeographyEditor };
|
||||
|
||||
static public readonly RoleType[] AllRoleTypes = CreateAllRoleTypes();
|
||||
|
||||
private static RoleType[] CreateAllRoleTypes ()
|
||||
{
|
||||
List<RoleType> retList=new List<RoleType>();
|
||||
retList.AddRange(AllOrganizationalRoleTypes);
|
||||
retList.AddRange(AllSystemRoleTypes);
|
||||
retList.AddRange(AllLocalRoleTypes);
|
||||
foreach(RoleType rt in Enum.GetValues(typeof(RoleType)))
|
||||
{
|
||||
if (!retList.Contains(rt))
|
||||
retList.Add(rt);
|
||||
}
|
||||
|
||||
return retList.ToArray();
|
||||
}
|
||||
|
||||
static public RoleClass ClassOfRole (RoleType r)
|
||||
{
|
||||
if (Array.IndexOf(AllLocalRoleTypes, r) > -1)
|
||||
return RoleClass.Local;
|
||||
if (Array.IndexOf(AllOrganizationalRoleTypes, r) > -1)
|
||||
return RoleClass.Organization;
|
||||
if (Array.IndexOf(AllSystemRoleTypes, r) > -1)
|
||||
return RoleClass.System;
|
||||
return RoleClass.Undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace PirateWeb.Types
|
||||
{
|
||||
public enum EventType
|
||||
{
|
||||
Unknown = 0,
|
||||
AddedRole,
|
||||
DeletedRole,
|
||||
AddedMember,
|
||||
AddedMembership,
|
||||
ExtendedMembership,
|
||||
TerminatedMembership,
|
||||
ReceivedPayment
|
||||
}
|
||||
|
||||
public enum EventSource
|
||||
{
|
||||
Unknown = 0,
|
||||
PirateWeb,
|
||||
PirateBot,
|
||||
WebServices,
|
||||
SignupPage,
|
||||
CustomServiceInterface
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Interfaces
|
||||
{
|
||||
public interface IEmailPerson : IHasIdentity
|
||||
{
|
||||
string Email { get; }
|
||||
string Name { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
using Activizr.Basic.Exceptions;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
|
||||
namespace Activizr.Basic.Interfaces
|
||||
{
|
||||
public interface IHandleProvider
|
||||
{
|
||||
string GetPersonHandle (int personId);
|
||||
void SetPersonHandle (int personId, string newHandle);
|
||||
HandleErrorType CanSetHandle (string newHandle);
|
||||
|
||||
int GetPersonByHandle (string handle);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum HandleErrorType
|
||||
{
|
||||
Unknown = 0,
|
||||
NoError,
|
||||
HandleNotFound,
|
||||
HandleOccupied
|
||||
}
|
||||
}
|
||||
|
||||
namespace Activizr.Basic.Exceptions
|
||||
{
|
||||
public class HandleException : Exception
|
||||
{
|
||||
public HandleException (string attemptedHandle, HandleErrorType errorType)
|
||||
{
|
||||
this.attemptedHandle = attemptedHandle;
|
||||
this.errorType = errorType;
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "HandleException: Handle '" + attemptedHandle + "' caused '" + errorType.ToString() + "'.\r\n" +
|
||||
base.ToString();
|
||||
}
|
||||
|
||||
|
||||
public HandleErrorType ErrorType
|
||||
{
|
||||
get { return errorType; }
|
||||
}
|
||||
|
||||
private readonly string attemptedHandle;
|
||||
private readonly HandleErrorType errorType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Interfaces
|
||||
{
|
||||
public interface IHasIdentities
|
||||
{
|
||||
int[] Identities { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Interfaces
|
||||
{
|
||||
public interface IHasIdentity
|
||||
{
|
||||
int Identity { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// 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 ("PirateWeb Type Library")]
|
||||
[assembly: AssemblyDescription ("")]
|
||||
[assembly: AssemblyConfiguration ("")]
|
||||
[assembly: AssemblyCompany ("")]
|
||||
[assembly: AssemblyProduct ("")]
|
||||
[assembly: AssemblyCopyright ("")]
|
||||
[assembly: AssemblyTrademark ("")]
|
||||
[assembly: AssemblyCulture ("")]
|
||||
|
||||
//
|
||||
// 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 Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion ("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory which is
|
||||
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
|
||||
[assembly: AssemblyDelaySign (false)]
|
||||
[assembly: AssemblyKeyFile ("")]
|
||||
[assembly: AssemblyKeyName ("")]
|
||||
Generated
+26
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3620
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Activizr.Basic.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles />
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic
|
||||
{
|
||||
public class Strings
|
||||
{
|
||||
public static string MailSenderName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (System.IO.Path.DirectorySeparatorChar == '/')
|
||||
{
|
||||
return "PirateWeb";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "PirateWeb-W";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static string MailSenderAddress
|
||||
{
|
||||
get { return "noreply@pirateweb.net"; }
|
||||
}
|
||||
|
||||
public static string MailSenderNameFinancial
|
||||
{
|
||||
get { return "PirateWeb Financials"; }
|
||||
}
|
||||
|
||||
public static string MailSenderNameHumanResources
|
||||
{
|
||||
get { return "PirateWeb Human Resources"; }
|
||||
}
|
||||
|
||||
public static string MailSenderNameServices
|
||||
{
|
||||
get { return "PirateWeb Services"; }
|
||||
}
|
||||
|
||||
public static string InternationalCultureCode
|
||||
{
|
||||
get { return "en-US"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicAddressValidationRun : IHasIdentity
|
||||
{
|
||||
public BasicAddressValidationRun (int validationRunId)
|
||||
{
|
||||
this.validationRunId = validationRunId;
|
||||
}
|
||||
|
||||
private int validationRunId;
|
||||
private bool complete;
|
||||
private int addressCount;
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.validationRunId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicBallot: IHasIdentity
|
||||
{
|
||||
public BasicBallot (int ballotId, int electionId, int organizationId, int geographyId, string name, int count, string deliveryAddress)
|
||||
{
|
||||
this.BallotId = ballotId;
|
||||
this.ElectionId = electionId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.GeographyId = geographyId;
|
||||
this.Name = name;
|
||||
this.Count = count;
|
||||
this.DeliveryAddress = deliveryAddress;
|
||||
}
|
||||
|
||||
public BasicBallot (BasicBallot original)
|
||||
:this (original.BallotId, original.ElectionId, original.OrganizationId, original.GeographyId, original.Name, original.Count, original.DeliveryAddress)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int BallotId { get; private set; }
|
||||
public int ElectionId { get; private set; }
|
||||
public int OrganizationId { get; private set; }
|
||||
public int GeographyId { get; private set; }
|
||||
public string Name { get; private set; }
|
||||
public int Count { get; protected set; }
|
||||
public string DeliveryAddress { get; protected set; }
|
||||
public int Identity
|
||||
{
|
||||
get { return this.BallotId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
|
||||
namespace Activizr.Basic.Enums
|
||||
{
|
||||
public enum ChurnDataType
|
||||
{
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// The member churned (dropped out, left).
|
||||
/// </summary>
|
||||
Churn,
|
||||
/// <summary>
|
||||
/// The member remained in the organization (renewed).
|
||||
/// </summary>
|
||||
Retention
|
||||
}
|
||||
}
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicChurnDataPoint
|
||||
{
|
||||
public BasicChurnDataPoint (ChurnDataType dataType, DateTime decisionDateTime, DateTime expiryDate,
|
||||
int personId, int organizationId)
|
||||
{
|
||||
this.DataType = dataType;
|
||||
this.DecisionDateTime = decisionDateTime;
|
||||
this.ExpiryDate = expiryDate;
|
||||
this.PersonId = personId;
|
||||
this.OrganizationId = organizationId;
|
||||
}
|
||||
|
||||
public BasicChurnDataPoint (BasicChurnDataPoint original) :
|
||||
this(
|
||||
original.DataType, original.DecisionDateTime, original.ExpiryDate, original.PersonId,
|
||||
original.OrganizationId)
|
||||
{
|
||||
}
|
||||
|
||||
public readonly ChurnDataType DataType;
|
||||
public readonly DateTime DecisionDateTime;
|
||||
public readonly DateTime ExpiryDate;
|
||||
public readonly int OrganizationId;
|
||||
public readonly int PersonId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicCity : IHasIdentity
|
||||
{
|
||||
public BasicCity (int cityId, string name, int countryId, int geographyId)
|
||||
{
|
||||
this.cityId = cityId;
|
||||
this.name = name;
|
||||
this.countryId = countryId;
|
||||
this.geographyId = geographyId;
|
||||
}
|
||||
|
||||
public BasicCity (BasicCity original)
|
||||
: this(original.cityId, original.name, original.countryId, original.geographyId)
|
||||
{
|
||||
}
|
||||
|
||||
private int cityId;
|
||||
private string name;
|
||||
private int countryId;
|
||||
private int geographyId;
|
||||
|
||||
public int CityId
|
||||
{
|
||||
get { return this.cityId; }
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return this.name; }
|
||||
}
|
||||
|
||||
public int CountryId
|
||||
{
|
||||
get { return this.countryId; }
|
||||
}
|
||||
|
||||
public int GeographyId
|
||||
{
|
||||
get { return this.geographyId; }
|
||||
}
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.cityId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicCommunicationTurnaround: IHasIdentity
|
||||
{
|
||||
public BasicCommunicationTurnaround(int organizationId, int communicationTypeId, int communicationId, DateTime dateTimeOpened, DateTime dateTimeFirstResponse, int personIdFirstResponse, DateTime dateTimeClosed, int personIdClosed, bool open, bool responded)
|
||||
{
|
||||
this.OrganizationId = organizationId;
|
||||
this.CommunicationTypeId = communicationTypeId;
|
||||
this.CommunicationId = communicationId;
|
||||
this.DateTimeOpened = dateTimeOpened;
|
||||
this.DateTimeFirstResponse = dateTimeFirstResponse;
|
||||
this.PersonIdFirstResponse = personIdFirstResponse;
|
||||
this.DateTimeClosed = dateTimeClosed;
|
||||
this.PersonIdClosed = personIdClosed;
|
||||
this.Open = open;
|
||||
this.Responded = responded;
|
||||
}
|
||||
|
||||
public BasicCommunicationTurnaround (BasicCommunicationTurnaround original):
|
||||
this (original.OrganizationId, original.CommunicationTypeId, original.CommunicationId, original.DateTimeOpened, original.DateTimeFirstResponse, original.PersonIdFirstResponse, original.DateTimeClosed, original.PersonIdClosed, original.Open, original.Responded)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
|
||||
public int OrganizationId { get; private set; }
|
||||
public int CommunicationTypeId { get; private set; }
|
||||
public int CommunicationId { get; private set; }
|
||||
public DateTime DateTimeOpened { get; private set; }
|
||||
public DateTime DateTimeFirstResponse { get; protected set; }
|
||||
public int PersonIdFirstResponse { get; protected set; }
|
||||
public DateTime DateTimeClosed { get; protected set; }
|
||||
public int PersonIdClosed { get; protected set; }
|
||||
public bool Open { get; protected set; }
|
||||
public bool Responded { get; protected set; }
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.CommunicationId; } // ok, this isn't great, but wtf
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
[Serializable]
|
||||
public class BasicCountry : IHasIdentity
|
||||
{
|
||||
public BasicCountry (int countryId, string name, string code)
|
||||
{
|
||||
this.countryId = countryId;
|
||||
this.name = name;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public BasicCountry (int countryId, string name, string code, string defaultCulture)
|
||||
: this(countryId, name, code)
|
||||
{
|
||||
this.culture = defaultCulture;
|
||||
}
|
||||
|
||||
public BasicCountry (int countryId, string name, string code, string defaultCulture, int geoId)
|
||||
: this(countryId, name, code, defaultCulture)
|
||||
{
|
||||
this.geographyId = geoId;
|
||||
}
|
||||
|
||||
public BasicCountry (BasicCountry original)
|
||||
: this(original.CountryId, original.Name, original.Code, original.Culture, original.GeographyId )
|
||||
{
|
||||
}
|
||||
|
||||
public int CountryId
|
||||
{
|
||||
get { return countryId; }
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return this.name; }
|
||||
}
|
||||
|
||||
public string Code
|
||||
{
|
||||
get { return this.code; }
|
||||
}
|
||||
|
||||
public string Culture
|
||||
{
|
||||
get { return this.culture; }
|
||||
}
|
||||
|
||||
public int GeographyId
|
||||
{
|
||||
get { return this.geographyId; }
|
||||
}
|
||||
|
||||
|
||||
public int PostalCodeLength
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.Identity == 5)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
else if (this.Identity == 1)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private int countryId;
|
||||
private string name;
|
||||
private string code;
|
||||
private string culture;
|
||||
private int geographyId;
|
||||
|
||||
public int CurrencyId
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.Code == "SE")
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
throw new NotImplementedException("BasicCountry.CurrencyId");
|
||||
}
|
||||
}
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.CountryId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicCurrency: IHasIdentity
|
||||
{
|
||||
public BasicCurrency (int currencyId, string code, string description, string sign)
|
||||
{
|
||||
this.CurrencyId = currencyId;
|
||||
this.Code = code;
|
||||
this.Description = description;
|
||||
this.Sign = sign;
|
||||
}
|
||||
|
||||
public BasicCurrency (BasicCurrency original)
|
||||
: this (original.CurrencyId, original.Code, original.Description, original.Sign)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
|
||||
public int CurrencyId { get; private set; }
|
||||
public string Code { get; private set; }
|
||||
public string Description { get; private set; }
|
||||
public string Sign { get; private set; }
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.CurrencyId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicDocument: IHasIdentity
|
||||
{
|
||||
public BasicDocument (int documentId, string serverFileName, string clientFileName, string description,
|
||||
DocumentType documentType, int foreignId, Int64 fileSize, int uploadedByPersonId, DateTime uploadedDateTime)
|
||||
{
|
||||
this.documentId = documentId;
|
||||
this.serverFileName = serverFileName;
|
||||
this.clientFileName = clientFileName;
|
||||
this.description = description;
|
||||
this.documentType = documentType;
|
||||
this.foreignId = foreignId;
|
||||
this.fileSize = fileSize;
|
||||
this.uploadedByPersonId = uploadedByPersonId;
|
||||
this.uploadedDateTime = uploadedDateTime;
|
||||
}
|
||||
|
||||
public BasicDocument (BasicDocument original):
|
||||
this (original.documentId, original.serverFileName, original.clientFileName, original.description,
|
||||
original.documentType, original.foreignId, original.fileSize, original.uploadedByPersonId, original.uploadedDateTime)
|
||||
{
|
||||
// empty ctor apart from calling the other one
|
||||
}
|
||||
|
||||
public int DocumentId
|
||||
{
|
||||
get { return this.documentId; }
|
||||
}
|
||||
|
||||
public string ServerFileName
|
||||
{
|
||||
get { return this.serverFileName; }
|
||||
protected set { this.serverFileName = value; }
|
||||
}
|
||||
|
||||
public string ClientFileName
|
||||
{
|
||||
get { return this.clientFileName; }
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get { return this.description; }
|
||||
protected set { this.description = value; }
|
||||
}
|
||||
|
||||
public DocumentType DocumentType
|
||||
{
|
||||
get { return this.documentType; }
|
||||
}
|
||||
|
||||
public int ForeignId
|
||||
{
|
||||
get { return this.foreignId; }
|
||||
}
|
||||
|
||||
public Int64 FileSize
|
||||
{
|
||||
get { return this.fileSize; }
|
||||
}
|
||||
|
||||
public int UploadedByPersonId
|
||||
{
|
||||
get { return this.uploadedByPersonId; }
|
||||
}
|
||||
|
||||
public DateTime UploadedDateTime
|
||||
{
|
||||
get { return this.uploadedDateTime; }
|
||||
}
|
||||
|
||||
private int documentId;
|
||||
private string serverFileName;
|
||||
private string clientFileName;
|
||||
private string description;
|
||||
private DocumentType documentType;
|
||||
private int foreignId;
|
||||
private Int64 fileSize;
|
||||
private int uploadedByPersonId;
|
||||
private DateTime uploadedDateTime;
|
||||
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.DocumentId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicElection: IHasIdentity
|
||||
{
|
||||
public BasicElection (int electionId, string name, int geographyId, DateTime date)
|
||||
{
|
||||
this.ElectionId = electionId;
|
||||
this.Name = name;
|
||||
this.GeographyId = geographyId;
|
||||
this.Date = date;
|
||||
}
|
||||
|
||||
public BasicElection (BasicElection original):
|
||||
this (original.ElectionId, original.Name, original.GeographyId, original.Date)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int ElectionId { get; private set; }
|
||||
public string Name { get; private set; }
|
||||
public int GeographyId { get; private set; }
|
||||
public DateTime Date { get; private set; }
|
||||
public int Identity
|
||||
{
|
||||
get { return this.ElectionId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicExceptionLog
|
||||
{
|
||||
public BasicExceptionLog (int ExceptionId,DateTime ExceptionDateTime, string Source, string ExceptionText)
|
||||
{
|
||||
this.ExceptionId = ExceptionId;
|
||||
this.ExceptionDateTime = ExceptionDateTime;
|
||||
this.Source = Source;
|
||||
this.ExceptionText = ExceptionText;
|
||||
}
|
||||
|
||||
public BasicExceptionLog (BasicExceptionLog original):
|
||||
this(original.ExceptionId, original.ExceptionDateTime, original.Source, original.ExceptionText)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int ExceptionId { get; private set; }
|
||||
public DateTime ExceptionDateTime { get; private set; }
|
||||
public string Source { get; private set; }
|
||||
public string ExceptionText { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
using Activizr.Basic.Enums;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicExpenseClaim : IHasIdentity
|
||||
{
|
||||
/// <summary>
|
||||
/// Normal constructor
|
||||
/// </summary>
|
||||
public BasicExpenseClaim (int expenseClaimId, int claimingPersonId, DateTime createdDateTime,
|
||||
bool open, bool attested, bool documented, bool claimed, int organizationId,
|
||||
int geographyId, int budgetId, DateTime expenseDate,
|
||||
string description, double preApprovedAmount, Int64 amountCents, bool repaid, bool keepSeparate)
|
||||
{
|
||||
this.ExpenseClaimId = expenseClaimId;
|
||||
this.ClaimingPersonId = claimingPersonId;
|
||||
this.CreatedDateTime = createdDateTime;
|
||||
this.Open = open;
|
||||
this.Attested = attested;
|
||||
this.Validated = documented;
|
||||
this.Claimed = claimed;
|
||||
this.OrganizationId = organizationId;
|
||||
this.GeographyId = geographyId;
|
||||
this.BudgetId = budgetId;
|
||||
this.ExpenseDate = expenseDate;
|
||||
this.Description = description;
|
||||
this.PreApprovedAmount = preApprovedAmount;
|
||||
this.AmountCents = amountCents;
|
||||
this.Repaid = repaid;
|
||||
this.KeepSeparate = keepSeparate;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copy constructor
|
||||
/// </summary>
|
||||
public BasicExpenseClaim (BasicExpenseClaim original)
|
||||
: this(original.Identity, original.ClaimingPersonId, original.CreatedDateTime,
|
||||
original.Open, original.Attested, original.Validated, original.Claimed,
|
||||
original.OrganizationId, original.GeographyId, original.BudgetId,
|
||||
original.ExpenseDate, original.Description,
|
||||
original.PreApprovedAmount, original.AmountCents, original.Repaid, original.KeepSeparate)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public int ExpenseClaimId { get; private set; }
|
||||
public DateTime ExpenseDate { get; protected set; }
|
||||
public string Description { get; protected set; }
|
||||
public Int64 AmountCents { get; protected set; }
|
||||
public double PreApprovedAmount { get; private set; }
|
||||
public int ClaimingPersonId { get; private set; }
|
||||
public int BudgetId { get; protected set; }
|
||||
public DateTime CreatedDateTime { get; private set; }
|
||||
public bool Validated { get; protected set; }
|
||||
public bool Open { get; protected set; }
|
||||
public bool Attested { get; protected set; }
|
||||
public bool Repaid { get; protected set; }
|
||||
public bool KeepSeparate { get; protected set; }
|
||||
public bool Claimed { get; protected set; }
|
||||
|
||||
|
||||
// The fields below are not just encapsulated yet
|
||||
|
||||
public readonly int OrganizationId;
|
||||
public readonly int GeographyId;
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.ExpenseClaimId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicExternalActivity: IHasIdentity
|
||||
{
|
||||
public BasicExternalActivity (int externalActivityId, int organizationId, int geographyId, ExternalActivityType type, DateTime dateTime, string description, int createdByPersonId, DateTime createdDateTime,
|
||||
int dupeOfActivityId)
|
||||
{
|
||||
this.ExternalActivityId = externalActivityId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.GeographyId = geographyId;
|
||||
this.Type = type;
|
||||
this.DateTime = dateTime;
|
||||
this.Description = description;
|
||||
this.CreatedByPersonId = createdByPersonId;
|
||||
this.CreatedDateTime = createdDateTime;
|
||||
this.DupeOfActivityId = dupeOfActivityId;
|
||||
}
|
||||
|
||||
public BasicExternalActivity (BasicExternalActivity original):
|
||||
this (original.ExternalActivityId, original.OrganizationId, original.GeographyId, original.Type, original.DateTime, original.Description, original.CreatedByPersonId, original.CreatedDateTime, original.DupeOfActivityId)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int ExternalActivityId { get; private set; }
|
||||
public int OrganizationId { get; private set; }
|
||||
public int GeographyId { get; private set; }
|
||||
public ExternalActivityType Type { get; private set; }
|
||||
public DateTime DateTime { get; private set; }
|
||||
public string Description { get; private set; }
|
||||
public int CreatedByPersonId { get; private set; }
|
||||
public DateTime CreatedDateTime { get; private set; }
|
||||
public int DupeOfActivityId { get; protected set; }
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.ExternalActivityId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicExternalCredential : IHasIdentity
|
||||
{
|
||||
public BasicExternalCredential (int externalCredentialId, string serviceName, string login, string password)
|
||||
{
|
||||
this.ExternalCredentialId = externalCredentialId;
|
||||
this.ServiceName = serviceName;
|
||||
this.Login = login;
|
||||
this.Password = password;
|
||||
}
|
||||
|
||||
public readonly int ExternalCredentialId;
|
||||
public readonly string ServiceName;
|
||||
public readonly string Login;
|
||||
public readonly string Password;
|
||||
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.ExternalCredentialId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicExternalIdentity : IHasIdentity
|
||||
{
|
||||
|
||||
public BasicExternalIdentity ( int ExternalIdentityIdentity,
|
||||
ExternalIdentityType TypeOfAccount,
|
||||
string ExternalSystem,
|
||||
string UserID,
|
||||
string Password,
|
||||
int AttachedToPersonID)
|
||||
{
|
||||
this.externalIdentityIdentity = ExternalIdentityIdentity;
|
||||
this.externalSystem = ExternalSystem;
|
||||
this.userID = UserID;
|
||||
this.password = Password;
|
||||
this.attachedToPersonID = AttachedToPersonID;
|
||||
this.typeOfAccount = TypeOfAccount;
|
||||
}
|
||||
|
||||
public BasicExternalIdentity (BasicExternalIdentity original)
|
||||
: this(original.Identity, original.TypeOfAccount, original.ExternalSystem, original.UserID, original.Password, original.AttachedToPersonID)
|
||||
{
|
||||
}
|
||||
|
||||
private int externalIdentityIdentity;
|
||||
|
||||
private string externalSystem;
|
||||
private string userID;
|
||||
private string password;
|
||||
private int attachedToPersonID;
|
||||
private ExternalIdentityType typeOfAccount;
|
||||
|
||||
public int ExternalIdentityIdentity
|
||||
{
|
||||
get { return externalIdentityIdentity; }
|
||||
}
|
||||
|
||||
public string ExternalSystem
|
||||
{
|
||||
get
|
||||
{
|
||||
return externalSystem;
|
||||
}
|
||||
}
|
||||
public string UserID
|
||||
{
|
||||
get
|
||||
{
|
||||
return userID;
|
||||
}
|
||||
}
|
||||
public string Password
|
||||
{
|
||||
get
|
||||
{
|
||||
return password;
|
||||
}
|
||||
}
|
||||
public int AttachedToPersonID
|
||||
{
|
||||
get
|
||||
{
|
||||
return attachedToPersonID;
|
||||
}
|
||||
}
|
||||
public ExternalIdentityType TypeOfAccount
|
||||
{
|
||||
get
|
||||
{
|
||||
return typeOfAccount;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return ExternalIdentityIdentity; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicFinancialAccount : IHasIdentity
|
||||
{
|
||||
public BasicFinancialAccount (int financialAccountId, string name, FinancialAccountType accountType,
|
||||
int organizationId, int parentFinancialAccountId, int ownerPersonId)
|
||||
{
|
||||
this.financialAccountId = financialAccountId;
|
||||
this.name = name;
|
||||
this.accountType = accountType;
|
||||
this.organizationId = organizationId;
|
||||
this.ownerPersonId = ownerPersonId;
|
||||
this.parentFinancialAccountId = parentFinancialAccountId;
|
||||
}
|
||||
|
||||
public BasicFinancialAccount (BasicFinancialAccount original) :
|
||||
this(original.Identity, original.name, original.accountType, original.organizationId, original.parentFinancialAccountId, original.ownerPersonId)
|
||||
{
|
||||
// Empty copy constructor
|
||||
}
|
||||
|
||||
|
||||
private int financialAccountId;
|
||||
private string name;
|
||||
private int organizationId;
|
||||
private FinancialAccountType accountType;
|
||||
private int ownerPersonId;
|
||||
private int parentFinancialAccountId;
|
||||
|
||||
public int FinancialAccountId
|
||||
{
|
||||
get { return this.financialAccountId; }
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return this.name; }
|
||||
}
|
||||
|
||||
public int OrganizationId
|
||||
{
|
||||
get { return this.organizationId; }
|
||||
}
|
||||
|
||||
public FinancialAccountType AccountType
|
||||
{
|
||||
get { return this.accountType; }
|
||||
}
|
||||
|
||||
public int OwnerPersonId
|
||||
{
|
||||
get { return this.ownerPersonId; }
|
||||
}
|
||||
|
||||
public int ParentFinancialAccountId
|
||||
{
|
||||
get { return this.parentFinancialAccountId; }
|
||||
}
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.financialAccountId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicFinancialAccountRow
|
||||
{
|
||||
public BasicFinancialAccountRow (int financialAccountId, int financialTransactionId, DateTime dateTime,
|
||||
string comment, Int64 amountCents, DateTime rowDateTime, int rowCreatedByPersonId)
|
||||
{
|
||||
this.FinancialAccountId = financialAccountId;
|
||||
this.FinancialTransactionId = financialTransactionId;
|
||||
this.TransactionDateTime = dateTime;
|
||||
this.Description = comment;
|
||||
this.AmountCents = amountCents;
|
||||
this.RowDateTime = rowDateTime;
|
||||
this.RowCreatedByPersonId = rowCreatedByPersonId;
|
||||
}
|
||||
|
||||
public BasicFinancialAccountRow (BasicFinancialAccountRow original)
|
||||
: this(
|
||||
original.FinancialAccountId, original.FinancialTransactionId, original.TransactionDateTime, original.Description,
|
||||
original.AmountCents, original.RowDateTime, original.RowCreatedByPersonId)
|
||||
{
|
||||
}
|
||||
|
||||
public int FinancialAccountId { get; private set; }
|
||||
public int FinancialTransactionId { get; private set; }
|
||||
public DateTime TransactionDateTime { get; private set; }
|
||||
public string Description { get; private set; }
|
||||
public Int64 AmountCents { get; private set; }
|
||||
public DateTime RowDateTime { get; private set; }
|
||||
public int RowCreatedByPersonId { get; private set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
/// <summary>
|
||||
/// This class encapsulates what a financial transaction was constructed from.
|
||||
/// </summary>
|
||||
public class BasicFinancialDependency
|
||||
{
|
||||
public BasicFinancialDependency (int objectId, FinancialDependencyType dependencyType, int foreignId)
|
||||
{
|
||||
this.ObjectId = objectId;
|
||||
this.DependencyType = dependencyType;
|
||||
this.ForeignId = foreignId;
|
||||
}
|
||||
|
||||
public int ObjectId { get; private set; }
|
||||
public FinancialDependencyType DependencyType { get; private set; }
|
||||
public int ForeignId { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicFinancialTransaction : IHasIdentity
|
||||
{
|
||||
public BasicFinancialTransaction (int financialTransactionId, int organizationId, DateTime dateTime,
|
||||
string description, string importHash)
|
||||
{
|
||||
this.financialTransactionId = financialTransactionId;
|
||||
this.organizationId = organizationId;
|
||||
this.dateTime = dateTime;
|
||||
this.description = description;
|
||||
this.importHash = importHash;
|
||||
}
|
||||
|
||||
public BasicFinancialTransaction (BasicFinancialTransaction original) :
|
||||
this(
|
||||
original.financialTransactionId, original.organizationId, original.dateTime, original.description,
|
||||
original.importHash)
|
||||
{
|
||||
}
|
||||
|
||||
private int organizationId;
|
||||
private int financialTransactionId;
|
||||
private DateTime dateTime;
|
||||
private string description;
|
||||
private string importHash;
|
||||
|
||||
public int OrganizationId
|
||||
{
|
||||
get { return this.organizationId; }
|
||||
}
|
||||
|
||||
public int FinancialTransactionId
|
||||
{
|
||||
get { return this.financialTransactionId; }
|
||||
}
|
||||
|
||||
public DateTime DateTime
|
||||
{
|
||||
get { return this.dateTime; }
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get { return this.description; }
|
||||
protected set { this.description = value; }
|
||||
}
|
||||
|
||||
public string ImportHash
|
||||
{
|
||||
get { return this.importHash; }
|
||||
}
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.financialTransactionId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicFinancialTransactionRow : IHasIdentity
|
||||
{
|
||||
public BasicFinancialTransactionRow (int financialTransactionRowId, int financialAccountId,
|
||||
int financialTransactionId, Int64 amountCents, DateTime createdDateTime, int createdByPersonId)
|
||||
{
|
||||
this.FinancialTransactionRowId = financialTransactionRowId;
|
||||
this.FinancialAccountId = financialAccountId;
|
||||
this.FinancialTransactionId = financialTransactionId;
|
||||
this.AmountCents = amountCents;
|
||||
this.CreatedDateTime = createdDateTime;
|
||||
this.CreatedByPersonId = createdByPersonId;
|
||||
}
|
||||
|
||||
public BasicFinancialTransactionRow (BasicFinancialTransactionRow original)
|
||||
: this(
|
||||
original.FinancialTransactionRowId, original.FinancialAccountId, original.FinancialTransactionId,
|
||||
original.AmountCents, original.CreatedDateTime, original.CreatedByPersonId)
|
||||
{
|
||||
}
|
||||
|
||||
public int FinancialAccountId { get; private set; }
|
||||
public int FinancialTransactionId { get; private set; }
|
||||
public int FinancialTransactionRowId { get; private set;}
|
||||
public Int64 AmountCents { get; private set; }
|
||||
public DateTime CreatedDateTime { get; private set; }
|
||||
public int CreatedByPersonId { get; private set; }
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.FinancialTransactionRowId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicFinancialValidation: IHasIdentity
|
||||
{
|
||||
public BasicFinancialValidation (int financialValidationId, FinancialValidationType validationType, int personId, DateTime dateTime, FinancialDependencyType dependencyType, int foreignId)
|
||||
{
|
||||
this.FinancialValidationId = financialValidationId;
|
||||
this.ValidationType = validationType;
|
||||
this.PersonId = personId;
|
||||
this.DateTime = dateTime;
|
||||
this.DependencyType = dependencyType;
|
||||
this.ForeignId = foreignId;
|
||||
}
|
||||
|
||||
public BasicFinancialValidation (BasicFinancialValidation original)
|
||||
:this (original.Identity, original.ValidationType, original.PersonId, original.DateTime, original.DependencyType, original.ForeignId)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int FinancialValidationId { get; private set; }
|
||||
public FinancialValidationType ValidationType { get; private set; }
|
||||
public int PersonId { get; private set; }
|
||||
public DateTime DateTime { get; private set; }
|
||||
public FinancialDependencyType DependencyType { get; private set; }
|
||||
public int ForeignId { get; private set; }
|
||||
public int Identity
|
||||
{
|
||||
get { return this.FinancialValidationId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
/// <summary>
|
||||
/// A geographical node.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class BasicGeography : IHasIdentity
|
||||
{
|
||||
public BasicGeography (int geographyId, int parentGeographyId, string name)
|
||||
: this(geographyId, parentGeographyId, name, 0)
|
||||
{
|
||||
}
|
||||
|
||||
public BasicGeography (int geographyId, int parentGeographyId, string name, int generation)
|
||||
{
|
||||
this.GeographyId = geographyId;
|
||||
this.ParentGeographyId = parentGeographyId;
|
||||
this.Name = name;
|
||||
this.Generation = generation;
|
||||
}
|
||||
|
||||
public BasicGeography (BasicGeography original)
|
||||
: this(original.GeographyId, original.ParentGeographyId, original.Name, original.Generation)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The database node id.
|
||||
/// </summary>
|
||||
public readonly int GeographyId;
|
||||
|
||||
/// <summary>
|
||||
/// The database node id of the parent node.
|
||||
/// </summary>
|
||||
public readonly int ParentGeographyId;
|
||||
|
||||
/// <summary>
|
||||
/// The friendly name of the node (city, county, region, etc).
|
||||
/// </summary>
|
||||
public readonly string Name;
|
||||
|
||||
/// <summary>
|
||||
/// The generation of this node. Used in tree-style listings.
|
||||
/// </summary>
|
||||
public readonly int Generation;
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.GeographyId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicGeographyDesignation
|
||||
{
|
||||
public BasicGeographyDesignation (int geographyId, int countryId,
|
||||
string designation, GeographyLevel geoLevelId)
|
||||
{
|
||||
this.GeographyId = geographyId;
|
||||
this.CountryId = countryId;
|
||||
this.Designation = designation;
|
||||
this.GeographyLevel = geoLevelId;
|
||||
}
|
||||
|
||||
public BasicGeographyDesignation (BasicGeographyDesignation original) :
|
||||
this(original.GeographyId, original.CountryId, original.Designation, original.GeographyLevel)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int GeographyId { get; private set; }
|
||||
public int CountryId { get; private set; }
|
||||
public string Designation { get; private set; }
|
||||
public GeographyLevel GeographyLevel { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicInboundInvoice: IHasIdentity
|
||||
{
|
||||
public BasicInboundInvoice (int inboundInvoiceId, int organizationId, DateTime createdDateTime,
|
||||
DateTime dueDate, Int64 amountCents, int budgetId, string supplier, string
|
||||
payToAccount, string ocr, string invoiceReference, bool attested, bool open,
|
||||
DateTime closedDateTime, int closedByPersonId)
|
||||
{
|
||||
this.InboundInvoiceId = inboundInvoiceId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.CreatedDateTime = createdDateTime;
|
||||
this.DueDate = dueDate;
|
||||
this.AmountCents = amountCents;
|
||||
this.BudgetId = budgetId;
|
||||
this.Supplier = supplier;
|
||||
this.PayToAccount = payToAccount;
|
||||
this.Ocr = ocr;
|
||||
this.InvoiceReference = invoiceReference;
|
||||
this.Attested = attested;
|
||||
this.Open = open;
|
||||
this.ClosedDateTime = closedDateTime;
|
||||
this.ClosedByPersonId = closedByPersonId;
|
||||
}
|
||||
|
||||
public BasicInboundInvoice (BasicInboundInvoice original)
|
||||
: this (original.InboundInvoiceId, original.OrganizationId, original.CreatedDateTime,
|
||||
original.DueDate, original.AmountCents, original.BudgetId,
|
||||
original.Supplier, original.PayToAccount, original.Ocr, original.InvoiceReference,
|
||||
original.Attested, original.Open, original.ClosedDateTime, original.ClosedByPersonId)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int InboundInvoiceId { get; private set; }
|
||||
public DateTime CreatedDateTime { get; private set; }
|
||||
public DateTime DueDate { get; protected set; }
|
||||
public int BudgetId { get; protected set; }
|
||||
public bool Attested { get; protected set; }
|
||||
public bool Open { get; protected set; }
|
||||
public string PayToAccount { get; protected set; }
|
||||
public string Ocr { get; protected set; }
|
||||
public string InvoiceReference { get; protected set; }
|
||||
public DateTime ClosedDateTime { get; protected set; }
|
||||
public int ClosedByPersonId { get; protected set; }
|
||||
public int OrganizationId { get; protected set; }
|
||||
public string Supplier { get; protected set; }
|
||||
public Int64 AmountCents { get; protected set; }
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.InboundInvoiceId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicInternalPoll: IHasIdentity
|
||||
{
|
||||
public BasicInternalPoll (int internalPollId, int createdByPersonId, int organizationId, int geographyId, string name, bool runningOpen, bool votingOpen, int maxVoteLength, DateTime runningOpens, DateTime runningCloses, DateTime votingOpens, DateTime votingCloses, InternalPollResultsType resultsType)
|
||||
{
|
||||
this.InternalPollId = internalPollId;
|
||||
this.CreatedByPersonId = createdByPersonId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.GeographyId = geographyId;
|
||||
this.Name = name;
|
||||
this.RunningOpen = runningOpen;
|
||||
this.VotingOpen = votingOpen;
|
||||
this.MaxVoteLength = maxVoteLength;
|
||||
this.RunningOpens = runningOpens;
|
||||
this.RunningCloses = runningCloses;
|
||||
this.VotingOpens = votingOpens;
|
||||
this.VotingCloses = votingCloses;
|
||||
this.ResultsType = resultsType;
|
||||
}
|
||||
|
||||
public BasicInternalPoll(BasicInternalPoll original)
|
||||
: this(original.InternalPollId, original.CreatedByPersonId, original.OrganizationId, original.GeographyId, original.Name, original.RunningOpen,
|
||||
original.VotingOpen, original.MaxVoteLength, original.RunningOpens, original.RunningCloses, original.VotingOpens, original.VotingCloses, original.ResultsType)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int MaxVoteLength { get; private set; }
|
||||
public int CreatedByPersonId { get; private set; }
|
||||
public int InternalPollId { get; private set; }
|
||||
public int OrganizationId { get; private set; }
|
||||
public int GeographyId { get; private set; }
|
||||
public string Name { get; protected set; }
|
||||
public bool RunningOpen { get; protected set; }
|
||||
public bool VotingOpen { get; protected set; }
|
||||
public DateTime RunningOpens { get; protected set; }
|
||||
public DateTime RunningCloses { get; protected set; }
|
||||
public DateTime VotingOpens { get; protected set; }
|
||||
public DateTime VotingCloses { get; protected set; }
|
||||
public InternalPollResultsType ResultsType { get; protected set; }
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.InternalPollId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
public enum InternalPollResultsType
|
||||
{
|
||||
Unknown,
|
||||
/// <summary>
|
||||
/// Primaries vote -- a Condorcet Schultze divided into six lists and some other twists
|
||||
/// </summary>
|
||||
Primaries,
|
||||
/// <summary>
|
||||
/// A straight Condorcet Schultze, ranking the candidates
|
||||
/// </summary>
|
||||
Schulze,
|
||||
/// <summary>
|
||||
/// Accept vote: Count the number of accepts for each candidate
|
||||
/// </summary>
|
||||
Accept
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicInternalPollCandidate: IHasIdentity
|
||||
{
|
||||
public BasicInternalPollCandidate (int internalPollCandidateId, int internalPollId, int personId, string candidacyStatement)
|
||||
{
|
||||
this.InternalPollCandidateId = internalPollCandidateId;
|
||||
this.InternalPollId = internalPollId;
|
||||
this.PersonId = personId;
|
||||
this.CandidacyStatement = candidacyStatement;
|
||||
}
|
||||
|
||||
public BasicInternalPollCandidate (BasicInternalPollCandidate original)
|
||||
: this (original.InternalPollCandidateId, original.InternalPollId, original.PersonId, original.CandidacyStatement)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int InternalPollCandidateId { get; private set; }
|
||||
public int InternalPollId { get; private set; }
|
||||
public int PersonId { get; private set; }
|
||||
public string CandidacyStatement { get; protected set; }
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.InternalPollCandidateId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicInternalPollVote: IHasIdentity
|
||||
{
|
||||
public BasicInternalPollVote (int internalPollVoteId, int internalPollId, string verificationCode)
|
||||
{
|
||||
this.InternalPollVoteId = internalPollVoteId;
|
||||
this.InternalPollId = internalPollId;
|
||||
this.VerificationCode = verificationCode;
|
||||
}
|
||||
|
||||
public BasicInternalPollVote (BasicInternalPollVote original)
|
||||
: this (original.InternalPollVoteId, original.InternalPollId, original.VerificationCode)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int InternalPollVoteId { get; private set; }
|
||||
public int InternalPollId { get; private set; }
|
||||
public string VerificationCode { get; private set; }
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.InternalPollVoteId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicInternalPollVoteDetail
|
||||
{
|
||||
public BasicInternalPollVoteDetail (int internalPollVoteId, int internalPollCandidateId, int position)
|
||||
{
|
||||
this.InternalPollVoteId = internalPollVoteId;
|
||||
this.InternalPollCandidateId = internalPollCandidateId;
|
||||
this.Position = position;
|
||||
}
|
||||
|
||||
public BasicInternalPollVoteDetail (BasicInternalPollVoteDetail original)
|
||||
: this (original.InternalPollVoteId, original.InternalPollCandidateId, original.Position)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int InternalPollVoteId { get; private set; }
|
||||
public int InternalPollCandidateId { get; private set; }
|
||||
public int Position { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicInternalPollVoter
|
||||
{
|
||||
public BasicInternalPollVoter (int personId, int internalPollId, bool open, DateTime closedDateTime)
|
||||
{
|
||||
this.PersonId = personId;
|
||||
this.InternalPollId = internalPollId;
|
||||
this.Open = open;
|
||||
this.ClosedDateTime = closedDateTime;
|
||||
}
|
||||
|
||||
public BasicInternalPollVoter (BasicInternalPollVoter original)
|
||||
: this (original.PersonId, original.InternalPollId, original.Open, original.ClosedDateTime)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int PersonId { get; private set; }
|
||||
public int InternalPollId { get; private set; }
|
||||
public bool Open { get; private set; }
|
||||
public DateTime ClosedDateTime { get; private set; }
|
||||
}
|
||||
|
||||
|
||||
public enum InternalPollVoterStatus
|
||||
{
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// This voter is eligible and has not yet voted in this poll.
|
||||
/// </summary>
|
||||
CanVote,
|
||||
/// <summary>
|
||||
/// This voter is eligible to vote, but has already voted.
|
||||
/// </summary>
|
||||
HasAlreadyVoted,
|
||||
/// <summary>
|
||||
/// This person does is not on the list of eligible voters.
|
||||
/// </summary>
|
||||
NotEligibleForPoll
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
using Activizr.Basic.Enums;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicMailTemplate : IHasIdentity
|
||||
{
|
||||
/// <summary>
|
||||
/// Basic constructor.
|
||||
/// </summary>
|
||||
public BasicMailTemplate (int templateId,
|
||||
string templateName,
|
||||
string languageCode,
|
||||
string countryCode,
|
||||
int organizationId,
|
||||
string templateBody)
|
||||
{
|
||||
this.templateId = templateId;
|
||||
this.templateName = templateName;
|
||||
this.languageCode = languageCode;
|
||||
this.countryCode = countryCode;
|
||||
this.organizationId = organizationId;
|
||||
this.templateBody = templateBody;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Copy constructor.
|
||||
/// </summary>
|
||||
public BasicMailTemplate (BasicMailTemplate original)
|
||||
: this(original.templateId,
|
||||
original.templateName,
|
||||
original.languageCode,
|
||||
original.countryCode,
|
||||
original.organizationId,
|
||||
original.templateBody)
|
||||
{
|
||||
}
|
||||
|
||||
public int TemplateId
|
||||
{
|
||||
get { return this.templateId; }
|
||||
}
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.templateId; }
|
||||
}
|
||||
|
||||
|
||||
public string TemplateName
|
||||
{
|
||||
get
|
||||
{
|
||||
return templateName;
|
||||
}
|
||||
}
|
||||
public string LanguageCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return languageCode;
|
||||
}
|
||||
}
|
||||
public string CountryCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return countryCode;
|
||||
}
|
||||
}
|
||||
public int OrganizationId
|
||||
{
|
||||
get { return this.organizationId; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public string TemplateBody
|
||||
{
|
||||
get { return this.templateBody; }
|
||||
set { this.templateBody = value; }
|
||||
}
|
||||
|
||||
private int templateId;
|
||||
private string templateName;
|
||||
private string languageCode;
|
||||
private string countryCode;
|
||||
private int organizationId;
|
||||
private string templateBody;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicMediaCategory : IHasIdentity
|
||||
{
|
||||
public BasicMediaCategory (int mediaCategoryId, string name)
|
||||
{
|
||||
this.mediaCategoryId = mediaCategoryId;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public BasicMediaCategory (BasicMediaCategory original) :
|
||||
this(original.mediaCategoryId, original.name)
|
||||
{
|
||||
}
|
||||
|
||||
public BasicMediaCategory()
|
||||
{
|
||||
this.mediaCategoryId = 0;
|
||||
this.name = string.Empty;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return this.name; }
|
||||
}
|
||||
|
||||
public int MediaCategoryId
|
||||
{
|
||||
get { return this.mediaCategoryId; }
|
||||
}
|
||||
|
||||
private int mediaCategoryId;
|
||||
private string name;
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return MediaCategoryId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicMediaEntry : IHasIdentity
|
||||
{
|
||||
public BasicMediaEntry (int id, int keywordId, string mediaName, bool isBlog, string title, string url,
|
||||
DateTime dateTime)
|
||||
{
|
||||
this.id = id;
|
||||
this.keywordId = keywordId;
|
||||
this.mediaName = mediaName;
|
||||
this.isBlog = isBlog;
|
||||
this.title = title;
|
||||
this.url = url;
|
||||
this.dateTime = dateTime;
|
||||
}
|
||||
|
||||
public BasicMediaEntry (BasicMediaEntry original)
|
||||
: this(
|
||||
original.id, original.keywordId, original.mediaName, original.isBlog, original.title, original.url,
|
||||
original.dateTime)
|
||||
{
|
||||
}
|
||||
|
||||
public BasicMediaEntry()
|
||||
: this(0, 0, string.Empty, false, string.Empty, string.Empty, DateTime.MinValue)
|
||||
{
|
||||
}
|
||||
|
||||
public int Id
|
||||
{
|
||||
get { return id; }
|
||||
}
|
||||
|
||||
public int KeywordId
|
||||
{
|
||||
get { return keywordId; }
|
||||
}
|
||||
|
||||
public string Title
|
||||
{
|
||||
get { return title; }
|
||||
}
|
||||
|
||||
public string MediaName
|
||||
{
|
||||
get { return this.mediaName; }
|
||||
}
|
||||
|
||||
|
||||
public string Url
|
||||
{
|
||||
get { return url; }
|
||||
}
|
||||
|
||||
public DateTime DateTime
|
||||
{
|
||||
get { return dateTime; }
|
||||
}
|
||||
|
||||
public bool IsBlog
|
||||
{
|
||||
get { return this.isBlog; }
|
||||
}
|
||||
|
||||
private int id;
|
||||
private DateTime dateTime;
|
||||
private string title;
|
||||
private string mediaName;
|
||||
private string url;
|
||||
private int keywordId;
|
||||
private bool isBlog;
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return Id; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
[Serializable]
|
||||
public class BasicMediaKeyword : IHasIdentity
|
||||
{
|
||||
public BasicMediaKeyword (int id, string keyword)
|
||||
{
|
||||
this.id = id;
|
||||
this.keyword = keyword;
|
||||
}
|
||||
|
||||
public BasicMediaKeyword (BasicMediaKeyword original)
|
||||
{
|
||||
this.id = original.id;
|
||||
this.keyword = original.keyword;
|
||||
}
|
||||
|
||||
public BasicMediaKeyword()
|
||||
: this(0, string.Empty)
|
||||
{
|
||||
}
|
||||
|
||||
public int Id
|
||||
{
|
||||
get { return id; }
|
||||
}
|
||||
|
||||
public string Keyword
|
||||
{
|
||||
get { return keyword; }
|
||||
}
|
||||
|
||||
private int id;
|
||||
private string keyword;
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return Id; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicMedium : IHasIdentity
|
||||
{
|
||||
public BasicMedium (int mediumId, string name, PoliticalAffiliation politicalAffiliation)
|
||||
{
|
||||
this.mediumId = mediumId;
|
||||
this.name = name;
|
||||
this.politicalAffiliation = politicalAffiliation;
|
||||
}
|
||||
|
||||
public BasicMedium (int mediumId, string name)
|
||||
: this(mediumId, name, Enums.PoliticalAffiliation.NotPolitical)
|
||||
{
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return this.name; }
|
||||
}
|
||||
|
||||
public PoliticalAffiliation PoliticalAffiliation
|
||||
{
|
||||
get { return this.politicalAffiliation; }
|
||||
}
|
||||
|
||||
public int MediumId
|
||||
{
|
||||
get { return this.mediumId; }
|
||||
}
|
||||
|
||||
private int mediumId;
|
||||
private string name;
|
||||
private PoliticalAffiliation politicalAffiliation;
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.MediumId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
using Activizr.Basic.Enums;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicMembership : IHasIdentity
|
||||
{
|
||||
public BasicMembership (int personId, int organizationId)
|
||||
{
|
||||
this.PersonId = personId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.Active = true;
|
||||
this.DateTerminated = DateTime.MinValue;
|
||||
}
|
||||
|
||||
public BasicMembership (int personId, int organizationId, DateTime memberSince, DateTime expires)
|
||||
: this(personId, organizationId)
|
||||
{
|
||||
this.MemberSince = memberSince;
|
||||
this.Expires = expires;
|
||||
}
|
||||
|
||||
public BasicMembership (int membershipId, int personId, int organizationId, DateTime memberSince,
|
||||
DateTime expires, bool active, DateTime dateTerminated)
|
||||
{
|
||||
this.MembershipId = membershipId;
|
||||
this.PersonId = personId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.MemberSince = memberSince;
|
||||
this.Expires = expires;
|
||||
this.Active = active;
|
||||
this.DateTerminated = dateTerminated;
|
||||
}
|
||||
|
||||
public BasicMembership (BasicMembership original)
|
||||
: this(
|
||||
original.MembershipId, original.PersonId, original.OrganizationId, original.MemberSince,
|
||||
original.Expires, original.Active, original.DateTerminated)
|
||||
{
|
||||
// Empty copy ctor
|
||||
}
|
||||
|
||||
public int MembershipId { get; private set; }
|
||||
public int OrganizationId { get; private set; }
|
||||
public int PersonId { get; private set; }
|
||||
public bool Active { get; protected set; }
|
||||
public DateTime MemberSince { get; private set; }
|
||||
public DateTime DateTerminated { get; protected set; }
|
||||
public DateTime Expires { get; protected set; }
|
||||
|
||||
|
||||
|
||||
|
||||
// RICK NOTES: I moved the MembershipPayments to a separate table, as they are NULL on most rows.
|
||||
// Not implemented as per 2010-01-11.
|
||||
|
||||
// Also, note the renaming of "Valid" to "Active", consistently with other objects and analogous to "Open".
|
||||
|
||||
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.MembershipId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicMembershipPaymentStatus
|
||||
{
|
||||
public BasicMembershipPaymentStatus (int membershipId,MembershipPaymentStatus status, DateTime statusDateTime)
|
||||
{
|
||||
this.MembershipId = membershipId ;
|
||||
this.Status = status;
|
||||
this.StatusDateTime = statusDateTime;
|
||||
}
|
||||
|
||||
public int MembershipId { get; protected set; }
|
||||
public MembershipPaymentStatus Status { get; set; }
|
||||
public DateTime StatusDateTime { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
/// <summary>
|
||||
/// This class encapsulates a single newsletter.
|
||||
/// </summary>
|
||||
public class BasicNewsletter : IHasIdentity
|
||||
{
|
||||
public BasicNewsletter (int newsletterId, string title, string introduction, string body,
|
||||
int authorId, int templateId, int feedId)
|
||||
{
|
||||
this.newsletterId = newsletterId;
|
||||
this.newsletterFeedId = feedId;
|
||||
this.title = title;
|
||||
this.introduction = introduction;
|
||||
this.body = body;
|
||||
this.authorId = authorId;
|
||||
this.newsletterTemplateId = templateId;
|
||||
this.newsletterFeedId = feedId;
|
||||
}
|
||||
|
||||
public BasicNewsletter (int newsletterId, string title, string introduction, string body,
|
||||
int authorId, int templateId, int feedId, int organizationId, int geographyId)
|
||||
:
|
||||
this(newsletterId, title, introduction, body, authorId, templateId, feedId)
|
||||
{
|
||||
this.organizationId = organizationId;
|
||||
this.geographyId = geographyId;
|
||||
}
|
||||
|
||||
public int NewsletterId
|
||||
{
|
||||
get { return newsletterId; }
|
||||
}
|
||||
|
||||
public string Title
|
||||
{
|
||||
get { return title; }
|
||||
}
|
||||
|
||||
public string Introduction
|
||||
{
|
||||
get { return introduction; }
|
||||
}
|
||||
|
||||
public string Body
|
||||
{
|
||||
get { return body; }
|
||||
}
|
||||
|
||||
public int AuthorId
|
||||
{
|
||||
get { return authorId; }
|
||||
}
|
||||
|
||||
public int NewsletterFeedId
|
||||
{
|
||||
get { return newsletterFeedId; }
|
||||
}
|
||||
|
||||
public int NewsletterTemplateId
|
||||
{
|
||||
get { return newsletterTemplateId; }
|
||||
}
|
||||
|
||||
public int OrganizationId
|
||||
{
|
||||
get { return organizationId; }
|
||||
}
|
||||
|
||||
public int GeographyId
|
||||
{
|
||||
get { return geographyId; }
|
||||
}
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
int IHasIdentity.Identity
|
||||
{
|
||||
get { return NewsletterId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private int newsletterId;
|
||||
private string title;
|
||||
private string introduction;
|
||||
private string body;
|
||||
private int authorId;
|
||||
private int newsletterFeedId;
|
||||
private int newsletterTemplateId;
|
||||
private int geographyId;
|
||||
private int organizationId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicNewsletterFeed
|
||||
{
|
||||
public BasicNewsletterFeed (int newsletterId, int organizationId, bool defaultSubscribed, string name)
|
||||
{
|
||||
this.NewsletterFeedId = newsletterId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.DefaultSubscribed = defaultSubscribed;
|
||||
this.Name = name;
|
||||
}
|
||||
|
||||
public BasicNewsletterFeed()
|
||||
{
|
||||
Name = string.Empty;
|
||||
}
|
||||
|
||||
public BasicNewsletterFeed (BasicNewsletterFeed original)
|
||||
: this(original.NewsletterFeedId, original.OrganizationId, original.DefaultSubscribed, original.Name)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The database identity of the newsletter feed.
|
||||
/// </summary>
|
||||
public readonly int NewsletterFeedId;
|
||||
|
||||
/// <summary>
|
||||
/// The identity of the organization that owns this newsletter.
|
||||
/// </summary>
|
||||
public readonly int OrganizationId;
|
||||
|
||||
/// <summary>
|
||||
/// If true, a new member in the owning organization will get this newsletter.
|
||||
/// </summary>
|
||||
public readonly bool DefaultSubscribed;
|
||||
|
||||
/// <summary>
|
||||
/// A friendly name for the newsletter.
|
||||
/// </summary>
|
||||
public readonly string Name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicNewsletterTemplate
|
||||
{
|
||||
public BasicNewsletterTemplate (string htmlTemplate, string textTemplate)
|
||||
{
|
||||
this.HtmlTemplate = htmlTemplate;
|
||||
this.TextTemplate = textTemplate;
|
||||
}
|
||||
|
||||
public string HtmlTemplate;
|
||||
public string TextTemplate;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
[Serializable]
|
||||
public class BasicObjectOptionalData
|
||||
{
|
||||
public BasicObjectOptionalData(ObjectType objectType, int objectId, Dictionary<ObjectOptionalDataType, string> initialData)
|
||||
{
|
||||
this.ObjectType = objectType;
|
||||
this.ObjectId = objectId;
|
||||
this.OptionalData = initialData;
|
||||
}
|
||||
|
||||
public BasicObjectOptionalData(BasicObjectOptionalData original)
|
||||
: this (original.ObjectType, original.ObjectId, original.OptionalData)
|
||||
{
|
||||
// empty ctor
|
||||
}
|
||||
|
||||
public ObjectType ObjectType { get; private set; }
|
||||
public int ObjectId { get; private set; }
|
||||
|
||||
protected Dictionary<ObjectOptionalDataType, string> OptionalData;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicOrganization : IHasIdentity
|
||||
{
|
||||
public BasicOrganization()
|
||||
{
|
||||
}
|
||||
|
||||
public BasicOrganization (int organizationId, string name, string nameInternational)
|
||||
{
|
||||
this.organizationId = organizationId;
|
||||
this.name = name;
|
||||
this.nameInternational = nameInternational;
|
||||
}
|
||||
|
||||
public BasicOrganization (int organizationId, int parentOrganizationId, string name, string nameInternational) :
|
||||
this(organizationId, name, nameInternational)
|
||||
{
|
||||
this.parentOrganizationId = parentOrganizationId;
|
||||
}
|
||||
|
||||
|
||||
public BasicOrganization (int organizationId, int parentOrganizationId, string name, string nameInternational,
|
||||
string nameShort, string domain, string mailPrefix, int anchorGeographyId,
|
||||
bool acceptsMembers, bool autoAssignNewMembers,
|
||||
int defaultCountryId)
|
||||
: this(organizationId, parentOrganizationId, name, nameInternational)
|
||||
{
|
||||
this.nameShort = nameShort;
|
||||
this.domain = domain;
|
||||
this.mailPrefix = mailPrefix;
|
||||
this.anchorGeographyId = anchorGeographyId;
|
||||
this.acceptsMembers = acceptsMembers;
|
||||
this.autoAssignNewMembers = autoAssignNewMembers;
|
||||
this.defaultCountryId = defaultCountryId;
|
||||
}
|
||||
|
||||
public BasicOrganization (BasicOrganization original)
|
||||
: this(
|
||||
original.Identity, original.ParentOrganizationId, original.Name, original.NameInternational,
|
||||
original.NameShort, original.Domain, original.MailPrefix, original.AnchorGeographyId,
|
||||
original.AcceptsMembers, original.AutoAssignNewMembers, original.DefaultCountryId)
|
||||
{
|
||||
}
|
||||
|
||||
public int DefaultCountryId
|
||||
{
|
||||
get { return this.defaultCountryId; }
|
||||
protected set { this.defaultCountryId = value; }
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return this.name; }
|
||||
protected set { this.name = value; }
|
||||
}
|
||||
|
||||
public string NameInternational
|
||||
{
|
||||
get { return this.nameInternational; }
|
||||
protected set { this.nameInternational = value; }
|
||||
}
|
||||
|
||||
public string NameShort
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.nameShort.Length > 0)
|
||||
{
|
||||
return this.nameShort;
|
||||
}
|
||||
|
||||
return this.Name;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.nameShort = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Domain
|
||||
{
|
||||
get { return this.domain; }
|
||||
protected set { this.domain = value; }
|
||||
}
|
||||
|
||||
public string MailPrefix
|
||||
{
|
||||
get { return this.mailPrefix; }
|
||||
protected set { this.mailPrefix = value; }
|
||||
}
|
||||
|
||||
public int AnchorGeographyId
|
||||
{
|
||||
get { return this.anchorGeographyId; }
|
||||
protected set { this.anchorGeographyId = value; }
|
||||
}
|
||||
|
||||
public bool AcceptsMembers
|
||||
{
|
||||
get { return this.acceptsMembers; }
|
||||
protected set { this.acceptsMembers=value; }
|
||||
}
|
||||
|
||||
public int OrganizationId
|
||||
{
|
||||
get { return this.organizationId; }
|
||||
protected set { this.organizationId = value; }
|
||||
}
|
||||
|
||||
public int ParentOrganizationId
|
||||
{
|
||||
get { return this.parentOrganizationId; }
|
||||
protected set { this.parentOrganizationId = value; }
|
||||
}
|
||||
|
||||
public bool AutoAssignNewMembers
|
||||
{
|
||||
get { return this.autoAssignNewMembers; }
|
||||
protected set { this.autoAssignNewMembers = value; }
|
||||
}
|
||||
|
||||
private string name;
|
||||
private string nameInternational;
|
||||
private string nameShort;
|
||||
private string domain;
|
||||
private string mailPrefix;
|
||||
private int anchorGeographyId;
|
||||
private bool acceptsMembers;
|
||||
private bool autoAssignNewMembers;
|
||||
private int organizationId;
|
||||
private int parentOrganizationId;
|
||||
private int defaultCountryId;
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return OrganizationId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicOutboundInvoice: IHasIdentity
|
||||
{
|
||||
public BasicOutboundInvoice (int outboundInvoiceId, string customerName, string invoiceAddressPaper, string invoiceAddressMail, int currencyId, int organizationId, int budgetId,
|
||||
DateTime createdDateTime, int createdByPersonId, DateTime dueDate, int reminderCount, string reference, bool domestic, bool open, bool sent, string securityCode, string theirReference)
|
||||
{
|
||||
this.OutboundInvoiceId = outboundInvoiceId;
|
||||
this.CustomerName = customerName;
|
||||
this.InvoiceAddressPaper = invoiceAddressPaper;
|
||||
this.InvoiceAddressMail = invoiceAddressMail;
|
||||
this.CurrencyId = currencyId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.BudgetId = budgetId;
|
||||
this.CreatedDateTime = createdDateTime;
|
||||
this.CreatedByPersonId = createdByPersonId;
|
||||
this.DueDate = dueDate;
|
||||
this.ReminderCount = reminderCount;
|
||||
this.Reference = reference;
|
||||
this.Domestic = domestic;
|
||||
this.Open = open;
|
||||
this.Sent = sent;
|
||||
this.SecurityCode = securityCode;
|
||||
this.TheirReference = theirReference;
|
||||
}
|
||||
|
||||
|
||||
public BasicOutboundInvoice (BasicOutboundInvoice original):
|
||||
this (original.OutboundInvoiceId, original.CustomerName, original.InvoiceAddressPaper, original.InvoiceAddressMail, original.CurrencyId, original.OrganizationId, original.BudgetId, original.CreatedDateTime, original.CreatedByPersonId, original.DueDate, original.ReminderCount, original.Reference, original.Domestic, original.Open, original.Sent, original.SecurityCode, original.TheirReference)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int OutboundInvoiceId { get; private set; }
|
||||
public string CustomerName { get; private set; }
|
||||
public string InvoiceAddressPaper { get; private set; }
|
||||
public string InvoiceAddressMail { get; private set; }
|
||||
public int CurrencyId { get; private set; }
|
||||
public int OrganizationId { get; private set; }
|
||||
public int BudgetId { get; protected set; }
|
||||
public DateTime CreatedDateTime { get; private set; }
|
||||
public int CreatedByPersonId { get; private set; }
|
||||
public DateTime DueDate { get; private set; }
|
||||
public int ReminderCount { get; protected set; }
|
||||
public string Reference { get; protected set; }
|
||||
public bool Domestic { get; private set; }
|
||||
public bool Open { get; protected set; }
|
||||
public bool Sent { get; protected set; }
|
||||
public string SecurityCode { get; private set; }
|
||||
public string TheirReference { get; protected set; }
|
||||
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.OutboundInvoiceId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicOutboundInvoiceItem: IHasIdentity
|
||||
{
|
||||
public BasicOutboundInvoiceItem (int outboundInvoiceItemId, int outboundInvoiceId, string description, Int64 amountCents)
|
||||
{
|
||||
this.OutboundInvoiceItemId = outboundInvoiceItemId;
|
||||
this.OutboundInvoiceId = outboundInvoiceId;
|
||||
this.Description = description;
|
||||
this.AmountCents = amountCents;
|
||||
}
|
||||
|
||||
public BasicOutboundInvoiceItem(BasicOutboundInvoiceItem original):
|
||||
this (original.OutboundInvoiceItemId, original.OutboundInvoiceId, original.Description, original.AmountCents)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int OutboundInvoiceItemId { get; private set; }
|
||||
public int OutboundInvoiceId { get; private set; }
|
||||
public string Description { get; private set; }
|
||||
public Int64 AmountCents { get; private set; }
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.OutboundInvoiceItemId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,222 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicOutboundMail : IHasIdentity
|
||||
{
|
||||
#region Construction and Creation
|
||||
|
||||
// =============================
|
||||
// CONSTRUCTION AND CREATION
|
||||
// =============================
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Basic constructor. This is for database use and NOT for public construction.
|
||||
/// </summary>
|
||||
public BasicOutboundMail (int outboundMailId, MailAuthorType authorType, int authorPersonId, string title,
|
||||
string body, int mailPriority, int mailTypeId, int organizationId,
|
||||
int geographyId,
|
||||
DateTime createdDateTime, DateTime releaseDateTime, bool readyForPickup, bool resolved,
|
||||
bool processed,
|
||||
DateTime resolvedDateTime, DateTime startProcessDateTime, DateTime endProcessDateTime,
|
||||
int recipientCount, int recipientsSuccess, int recipientsFail)
|
||||
{
|
||||
this.outboundMailId = outboundMailId;
|
||||
this.authorType = authorType;
|
||||
this.authorPersonId = authorPersonId;
|
||||
this.title = title;
|
||||
this.body = body;
|
||||
this.mailPriority = mailPriority;
|
||||
this.mailType = mailTypeId;
|
||||
this.geographyId = geographyId;
|
||||
this.organizationId = organizationId;
|
||||
this.createdDateTime = createdDateTime;
|
||||
this.releaseDateTime = releaseDateTime;
|
||||
this.readyForPickup = readyForPickup;
|
||||
this.resolved = resolved;
|
||||
this.processed = processed;
|
||||
this.resolvedDateTime = resolvedDateTime;
|
||||
this.startProcessDateTime = startProcessDateTime;
|
||||
this.endProcessDateTime = endProcessDateTime;
|
||||
this.recipientCount = recipientCount;
|
||||
this.recipientsSuccess = recipientsSuccess;
|
||||
this.recipientsFail = recipientsFail;
|
||||
|
||||
// phew.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor used by OutboundMail after creating record in db. NOT for other use
|
||||
/// </summary>
|
||||
public BasicOutboundMail (int outboundMailId, MailAuthorType authorType, int authorPersonId, string title,
|
||||
string body, int mailPriority, int mailType, int organizationId,
|
||||
int geographyId, DateTime createdDateTime, DateTime releaseDateTime)
|
||||
: this(outboundMailId, authorType, authorPersonId, title, body,
|
||||
mailPriority, mailType, organizationId, geographyId,
|
||||
createdDateTime, releaseDateTime,
|
||||
false, false, false, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, 0, 0, 0)
|
||||
{
|
||||
// nothing more to do
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copy constructor. Used when PirateWeb.Logic constructs an OutboundMail object.
|
||||
/// </summary>
|
||||
/// <param name="original">The original to copy.</param>
|
||||
public BasicOutboundMail (BasicOutboundMail original)
|
||||
: this(
|
||||
original.outboundMailId, original.authorType, original.authorPersonId, original.title,
|
||||
original.body, original.mailPriority, original.mailType,
|
||||
original.organizationId, original.geographyId, original.createdDateTime, original.releaseDateTime,
|
||||
original.readyForPickup, original.resolved, original.processed,
|
||||
original.resolvedDateTime, original.startProcessDateTime, original.endProcessDateTime,
|
||||
original.recipientCount, original.recipientsSuccess, original.recipientsFail)
|
||||
{
|
||||
// nothing more to do after copying fields
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties and Accessors
|
||||
|
||||
// ============================
|
||||
// PROPERTIES AND ACCESSORS
|
||||
// ============================
|
||||
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.OutboundMailId; }
|
||||
}
|
||||
|
||||
public int OutboundMailId
|
||||
{
|
||||
get { return this.outboundMailId; }
|
||||
}
|
||||
|
||||
public MailAuthorType AuthorType
|
||||
{
|
||||
get { return this.authorType; }
|
||||
}
|
||||
|
||||
public int AuthorPersonId
|
||||
{
|
||||
get { return this.authorPersonId; }
|
||||
}
|
||||
|
||||
public string Title
|
||||
{
|
||||
get { return this.title; }
|
||||
protected set { this.title = value; }
|
||||
}
|
||||
|
||||
public string Body
|
||||
{
|
||||
get { return this.body; }
|
||||
}
|
||||
|
||||
public int OrganizationId
|
||||
{
|
||||
get { return this.organizationId; }
|
||||
}
|
||||
|
||||
public int GeographyId
|
||||
{
|
||||
get { return this.geographyId; }
|
||||
}
|
||||
|
||||
public int MailPriority
|
||||
{
|
||||
get { return this.mailPriority; }
|
||||
}
|
||||
|
||||
public int MailType
|
||||
{
|
||||
get { return this.mailType; }
|
||||
}
|
||||
|
||||
public DateTime ReleaseDateTime
|
||||
{
|
||||
get { return this.releaseDateTime; }
|
||||
}
|
||||
|
||||
public DateTime StartProcessDateTime
|
||||
{
|
||||
get { return this.startProcessDateTime; }
|
||||
set { this.startProcessDateTime = value; }
|
||||
}
|
||||
|
||||
public bool ReadyForPickup
|
||||
{
|
||||
get { return this.readyForPickup; }
|
||||
set { this.readyForPickup = value; }
|
||||
}
|
||||
|
||||
public bool Resolved
|
||||
{
|
||||
get { return this.resolved; }
|
||||
set { this.resolved = value; }
|
||||
}
|
||||
|
||||
public bool Processed
|
||||
{
|
||||
get { return this.processed; }
|
||||
set { this.processed = value; }
|
||||
}
|
||||
|
||||
public int RecipientCount
|
||||
{
|
||||
get { return this.recipientCount; }
|
||||
set { this.recipientCount = value; }
|
||||
}
|
||||
|
||||
public int RecipientsSuccess
|
||||
{
|
||||
get { return this.recipientsSuccess; }
|
||||
set { this.recipientsSuccess = value; }
|
||||
}
|
||||
|
||||
public int RecipientsFail
|
||||
{
|
||||
get { return this.recipientsFail; }
|
||||
set { this.recipientsFail = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private fields
|
||||
|
||||
// ==================
|
||||
// PRIVATE FIELDS
|
||||
// ==================
|
||||
|
||||
|
||||
private int outboundMailId;
|
||||
private MailAuthorType authorType;
|
||||
private int authorPersonId;
|
||||
private string title;
|
||||
private string body;
|
||||
private int mailPriority;
|
||||
private int mailType;
|
||||
private int geographyId;
|
||||
private int organizationId;
|
||||
private DateTime createdDateTime;
|
||||
private DateTime releaseDateTime;
|
||||
private bool readyForPickup;
|
||||
private bool resolved;
|
||||
private bool processed;
|
||||
private DateTime resolvedDateTime;
|
||||
private DateTime startProcessDateTime;
|
||||
private DateTime endProcessDateTime;
|
||||
private int recipientCount;
|
||||
private int recipientsSuccess;
|
||||
private int recipientsFail;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicOutboundMailRecipient : IHasIdentity
|
||||
{
|
||||
#region Creation and Construction
|
||||
|
||||
/// <summary>
|
||||
/// Normal constructor.
|
||||
/// </summary>
|
||||
public BasicOutboundMailRecipient (int outboundMailRecipientId, int outboundMailId, int personId, bool asOfficer,int personType)
|
||||
{
|
||||
this.outboundMailId = outboundMailId;
|
||||
this.outboundMailRecipientId = outboundMailRecipientId;
|
||||
this.personId = personId;
|
||||
this.asOfficer = asOfficer;
|
||||
this.personType = personType;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copy constructor.
|
||||
/// </summary>
|
||||
public BasicOutboundMailRecipient (BasicOutboundMailRecipient original)
|
||||
: this(original.outboundMailRecipientId, original.outboundMailId, original.personId, original.asOfficer, original.personType)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties and Accessors
|
||||
|
||||
public int OutboundMailRecipientId
|
||||
{
|
||||
get { return this.outboundMailRecipientId; }
|
||||
}
|
||||
|
||||
public int OutboundMailId
|
||||
{
|
||||
get { return this.outboundMailId; }
|
||||
}
|
||||
|
||||
public int PersonId
|
||||
{
|
||||
get { return this.personId; }
|
||||
}
|
||||
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.OutboundMailRecipientId; }
|
||||
}
|
||||
|
||||
|
||||
public bool AsOfficer
|
||||
{
|
||||
get { return this.asOfficer; }
|
||||
}
|
||||
|
||||
public int PersonType
|
||||
{
|
||||
get { return this.personType ; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private fields
|
||||
|
||||
private int outboundMailRecipientId;
|
||||
private int outboundMailId;
|
||||
private int personId;
|
||||
private bool asOfficer;
|
||||
private int personType = 0; //0 = Person, 1 = Reporter
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicPWEvent
|
||||
{
|
||||
public BasicPWEvent (int eventId, DateTime dateTime, bool open, DateTime processedDateTime, Enums.EventType eventType,
|
||||
Enums.EventSource eventSource, int actingPersonId, int affectedPersonId, int organizationId,
|
||||
int geographyId, int parameterInt, string parameterText)
|
||||
{
|
||||
this.EventId = eventId;
|
||||
this.DateTime = dateTime;
|
||||
this.Open = open;
|
||||
this.ProcessedDateTime = processedDateTime;
|
||||
this.EventType = eventType;
|
||||
this.EventSource = eventSource;
|
||||
this.ActingPersonId = actingPersonId;
|
||||
this.AffectedPersonId = affectedPersonId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.GeographyId = geographyId;
|
||||
this.ParameterInt = parameterInt;
|
||||
this.ParameterText = parameterText;
|
||||
}
|
||||
|
||||
|
||||
public DateTime DateTime { get; private set; }
|
||||
public DateTime ProcessedDateTime { get; protected set; }
|
||||
public int EventId { get; private set; }
|
||||
public bool Open { get; protected set; }
|
||||
public Enums.EventType EventType { get; private set; }
|
||||
public Enums.EventSource EventSource { get; private set; }
|
||||
public int ActingPersonId { get; private set; }
|
||||
public int AffectedPersonId { get; private set; }
|
||||
public int OrganizationId { get; private set; }
|
||||
public int GeographyId { get; private set; }
|
||||
public int ParameterInt { get; private set; }
|
||||
public string ParameterText { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
[Serializable]
|
||||
public class BasicPWLog
|
||||
{
|
||||
public BasicPWLog ( DateTime dateTimeUtc,
|
||||
int actingPersonId,
|
||||
string affectedItemType,
|
||||
int affectedItemId,
|
||||
string actionType,
|
||||
string actionDescription,
|
||||
string changedField,
|
||||
string valueBefore,
|
||||
string valueAfter,
|
||||
string comment,
|
||||
string ipAddress)
|
||||
{
|
||||
this.dateTimeUtc = dateTimeUtc;
|
||||
this.actingPersonId = actingPersonId;
|
||||
this.affectedItemType = affectedItemType;
|
||||
this.affectedItemId = affectedItemId;
|
||||
this.actionType = actionType;
|
||||
this.actionDescription = actionDescription;
|
||||
this.changedField = changedField;
|
||||
this.valueBefore = valueBefore;
|
||||
this.valueAfter = valueAfter;
|
||||
this.comment = comment;
|
||||
this.ipAddress = ipAddress;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public DateTime DateTimeUtc
|
||||
{
|
||||
get { return dateTimeUtc; }
|
||||
set { dateTimeUtc = value; }
|
||||
}
|
||||
|
||||
public int ActingPersonId
|
||||
{
|
||||
get { return actingPersonId; }
|
||||
set { actingPersonId = value; }
|
||||
}
|
||||
|
||||
public string AffectedItemType
|
||||
{
|
||||
get { return affectedItemType; }
|
||||
set { affectedItemType = value; }
|
||||
}
|
||||
|
||||
public int AffectedItemId
|
||||
{
|
||||
get { return affectedItemId; }
|
||||
set { affectedItemId = value; }
|
||||
}
|
||||
|
||||
public string ActionType
|
||||
{
|
||||
get { return actionType; }
|
||||
set { actionType = value; }
|
||||
}
|
||||
|
||||
public string ActionDescription
|
||||
{
|
||||
get { return actionDescription; }
|
||||
set { actionDescription = value; }
|
||||
}
|
||||
|
||||
public string ChangedField
|
||||
{
|
||||
get { return changedField; }
|
||||
set { changedField = value; }
|
||||
}
|
||||
|
||||
public string ValueBefore
|
||||
{
|
||||
get { return valueBefore; }
|
||||
set { valueBefore = value; }
|
||||
}
|
||||
|
||||
public string ValueAfter
|
||||
{
|
||||
get { return valueAfter; }
|
||||
set { valueAfter = value; }
|
||||
}
|
||||
|
||||
public string Comment
|
||||
{
|
||||
get { return comment; }
|
||||
set { comment = value; }
|
||||
}
|
||||
|
||||
public string IpAddress
|
||||
{
|
||||
get { return ipAddress; }
|
||||
set { ipAddress = value; }
|
||||
}
|
||||
|
||||
private DateTime dateTimeUtc;
|
||||
private int actingPersonId;
|
||||
private string affectedItemType;
|
||||
private int affectedItemId;
|
||||
private string actionType;
|
||||
private string actionDescription;
|
||||
private string changedField;
|
||||
private string valueBefore;
|
||||
private string valueAfter;
|
||||
private string comment;
|
||||
private string ipAddress;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicPaperLetter: IHasIdentity
|
||||
{
|
||||
public BasicPaperLetter (int paperLetterId, int organizationId, string fromName, string replyAddress,
|
||||
DateTime receivedDate, int toPersonId, RoleType toPersonInRole, bool personal, int uploadedByPersonId, DateTime uploadedDateTime)
|
||||
{
|
||||
this.PaperLetterId = paperLetterId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.FromName = fromName;
|
||||
this.ReplyAddress = replyAddress;
|
||||
this.ReceivedDate = receivedDate;
|
||||
this.ToPersonId = toPersonId;
|
||||
this.ToPersonInRole = toPersonInRole;
|
||||
this.Personal = personal;
|
||||
this.UploadedByPersonId = uploadedByPersonId;
|
||||
this.UploadedDateTime = uploadedDateTime;
|
||||
}
|
||||
|
||||
public BasicPaperLetter (BasicPaperLetter original)
|
||||
: this (original.PaperLetterId, original.OrganizationId, original.FromName, original.ReplyAddress,
|
||||
original.ReceivedDate, original.ToPersonId, original.ToPersonInRole, original.Personal, original.UploadedByPersonId,
|
||||
original.UploadedDateTime)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int PaperLetterId { get; private set; }
|
||||
public int OrganizationId { get; protected set; }
|
||||
public string FromName { get; protected set; }
|
||||
public string ReplyAddress { get; protected set; }
|
||||
public int ToPersonId { get; protected set; }
|
||||
public RoleType ToPersonInRole { get; protected set; }
|
||||
public int GeographyId { get; protected set; }
|
||||
public bool Personal { get; protected set; }
|
||||
public DateTime ReceivedDate { get; protected set; }
|
||||
public int UploadedByPersonId { get; private set; }
|
||||
public DateTime UploadedDateTime { get; private set; }
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.PaperLetterId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicParley: IHasIdentity
|
||||
{
|
||||
public BasicParley (int parleyId, int organizationId, int personId, int budgetId, DateTime createdDateTime, bool open, bool attested, string name, int geographyId, string description, string informationUrl, DateTime startDate, DateTime endDate, Int64 budgetCents, Int64 guaranteeCents,
|
||||
Int64 attendanceFeeCents, DateTime closedDateTime)
|
||||
{
|
||||
this.ParleyId = parleyId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.PersonId = personId;
|
||||
this.BudgetId = budgetId;
|
||||
this.CreatedDateTime = createdDateTime;
|
||||
this.Open = open;
|
||||
this.Attested = attested;
|
||||
this.Name = name;
|
||||
this.GeographyId = geographyId;
|
||||
this.Description = description;
|
||||
this.InformationUrl = informationUrl;
|
||||
this.StartDate = startDate;
|
||||
this.EndDate = endDate;
|
||||
this.BudgetCents = budgetCents;
|
||||
this.GuaranteeCents = guaranteeCents;
|
||||
this.AttendanceFeeCents = attendanceFeeCents;
|
||||
this.ClosedDateTime = closedDateTime;
|
||||
}
|
||||
|
||||
public BasicParley (BasicParley original)
|
||||
: this (original.ParleyId, original.OrganizationId, original.PersonId, original.BudgetId, original.CreatedDateTime, original.Open, original.Attested, original.Name, original.GeographyId, original.Description, original.InformationUrl, original.StartDate, original.EndDate, original.BudgetCents, original.GuaranteeCents, original.AttendanceFeeCents, original.ClosedDateTime)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
|
||||
public int ParleyId { get; private set; }
|
||||
public int OrganizationId { get; private set; }
|
||||
public int PersonId { get; private set; }
|
||||
public int BudgetId { get; protected set; }
|
||||
public bool Open { get; protected set; }
|
||||
public string Name { get; protected set; }
|
||||
public int GeographyId { get; protected set; }
|
||||
public string Description { get; protected set; }
|
||||
public string InformationUrl { get; protected set; }
|
||||
public DateTime StartDate { get; protected set; }
|
||||
public DateTime EndDate { get; protected set; }
|
||||
public Int64 BudgetCents { get; protected set; }
|
||||
public Int64 GuaranteeCents { get; protected set; }
|
||||
public Int64 AttendanceFeeCents { get; protected set; }
|
||||
public bool Attested { get; protected set; }
|
||||
public DateTime CreatedDateTime { get; private set; }
|
||||
public DateTime ClosedDateTime { get; protected set; }
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.ParleyId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicParleyAttendee: IHasIdentity
|
||||
{
|
||||
public BasicParleyAttendee (int parleyAttendeeId, int parleyId, int personId, DateTime signupDateTime, bool active, DateTime cancelDateTime, bool invoiced, int outboundInvoiceId, bool isGuest)
|
||||
{
|
||||
this.ParleyAttendeeId = parleyAttendeeId;
|
||||
this.ParleyId = parleyId;
|
||||
this.PersonId = personId;
|
||||
this.SignupDateTime = signupDateTime;
|
||||
this.Active = active;
|
||||
this.CancelDateTime = cancelDateTime;
|
||||
this.Invoiced = invoiced;
|
||||
this.OutboundInvoiceId = outboundInvoiceId;
|
||||
}
|
||||
|
||||
public BasicParleyAttendee(BasicParleyAttendee original)
|
||||
: this (original.ParleyAttendeeId, original.ParleyId, original.PersonId, original.SignupDateTime, original.Active, original.CancelDateTime, original.Invoiced, original.OutboundInvoiceId, original.IsGuest)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int ParleyAttendeeId { get; private set; }
|
||||
public int ParleyId { get; private set; }
|
||||
public int PersonId { get; private set; }
|
||||
public DateTime SignupDateTime { get; private set; }
|
||||
public bool Active { get; protected set; }
|
||||
public DateTime CancelDateTime { get; private set; }
|
||||
public bool Invoiced { get; protected set; }
|
||||
public int OutboundInvoiceId { get; protected set; }
|
||||
public bool IsGuest { get; private set; }
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.ParleyAttendeeId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicParleyOption: IHasIdentity
|
||||
{
|
||||
public BasicParleyOption (int parleyOptionId, int parleyId, string description, Int64 amountCents, bool active)
|
||||
{
|
||||
this.ParleyOptionId = parleyOptionId;
|
||||
this.ParleyId = parleyId;
|
||||
this.Description = description;
|
||||
this.AmountCents = amountCents;
|
||||
this.Active = active;
|
||||
}
|
||||
|
||||
public BasicParleyOption (BasicParleyOption original)
|
||||
: this (original.ParleyOptionId, original.ParleyId, original.Description, original.AmountCents, original.Active)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int ParleyOptionId { get; private set; }
|
||||
public int ParleyId { get; private set; }
|
||||
public string Description { get; private set; }
|
||||
public Int64 AmountCents { get; private set; }
|
||||
public bool Active { get; protected set; }
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.ParleyOptionId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicPayment: IHasIdentity
|
||||
{
|
||||
public BasicPayment (int paymentId, int paymentGroupId, Int64 amountCents, string reference, string fromAccount, string key, bool hasImage, int outboundInvoiceId)
|
||||
{
|
||||
this.PaymentId = paymentId;
|
||||
this.PaymentGroupId = paymentGroupId;
|
||||
this.AmountCents = amountCents;
|
||||
this.Reference = reference;
|
||||
this.FromAccount = fromAccount;
|
||||
this.Key = key;
|
||||
this.HasImage = hasImage;
|
||||
this.OutboundInvoiceId = outboundInvoiceId;
|
||||
}
|
||||
|
||||
public BasicPayment (BasicPayment original)
|
||||
: this (original.PaymentId, original.PaymentGroupId, original.AmountCents, original.Reference, original.FromAccount, original.Key, original.HasImage, original.OutboundInvoiceId)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int PaymentId { get; private set; }
|
||||
public int PaymentGroupId { get; private set; }
|
||||
public Int64 AmountCents { get; private set; }
|
||||
public string Reference { get; private set; }
|
||||
public string FromAccount { get; private set; }
|
||||
public string Key { get; private set; } // may need to expand with URL or similar later
|
||||
public bool HasImage { get; private set; }
|
||||
public int OutboundInvoiceId { get; protected set; }
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.PaymentId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicPaymentCode : IHasIdentity
|
||||
{
|
||||
public BasicPaymentCode (int paymentCodeId, string paymentCode, string issuedToPhoneNumber, int issuedToPersonId,
|
||||
bool claimed)
|
||||
{
|
||||
this.paymentCodeId = paymentCodeId;
|
||||
this.paymentCode = paymentCode;
|
||||
this.issuedToPhoneNumber = issuedToPhoneNumber;
|
||||
this.issuedToPersonId = issuedToPersonId;
|
||||
this.claimed = claimed;
|
||||
}
|
||||
|
||||
public BasicPaymentCode (BasicPaymentCode original)
|
||||
: this(
|
||||
original.paymentCodeId, original.paymentCode, original.issuedToPhoneNumber, original.issuedToPersonId,
|
||||
original.claimed)
|
||||
{
|
||||
// TODO: Expand with the rest of the fields
|
||||
}
|
||||
|
||||
|
||||
public int PaymentCodeId
|
||||
{
|
||||
get { return this.paymentCodeId; }
|
||||
}
|
||||
|
||||
public string PaymentCode
|
||||
{
|
||||
get { return this.paymentCode; }
|
||||
}
|
||||
|
||||
public string IssuedToPhoneNumber
|
||||
{
|
||||
get { return this.issuedToPhoneNumber; }
|
||||
}
|
||||
|
||||
public int IssuedToPersonId
|
||||
{
|
||||
get { return this.issuedToPersonId; }
|
||||
}
|
||||
|
||||
public bool Claimed
|
||||
{
|
||||
get { return this.claimed; }
|
||||
}
|
||||
|
||||
|
||||
protected void SetClaimed()
|
||||
{
|
||||
this.claimed = true;
|
||||
}
|
||||
|
||||
|
||||
public PaymentCodeIssueType IssueType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (issuedToPersonId == 0)
|
||||
{
|
||||
return PaymentCodeIssueType.Phone;
|
||||
}
|
||||
else
|
||||
{
|
||||
return PaymentCodeIssueType.Person;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private int paymentCodeId;
|
||||
private string paymentCode;
|
||||
private string issuedToPhoneNumber;
|
||||
private int issuedToPersonId;
|
||||
private bool claimed;
|
||||
//private bool balanced;
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.PaymentCodeId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicPaymentGroup: IHasIdentity
|
||||
{
|
||||
public BasicPaymentGroup (int paymentGroupId, int organizationId, DateTime dateTime, int currencyId, Int64 amountCents, string tag, int createdByPersonId, DateTime createdDateTime, bool open)
|
||||
{
|
||||
this.PaymentGroupId = paymentGroupId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.Tag = tag;
|
||||
this.DateTime = dateTime;
|
||||
this.AmountCents = amountCents;
|
||||
this.CurrencyId = currencyId;
|
||||
this.CreatedByPersonId = createdByPersonId;
|
||||
this.CreatedDateTime = createdDateTime;
|
||||
this.Open = open;
|
||||
}
|
||||
|
||||
public BasicPaymentGroup (BasicPaymentGroup original)
|
||||
: this(original.PaymentGroupId, original.OrganizationId, original.DateTime, original.CurrencyId, original.AmountCents, original.Tag, original.CreatedByPersonId, original.CreatedDateTime, original.Open)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int PaymentGroupId { get; private set; }
|
||||
public int OrganizationId { get; private set; }
|
||||
public string Tag { get; protected set; }
|
||||
public DateTime DateTime { get; private set; }
|
||||
public Int64 AmountCents { get; protected set; }
|
||||
public int CurrencyId { get; private set; }
|
||||
public int CreatedByPersonId { get; private set; }
|
||||
public DateTime CreatedDateTime { get; private set; }
|
||||
public bool Open { get; protected set; }
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.PaymentGroupId; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicPaymentInformation
|
||||
{
|
||||
public BasicPaymentInformation (PaymentInformationType type, string data)
|
||||
{
|
||||
this.Type = type;
|
||||
this.Data = data;
|
||||
}
|
||||
|
||||
public BasicPaymentInformation (BasicPaymentInformation original)
|
||||
: this (original.Type, original.Data)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public PaymentInformationType Type { get; private set; }
|
||||
public string Data { get; private set; }
|
||||
}
|
||||
|
||||
|
||||
public enum PaymentInformationType
|
||||
{
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// The payer's name as supplied by the bank.
|
||||
/// </summary>
|
||||
Name,
|
||||
/// <summary>
|
||||
/// The payer's street as and if supplied by the bank.
|
||||
/// </summary>
|
||||
Street,
|
||||
/// <summary>
|
||||
/// The payer's postal code as and if supplied by the bank.
|
||||
/// </summary>
|
||||
PostalCode,
|
||||
/// <summary>
|
||||
/// The payer's city as and if supplied by the bank.
|
||||
/// </summary>
|
||||
City,
|
||||
/// <summary>
|
||||
/// The payer's org# or person# as and if supplied by the bank.
|
||||
/// </summary>
|
||||
OrgNumber,
|
||||
/// <summary>
|
||||
/// Freeform information supplied by payer.
|
||||
/// </summary>
|
||||
Freeform,
|
||||
/// <summary>
|
||||
/// The payer's country as and if supplied by the bank.
|
||||
/// </summary>
|
||||
Country,
|
||||
/// <summary>
|
||||
/// The payer's country code as and if supplied by the bank.
|
||||
/// </summary>
|
||||
CountryCode,
|
||||
/// <summary>
|
||||
/// Payer's email as and if supplied by the bank.
|
||||
/// </summary>
|
||||
Email,
|
||||
/// <summary>
|
||||
/// Information needed to perform a future refund.
|
||||
/// </summary>
|
||||
RefundInformation
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicPayout: IHasIdentity
|
||||
{
|
||||
public BasicPayout (int payoutId, int organizationId, string bank, string account,
|
||||
string reference, Int64 amountCents, DateTime expectedTransactionDate, bool open,
|
||||
DateTime createdDateTime, int createdByPersonId)
|
||||
{
|
||||
this.PayoutId = payoutId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.Bank = bank;
|
||||
this.Account = account;
|
||||
this.Reference = reference;
|
||||
this.AmountCents = amountCents;
|
||||
this.ExpectedTransactionDate = expectedTransactionDate;
|
||||
this.Open = open;
|
||||
this.CreatedDateTime = createdDateTime;
|
||||
this.CreatedByPersonId = createdByPersonId;
|
||||
}
|
||||
|
||||
public BasicPayout(BasicPayout original) :
|
||||
this(original.PayoutId, original.OrganizationId, original.Bank, original.Account,
|
||||
original.Reference, original.AmountCents, original.ExpectedTransactionDate, original.Open,
|
||||
original.CreatedDateTime, original.CreatedByPersonId)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
public int PayoutId { get; private set; }
|
||||
public int OrganizationId { get; protected set; }
|
||||
public string Bank { get; protected set; }
|
||||
public string Account { get; protected set; }
|
||||
public string Reference { get; protected set; }
|
||||
public Int64 AmountCents { get; protected set; }
|
||||
public DateTime ExpectedTransactionDate { get; protected set; }
|
||||
public bool Open { get; protected set; }
|
||||
public DateTime CreatedDateTime { get; private set; }
|
||||
public int CreatedByPersonId { get; private set; }
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.PayoutId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicPayrollAdjustment: IHasIdentity
|
||||
{
|
||||
public BasicPayrollAdjustment (int payrollAdjustmentId, int payrollItemId, PayrollAdjustmentType type, Int64 amountCents,
|
||||
string description, bool open, int salaryId)
|
||||
{
|
||||
this.PayrollAdjustmentId = payrollAdjustmentId;
|
||||
this.PayrollItemId = payrollItemId;
|
||||
this.Type = type;
|
||||
this.AmountCents = amountCents;
|
||||
this.Description = description;
|
||||
this.Open = open;
|
||||
this.SalaryId = salaryId;
|
||||
}
|
||||
|
||||
|
||||
public BasicPayrollAdjustment (BasicPayrollAdjustment original)
|
||||
: this (original.PayrollAdjustmentId, original.PayrollItemId, original.Type, original.AmountCents, original.Description, original.Open, original.SalaryId)
|
||||
{
|
||||
// empty copy ctor
|
||||
}
|
||||
|
||||
|
||||
public int PayrollAdjustmentId { get; private set; }
|
||||
public int PayrollItemId { get; private set; }
|
||||
public PayrollAdjustmentType Type { get; private set; }
|
||||
public Int64 AmountCents { get; private set; }
|
||||
public string Description { get; private set; }
|
||||
public bool Open { get; protected set; }
|
||||
public int SalaryId { get; protected set; }
|
||||
public int Identity
|
||||
{
|
||||
get { return this.PayrollAdjustmentId; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public enum PayrollAdjustmentType
|
||||
{
|
||||
/// <summary>
|
||||
/// Undefined value
|
||||
/// </summary>
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// Adjustment to salary BEFORE tax (sick leave, etc)
|
||||
/// </summary>
|
||||
GrossAdjustment = 1,
|
||||
/// <summary>
|
||||
/// Adjustment to salary AFTER tax (expenses, etc)
|
||||
/// </summary>
|
||||
NetAdjustment = 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicPayrollItem: IHasIdentity
|
||||
{
|
||||
public BasicPayrollItem (int payrollItemId, int personId, int organizationId, int countryId, DateTime employedDate,
|
||||
int reportsToPersonId, Int64 baseSalaryCents, int budgetId, bool open, DateTime terminatedDate,
|
||||
int subtractiveTaxLevelId, double additiveTaxLevel)
|
||||
{
|
||||
this.PayrollItemId = payrollItemId;
|
||||
this.PersonId = personId;
|
||||
this.OrganizationId = organizationId;
|
||||
this.CountryId = countryId;
|
||||
this.EmployedDate = employedDate;
|
||||
this.ReportsToPersonId = reportsToPersonId;
|
||||
this.BaseSalaryCents = baseSalaryCents;
|
||||
this.BudgetId = budgetId;
|
||||
this.Open = open;
|
||||
this.TerminatedDate = terminatedDate;
|
||||
this.SubtractiveTaxLevelId = subtractiveTaxLevelId;
|
||||
this.AdditiveTaxLevel = additiveTaxLevel;
|
||||
}
|
||||
|
||||
public BasicPayrollItem (BasicPayrollItem original)
|
||||
:this (original.PayrollItemId, original.PersonId, original.OrganizationId, original.CountryId,
|
||||
original.EmployedDate, original.ReportsToPersonId, original.BaseSalaryCents, original.BudgetId,
|
||||
original.Open, original.TerminatedDate, original.SubtractiveTaxLevelId, original.AdditiveTaxLevel)
|
||||
{
|
||||
// empty copy constructor
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the identity of the payroll item. Also accessible through Identity.
|
||||
/// </summary>
|
||||
public int PayrollItemId { get; private set; }
|
||||
/// <summary>
|
||||
/// The employed person Id.
|
||||
/// </summary>
|
||||
public int PersonId { get; private set; }
|
||||
/// <summary>
|
||||
/// The employing organization.
|
||||
/// </summary>
|
||||
public int OrganizationId { get; private set; }
|
||||
/// <summary>
|
||||
/// The employment country (for tax laws and such).
|
||||
/// </summary>
|
||||
public int CountryId { get; private set; }
|
||||
/// <summary>
|
||||
/// The date of employment.
|
||||
/// </summary>
|
||||
public DateTime EmployedDate { get; private set; }
|
||||
/// <summary>
|
||||
/// The person above this person in the org chart.
|
||||
/// </summary>
|
||||
public int ReportsToPersonId { get; protected set; }
|
||||
/// <summary>
|
||||
/// The base gross montly salary in the local currency.
|
||||
/// </summary>
|
||||
public Int64 BaseSalaryCents { get; protected set; }
|
||||
/// <summary>
|
||||
/// The budget charged with the costs of this employment.
|
||||
/// </summary>
|
||||
public int BudgetId { get; protected set; }
|
||||
/// <summary>
|
||||
/// True if this employment is still active.
|
||||
/// </summary>
|
||||
public bool Open { get; protected set; }
|
||||
/// <summary>
|
||||
/// If closed, this field contains the date the employment ended.
|
||||
/// </summary>
|
||||
public DateTime TerminatedDate { get; protected set; }
|
||||
/// <summary>
|
||||
/// The tax level code of the country of employment. Subtracted from gross salary to get net salary.
|
||||
/// </summary>
|
||||
public int SubtractiveTaxLevelId { get; protected set; }
|
||||
/// <summary>
|
||||
/// The tax level, as a fraction, paid by the organization on top of the gross salary.
|
||||
/// </summary>
|
||||
public double AdditiveTaxLevel { get; protected set; }
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.PayrollItemId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicPermission
|
||||
{
|
||||
public RoleType RoleType;
|
||||
public Permission PermissionType;
|
||||
|
||||
public BasicPermission (RoleType pRoleType, Permission pPermissionType)
|
||||
{
|
||||
RoleType = pRoleType;
|
||||
PermissionType = pPermissionType;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
|
||||
|
||||
[Serializable]
|
||||
public class BasicPerson : IEmailPerson, IHasIdentity
|
||||
{
|
||||
public BasicPerson (string name, string email)
|
||||
{
|
||||
this.Name = name;
|
||||
this.Email = email;
|
||||
}
|
||||
|
||||
public BasicPerson (int personId, string passwordHash, string name, string email, string street,
|
||||
string postalCode, string cityName, int countryId, string phone, int geographyId,
|
||||
DateTime birthdate, PersonGender gender)
|
||||
{
|
||||
this.PersonId = personId;
|
||||
this.PasswordHash = passwordHash;
|
||||
this.Name = name;
|
||||
this.Email = email;
|
||||
this.Street = street;
|
||||
this.PostalCode = postalCode;
|
||||
this.CityName = cityName;
|
||||
this.CountryId = countryId;
|
||||
this.Phone = phone;
|
||||
this.GeographyId = geographyId;
|
||||
this.Birthdate = birthdate;
|
||||
this.Gender = gender;
|
||||
}
|
||||
|
||||
public BasicPerson (BasicPerson original)
|
||||
: this (original.PersonId, original.PasswordHash, original.Name, original.Email, original.Street,
|
||||
original.PostalCode, original.CityName, original.CountryId, original.Phone,
|
||||
original.GeographyId, original.Birthdate, original.Gender)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public bool IsMale
|
||||
{
|
||||
get { return Gender == PersonGender.Male; }
|
||||
}
|
||||
|
||||
public bool IsFemale
|
||||
{
|
||||
get { return Gender == PersonGender.Female; }
|
||||
}
|
||||
|
||||
|
||||
public int PersonId { get; private set; }
|
||||
public string Name { get; protected set; }
|
||||
public string Email { get; protected set; }
|
||||
public string Street { get; protected set; }
|
||||
public string PostalCode { get; protected set; }
|
||||
public string CityName { get; protected set; }
|
||||
public string Phone { get; protected set; }
|
||||
public DateTime Birthdate { get; protected set; }
|
||||
public string PasswordHash { get; protected set; }
|
||||
public int GeographyId { get; protected set; }
|
||||
public int CountryId { get; protected set; }
|
||||
public PersonGender Gender { get; protected set; }
|
||||
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return PersonId; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Activizr.Basic.Enums;
|
||||
using Activizr.Basic.Interfaces;
|
||||
|
||||
namespace Activizr.Basic.Types
|
||||
{
|
||||
public class BasicPersonRole : IHasIdentity
|
||||
{
|
||||
protected BasicPersonRole ()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Normal constructor.
|
||||
/// </summary>
|
||||
/// <param name="personId">The person Id.</param>
|
||||
/// <param name="roleType">The node-specific role.</param>
|
||||
/// <param name="organizationId">The organization Id.</param>
|
||||
/// <param name="geographyId">The node Id.</param>
|
||||
public BasicPersonRole (int roleId, int personId, RoleType type, int organizationId, int geographyId)
|
||||
{
|
||||
this.roleId = roleId;
|
||||
this.personId = personId;
|
||||
this.type = type;
|
||||
this.organizationId = organizationId;
|
||||
this.geographyId = geographyId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copy constructor.
|
||||
/// </summary>
|
||||
public BasicPersonRole (BasicPersonRole original)
|
||||
: this(original.roleId, original.personId, original.type, original.organizationId, original.geographyId)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public int RoleId
|
||||
{
|
||||
get { return this.roleId; }
|
||||
}
|
||||
|
||||
public int PersonId
|
||||
{
|
||||
get { return this.personId; }
|
||||
}
|
||||
|
||||
public RoleType Type
|
||||
{
|
||||
get { return this.type; }
|
||||
}
|
||||
|
||||
public int OrganizationId
|
||||
{
|
||||
get { return this.organizationId; }
|
||||
}
|
||||
|
||||
public int GeographyId
|
||||
{
|
||||
get { return this.geographyId; }
|
||||
}
|
||||
|
||||
private int roleId;
|
||||
private int personId;
|
||||
private RoleType type;
|
||||
private int organizationId;
|
||||
private int geographyId;
|
||||
|
||||
#region IHasIdentity Members
|
||||
|
||||
public int Identity
|
||||
{
|
||||
get { return this.RoleId; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user