Committing work at EOD
This commit is contained in:
+2
-2
@@ -29,7 +29,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>Activizr.Basic</AssemblyName>
|
||||
<AssemblyName>Swarmops.Basic</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>../Site/bin/</OutputPath>
|
||||
@@ -42,7 +42,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>Activizr.Basic</AssemblyName>
|
||||
<AssemblyName>Swarmops.Basic</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
||||
+10
-4
@@ -10,6 +10,8 @@ using System.Web;
|
||||
using System.Web.Mail;
|
||||
using Swarmops.Basic.Enums;
|
||||
using Swarmops.Basic;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Financial;
|
||||
using Swarmops.Logic.Swarm;
|
||||
using Swarmops.Logic.Structure;
|
||||
@@ -53,6 +55,8 @@ namespace Swarmops
|
||||
|
||||
// Utility.BotCode.EventProcessor.Run();
|
||||
|
||||
OutboundComm.CreateNotification(null, NotificationResource.System_Startup);
|
||||
|
||||
Console.WriteLine(string.Empty);
|
||||
Console.Write("Waiting for mail queue to flush... ");
|
||||
|
||||
@@ -1174,6 +1178,7 @@ namespace Swarmops
|
||||
|
||||
static void PopulateCountries()
|
||||
{
|
||||
/*
|
||||
SwarmDb database = SwarmDb.GetDatabase();
|
||||
|
||||
using (StreamReader reader = new StreamReader("C:\\Countries.txt"))
|
||||
@@ -1190,7 +1195,7 @@ namespace Swarmops
|
||||
|
||||
line = reader.ReadLine();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
static void InviteManyNodesToUP(int[] nodeIds, int organizationId)
|
||||
@@ -1285,6 +1290,7 @@ namespace Swarmops
|
||||
|
||||
static void SendNewsletter()
|
||||
{
|
||||
/*
|
||||
SwarmDb database = SwarmDb.GetDatabase();
|
||||
|
||||
int[] subscriberIds = database.GetSubscribersForNewsletterFeed(2);
|
||||
@@ -1296,11 +1302,11 @@ namespace Swarmops
|
||||
@"H:\Data\Piratpartiet\MailTemplates\PP-Newsletter\Template.txt",
|
||||
subscribers).
|
||||
Send();
|
||||
return;
|
||||
return;*/
|
||||
}
|
||||
|
||||
static void ImportReporters()
|
||||
{
|
||||
{/*
|
||||
string fileName = @"C:\Documents and Settings\rick\Desktop\reportrar.txt";
|
||||
SwarmDb database = SwarmDb.GetDatabase();
|
||||
|
||||
@@ -1330,7 +1336,7 @@ namespace Swarmops
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AssemblyName>Activizr.Console</AssemblyName>
|
||||
<AssemblyName>Swarmops.Console</AssemblyName>
|
||||
<ApplicationIcon>./App.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
@@ -45,9 +45,12 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AssemblyName>Activizr.Console</AssemblyName>
|
||||
<AssemblyName>Swarmops.Console</AssemblyName>
|
||||
<ApplicationIcon>./App.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>Swarmops.BotConsole</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
|
||||
@@ -82,7 +82,9 @@ namespace Swarmops.Database
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(Configuration));
|
||||
|
||||
using (FileStream readFileStream = new FileStream(GetConfigurationFileName(), FileMode.Open, FileAccess.Read, FileShare.Read))
|
||||
string configFileName = GetConfigurationFileName();
|
||||
|
||||
using (FileStream readFileStream = new FileStream(configFileName, FileMode.Open, FileAccess.Read, FileShare.Read))
|
||||
{
|
||||
|
||||
_configuration = (Configuration) serializer.Deserialize(readFileStream);
|
||||
@@ -103,21 +105,31 @@ namespace Swarmops.Database
|
||||
|
||||
public static string GetConfigurationFileName()
|
||||
{
|
||||
// If we're running in a HTTP context on Windows, use the path mapper, as we're in a web process.
|
||||
// Otherwise, use a relative path from the binary.
|
||||
// Four possibilities here. Debug environment on Windows (dev), Console environment on Windows (dev),
|
||||
// Console/daemon production environment and web production environment.
|
||||
|
||||
if (HttpContext.Current != null && Path.DirectorySeparatorChar != '/')
|
||||
{
|
||||
// Web process, so use MapPath
|
||||
// In both production environments, we should use /etc/swarmops/database.config.
|
||||
// In dev Web, we should use ~/database.config.
|
||||
// In dev console, we should use database.config.
|
||||
|
||||
return HttpContext.Current.Server.MapPath("~/database.config");
|
||||
}
|
||||
else
|
||||
if (Path.DirectorySeparatorChar == '/')
|
||||
{
|
||||
// Production process - just use the simple filename
|
||||
|
||||
return "/etc/swarmops/database.config";
|
||||
}
|
||||
else if (HttpContext.Current != null)
|
||||
{
|
||||
// Dev web process
|
||||
|
||||
return HttpContext.Current.Server.MapPath ("~/database.config");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Dev console process
|
||||
|
||||
return "database.config"; // Each dev needs to set the working directory to the Console directory when debugging
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>Activizr.Database</AssemblyName>
|
||||
<AssemblyName>Swarmops.Database</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>../Site/bin/</OutputPath>
|
||||
@@ -42,7 +42,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>Activizr.Database</AssemblyName>
|
||||
<AssemblyName>Swarmops.Database</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MySql.Data">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>Activizr.Interface</AssemblyName>
|
||||
<AssemblyName>Swarmops.Interface</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>../Site/bin/</OutputPath>
|
||||
@@ -42,7 +42,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>Activizr.Interface</AssemblyName>
|
||||
<AssemblyName>Swarmops.Interface</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
||||
@@ -11,19 +11,27 @@ namespace Swarmops.Logic.Communications.Transmission
|
||||
[Serializable]
|
||||
public class NotificationPayload: PayloadBase<NotificationPayload>, ICommsRenderer
|
||||
{
|
||||
[Obsolete("Do not use this direct constructor. It is intended for XML serialization only. Therefore, you're getting a compile-time error.", true)]
|
||||
public NotificationPayload()
|
||||
{
|
||||
// empty ctor, for XML reflection
|
||||
// empty ctor, for XML reflection. Do not use.
|
||||
}
|
||||
|
||||
public NotificationPayload (string notificationResource)
|
||||
public NotificationPayload(string notificationResource): this (notificationResource, new NotificationStrings())
|
||||
{
|
||||
// redirect to main ctor
|
||||
}
|
||||
|
||||
public NotificationPayload (string notificationResource, NotificationStrings strings)
|
||||
{
|
||||
this.SubjectResource = "Notifications_" + notificationResource + "_Subject";
|
||||
this.BodyResource = "Notifications_" + notificationResource + "_Body";
|
||||
this.Strings = strings;
|
||||
}
|
||||
|
||||
public string SubjectResource { get; set; }
|
||||
public string BodyResource { get; set; }
|
||||
public NotificationStrings Strings { get; set; }
|
||||
|
||||
public string GetSubject()
|
||||
{
|
||||
@@ -73,4 +81,27 @@ namespace Swarmops.Logic.Communications.Transmission
|
||||
}
|
||||
|
||||
// ReSharper restore InconsistentNaming
|
||||
|
||||
public enum NotificationString
|
||||
{
|
||||
Unknown=0,
|
||||
ConcernedPersonName,
|
||||
ActingPersonName,
|
||||
TertiaryPersonName,
|
||||
OrganizationName,
|
||||
DateTime,
|
||||
DateTimeExpiry,
|
||||
BudgetName,
|
||||
BudgetAmountFloat,
|
||||
EmbeddedPreformattedList,
|
||||
HostName,
|
||||
SwarmopsVersion
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class NotificationStrings: Dictionary<NotificationString, string>
|
||||
{
|
||||
// typeset
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>Activizr.Logic</AssemblyName>
|
||||
<AssemblyName>Swarmops.Logic</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>../Site/bin/</OutputPath>
|
||||
@@ -42,7 +42,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>Activizr.Logic</AssemblyName>
|
||||
<AssemblyName>Swarmops.Logic</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="HtmlAgilityPack">
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
<OutputPath>.\Debug</OutputPath>
|
||||
<EnableUpdateable>true</EnableUpdateable>
|
||||
<UseMerge>true</UseMerge>
|
||||
<SingleAssemblyName>Site5-Deployment</SingleAssemblyName>
|
||||
<SingleAssemblyName>Swarmops.Site</SingleAssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<OutputPath>.\Release</OutputPath>
|
||||
<EnableUpdateable>true</EnableUpdateable>
|
||||
<UseMerge>true</UseMerge>
|
||||
<SingleAssemblyName>Activizr.Site</SingleAssemblyName>
|
||||
<SingleAssemblyName>Swarmops.Site</SingleAssemblyName>
|
||||
<DeleteAppCodeCompiledFiles>true</DeleteAppCodeCompiledFiles>
|
||||
<DeleteAppDataFolder>true</DeleteAppDataFolder>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -12,6 +12,8 @@ using Swarmops.Logic.Security;
|
||||
using Swarmops.Logic.Structure;
|
||||
using Telerik.Web.UI;
|
||||
using Membership = Swarmops.Logic.Swarm.Membership;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
|
||||
namespace Swarmops
|
||||
{
|
||||
@@ -34,6 +36,9 @@ namespace Swarmops
|
||||
_currentUser = Person.FromIdentity(currentUserId);
|
||||
_authority = _currentUser.GetAuthority();
|
||||
_currentOrganization = Organization.FromIdentity(currentOrganizationId);
|
||||
|
||||
OutboundComm.CreateNotification(null, NotificationResource.System_Startup);
|
||||
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
|
||||
@@ -380,7 +380,7 @@
|
||||
<telerik:RadMenuItem runat="server" Text="XYZ Ledgers" Permission="All" UserLevel="3" GlobalResourceKey="Menu5_Ledgers">
|
||||
<Items>
|
||||
<telerik:RadMenuItem runat="server" Text="XYZ Balance Sheet" Permission="All" UserLevel="3" GlobalResourceKey="Menu5_Ledgers_BalanceSheet" />
|
||||
<telerik:RadMenuItem runat="server" Text="XYZ Result Sheet" Permission="All" UserLevel="3" GlobalResourceKey="Menu5_Ledgers_ResultSheet" />
|
||||
<telerik:RadMenuItem runat="server" Text="XYZ Result Sheet" Permission="All" UserLevel="3" GlobalResourceKey="Menu5_Ledgers_ProfitLossStatement" />
|
||||
<telerik:RadMenuItem runat="server" IsSeparator="true" UserLevel="3" />
|
||||
<telerik:RadMenuItem runat="server" Text="XYZ Audit Ledgers" Permission="EconomyDetail:Read" UserLevel="3" GlobalResourceKey="Menu5_Ledgers_AuditLedgers" />
|
||||
<telerik:RadMenuItem runat="server" Text="XYZ Account Plan" Permission="Economy:Read" UserLevel="3" GlobalResourceKey="Menu5_Ledgers_AccountPlan" />
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ EndProject
|
||||
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Site5", "Site5\", "{367F36EA-AE1C-4E15-BAF9-BA75B18B3807}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
TargetFrameworkMoniker = ".NETFramework,Version%3Dv3.5"
|
||||
ProjectReferences = "{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}|Activizr.Database.dll;{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}|Activizr.Basic.dll;{13E59551-34AC-43DC-9A03-EF5E4721DC61}|Activizr.Logic.dll;{BA24FAF7-D518-49E8-952A-45595682877E}|Activizr.Interface.dll;"
|
||||
ProjectReferences = "{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}|Swarmops.Database.dll;{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}|Swarmops.Basic.dll;{13E59551-34AC-43DC-9A03-EF5E4721DC61}|Swarmops.Logic.dll;{BA24FAF7-D518-49E8-952A-45595682877E}|Swarmops.Interface.dll;"
|
||||
Debug.AspNetCompiler.VirtualPath = "/Site5"
|
||||
Debug.AspNetCompiler.PhysicalPath = "Site5\"
|
||||
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Site5\"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>Activizr.Utility</AssemblyName>
|
||||
<AssemblyName>Swarmops.Utility</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>../Site/bin/</OutputPath>
|
||||
@@ -42,7 +42,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>Activizr.Utility</AssemblyName>
|
||||
<AssemblyName>Swarmops.Utility</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="adodb, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
|
||||
Reference in New Issue
Block a user