Add Person almost finished

This commit is contained in:
Rick Falkvinge
2014-12-08 01:10:52 +01:00
parent 3b29ba7c7d
commit 24d75fa23b
3 changed files with 6 additions and 17 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ namespace Swarmops.Logic.Communications
OutboundComm comm = OutboundComm.Create (null, null, membership.Organization,
CommResolverClass.Unknown, null,
CommTransmitterClass.CommsTransmitterMail,
new ParticipantMailPayload (mailType, membership, actingPerson).ToXml(),
new PayloadEnvelope (new ParticipantMailPayload (mailType, membership, actingPerson)).ToXml(),
OutboundCommPriority.Low);
foreach (Person person in recipients)
+1 -1
View File
@@ -141,7 +141,7 @@
<comment>"Legal" to cut short discussions on 50 different genders for the time being</comment>
</data>
<data name="AddPerson_PersonSuccessfullyRegistered" xml:space="preserve">
<value>The person was successfully added to the organization.</value>
<value>The person was successfully added to the organization. A welcome mail has been sent.</value>
</data>
<data name="AddPerson_StatisticalData" xml:space="preserve">
<value>Statistical Data</value>
+4 -15
View File
@@ -100,27 +100,16 @@ namespace Swarmops.Frontend.Pages.v5.Swarm
protected void ButtonSubmit_Click (object sender, EventArgs e)
{
/*
// TODO: Parse birthdate
Person newPerson = Person.Create (this.TextName.Text, this.TextMail.Text, string.Empty, this.TextPhone.Text,
this.TextStreet1.Text + this.TextStreet2.Text,
this.TextPostal.Text, this.TextCity.Text, this.DropCountries.SelectedValue, DateTime.UtcNow,
PersonGender.Unknown);
(PersonGender)Enum.Parse(typeof(PersonGender), this.DropGenders.SelectedValue));
Membership newMembership = Membership.Create (newPerson, CurrentOrganization, DateTime.Today.AddYears (1));
PayloadEnvelope envelope = new PayloadEnvelope();
ParticipantMailPayload payload = new ParticipantMailPayload(ParticipantMailType.MemberAddedWelcome, newMembership, CurrentUser);
envelope.PayloadXml = payload.ToXml();
envelope.PayloadClass = payload.GetType().ToString();
Assembly assembly = typeof (PayloadEnvelope).Assembly;
Type payloadType = assembly.GetType (envelope.PayloadClass);
var methodInfo = payloadType.GetMethod("FromXml", BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
ICommsRenderer renderer = (ICommsRenderer)(methodInfo.Invoke (null, new object[] { envelope.PayloadXml }));
*/
OutboundComm.CreateMembershipLetter (ParticipantMailType.MemberAddedWelcome, newMembership, CurrentUser);
// Person.Create()