Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Corrected name function, it's now Forename Surname, instead of Surnam…

…e, Forename
  • Loading branch information...
commit cc241005fdc585a9ac36b62d1d277ffb260bfd84 1 parent bd55648
@sundhaug92 authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 itsLib/Person.cs
View
4 itsLib/Person.cs
@@ -50,7 +50,9 @@ public static Person fromUid(Session sess, uint Uid)
Name = Name.Substring(0, Name.IndexOf('('));
}
while (Name.EndsWith(" ")) Name = Name.Substring(0, Name.Length - 1);
- return new Person(sess.Customer, Name);
+ string Forename = Name.Substring(Name.IndexOf(", ") + ", ".Length);
+ string Surname = Name.Substring(0, Name.IndexOf(", "));
+ return new Person(sess.Customer, Forename + " " + Surname);
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.