/// <summary>
 /// You implement this method in order to save the fields you want, I would use reflection for this but fu
 /// </summary>
 /// <param name="p"> Da person you want to copy</param>
 protected abstract void CopyPerson(Person p);
 public PersonPublicKnowledgeViewModel(Person p)
     : base(p)
 {
 }
 public PersonViewModel(Person p)
 {
     CopyPerson(p);
 }
Example #4
0
        public static Person generateRandomPerson()
        {
            //int seed = 10196;
            string FirstName = RandomCharacters(ref randy);
            string LastName = RandomCharacters( ref randy);

            byte Age = 21;
            Age = randomByte();
            if (Age == 21)
            {
                //wasnt random
            }
            string StreetAddress = RandomCharacters(ref  randy);
            int SSN = randy.Next(99999999);
            string City = "Riverside";
            State_USA State = State_USA.Alabama;

            Person p = new Person(FirstName, LastName, Age, SSN, StreetAddress, City, State);

            return p;
        }