Removing unused code and some cleanup.

This commit is contained in:
berinder
2014-10-04 15:09:54 +02:00
parent 99999be24e
commit 2712d36916
15 changed files with 9 additions and 82 deletions
+2 -7
View File
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Text;
using Swarmops.Basic.Interfaces;
namespace Swarmops.Basic.Types
@@ -12,10 +9,8 @@ namespace Swarmops.Basic.Types
this.validationRunId = validationRunId;
}
private int validationRunId;
private bool complete;
private int addressCount;
private readonly int validationRunId;
public int Identity
{
get { return this.validationRunId; }
Executable → Regular
View File
+1 -5
View File
@@ -1,10 +1,6 @@
using System.Text;
using System.Data;
using System;
using System.Collections.Generic;
using System;
using System.Data;
using System.Data.Common;
using System.Text;
namespace Swarmops.Database
{
+1 -5
View File
@@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.Text;
using Swarmops.Basic;
using Swarmops.Logic.Structure;
namespace Swarmops.Logic.Swarm
@@ -31,6 +27,6 @@ namespace Swarmops.Logic.Swarm
}
}
private int organizationId;
private readonly int organizationId;
}
}
+1 -1
View File
@@ -181,7 +181,7 @@ namespace Swarmops.Logic.Swarm
}
public new virtual string Mail
public virtual string Mail
{
get { return base.Email; }
set { SwarmDb.GetDatabaseForWriting().SetPersonEmail(Identity, value); }
+1 -1
View File
@@ -57,7 +57,7 @@ public class FieldValidation : System.Web.Services.WebService {
{
culture = CultureInfo.CreateSpecificCulture(preferredCulture);
}
catch (Exception exception)
catch (Exception)
{
culture = CultureInfo.InvariantCulture;
}
+2 -2
View File
@@ -41,12 +41,12 @@ namespace Swarmops.Frontend.Automation
#region IHttpHandler Members
public bool IsReusable
public new bool IsReusable
{
get { return false; }
}
public void ProcessRequest (HttpContext context)
public new void ProcessRequest (HttpContext context)
{
context.Response.AddHeader ("Pragma", "no-cache");
context.Response.AddHeader ("Cache-Control", "private, no-cache");
-2
View File
@@ -175,8 +175,6 @@ namespace Swarmops
}
}
private static string _buildIdentity;
private void Localize()
{
this.LabelSidebarInfo.Text = Resources.Global.Sidebar_Information;
@@ -39,9 +39,6 @@ namespace Swarmops.Frontend.Pages.Financial
{
StringBuilder result = new StringBuilder(16384);
string hasDoxString =
"<img src=\\\"/Images/PageIcons/iconshock-battery-drill-16px.png\\\" onmouseover=\\\"this.src='/Images/PageIcons/iconshock-battery-drill-16px.png';\\\" onmouseout=\\\"this.src='/Images/PageIcons/iconshock-battery-drill-16px.png';\\\" onclick=\\\"alert('Under construction');\\\" style=\\\"cursor:pointer\\\" />";
result.Append("{\"rows\":[");
DateTime today = DateTime.Today;
@@ -48,31 +48,8 @@ namespace Swarmops.Frontend.Pages.v5.Financial
}
private Dictionary<int, bool> _attestationRights;
private List<RepeatedDocument> _documentList;
private Dictionary<int, bool> GetAttestationRights()
{
// Right now, this function is quite primitive. At some point in the future, it needs to take into
// account that a budget may have several attesters. Right now, it just loops over all accounts and
// checks the owner.
Dictionary<int, bool> result = new Dictionary<int, bool>();
FinancialAccounts accounts = FinancialAccounts.ForOrganization(this.CurrentOrganization);
foreach (FinancialAccount account in accounts)
{
if (account.OwnerPersonId == this.CurrentUser.Identity)
{
result[account.Identity] = true;
}
}
return result;
}
private void Localize()
{
this.PageTitle = Resources.Pages.Financial.ValidateReceipts_PageTitle;
@@ -120,7 +97,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
};
[WebMethod]
public static string Validate (string identifier)
public static new string Validate (string identifier)
{
identifier = HttpUtility.UrlDecode(identifier);
@@ -68,7 +68,6 @@ public partial class Pages_v5_Ledgers_Csv_BalanceData : DataV5Base
private int _year = 2012;
private CultureInfo _renderCulture;
private void RecurseCsvReport(List<YearlyReportLine> reportLines, string accountPrefix)
{
@@ -77,7 +77,6 @@ public partial class Pages_v5_Ledgers_Csv_ProfitLossData : DataV5Base
private int _year = 2012;
private CultureInfo _renderCulture;
private void RecurseCsvReport (List<YearlyReportLine> reportLines, string accountPrefix)
{
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Swarmops.Basic.Enums;
using Swarmops.Logic.Financial;
using Swarmops.Logic.Security;
@@ -125,18 +121,6 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
return String.Join(",", childStrings.ToArray());
}
private class DisplayedAccount
{
public string Name;
public int Identity;
};
private class DisplayedAccounts : List<DisplayedAccount>
{
// typedef
};
private Dictionary<int, List<FinancialAccount>> _treeMap;
private Dictionary<int, Int64> _singleBalanceLookup;
private Dictionary<int, Int64> _treeBalanceLookup;
private Dictionary<int, Int64> _singleBudgetLookup;
@@ -214,18 +214,6 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
return String.Join(",", childStrings.ToArray());
}
private class DisplayedAccount
{
public string Name;
public int Identity;
};
private class DisplayedAccounts : List<DisplayedAccount>
{
// typedef
};
private Dictionary<int, List<FinancialAccount>> _treeMap;
private Dictionary<int, Int64> _singleBalanceLookup;
private Dictionary<int, Int64> _treeBalanceLookup;
private Dictionary<int, Int64> _singleBudgetLookup;
-2
View File
@@ -390,8 +390,6 @@ namespace Swarmops.Utility.BotCode
// NEW December 2010: Organizations are separated as per common agreement, there are no common reminder mails. Every membership renews on its own.
int longestAncestry = 0; // "ancestry" as a length means distance to organization tree root
int shortestAncestry = 999;
Organization lowOrg = membership.Organization;
DateTime currentExpiry = membership.Expires;
Person person = membership.Person;