Esempio n. 1
0
 public User(BitmapImage Image, eGender PersonGender, string First, string Last, DateTime DateOfBitrh,
             eRelationshipStatus RelationshipStatus, string School = null, string University = null) :
     this(PersonGender, First, Last, DateOfBitrh, RelationshipStatus, School, University)
 {
     Activate();
     News.UserPosts.Add(new NewsItem(this, Image));
 }
Esempio n. 2
0
 public Person(eGender PersonGender, string First, string Last, DateTime DateOfBirth,
               eRelationshipStatus RelationshipStatus, string School = null, string University = null)
 {
     this.PersonGender       = PersonGender;
     this.First              = First;
     this.Last               = Last;
     this.DateOfBirth        = DateOfBirth;
     this.RelationshipStatus = RelationshipStatus;
     this.School             = School;
     this.University         = University;
 }
Esempio n. 3
0
 private static Relationship[] Fetch(string fromUsername, string toUsername, eRelationshipStatus? type, bool? accepted)
 {
     using (var db = new AspNetDatingDataContext())
     {
         var relationships = (from r in db.Relationships
                             where (fromUsername == null || r.u_username == fromUsername)
                                     && (toUsername == null || r.r_username == toUsername)
                                     && (!type.HasValue || (eRelationshipStatus?) r.r_type == type)
                                     && (!accepted.HasValue || r.r_accepted == accepted)
                             select new Relationship
                                        {
                                            id = r.r_id,
                                            fromUsername = r.u_username,
                                            toUsername = r.r_username,
                                            accepted = r.r_accepted,
                                            timestamp = r.r_timestamp,
                                            type = (eRelationshipStatus) r.r_type,
                                            pendingType = (eRelationshipStatus) r.r_pendingtype
                                        });
         return relationships.ToArray();
     }
 }
Esempio n. 4
0
        public static string GetRelationshipStatusString(eRelationshipStatus type)
        {
            string result = String.Empty;
            switch (type)
            {
                case eRelationshipStatus.Engaged:
                    result = "Engaged".Translate();
                    break;
                case eRelationshipStatus.InAnOpenRelationship:
                    result = "In an open relationship".Translate();
                    break;
                case eRelationshipStatus.InRelationship:
                    result = "In a relationship".Translate();
                    break;
                case eRelationshipStatus.ItIsComplicated:
                    result = "It's complicated".Translate();
                    break;
                case eRelationshipStatus.Married:
                    result = "Married".Translate();
                    break;
                case eRelationshipStatus.Single:
                    result = "Single".Translate();
                    break;
            }

            return result;
        }
Esempio n. 5
0
 public User(eGender PersonGender, string First, string Last, DateTime DateOfBitrh,
             eRelationshipStatus RelationshipStatus, string School = null, string University = null) :
     base(PersonGender, First, Last, DateOfBitrh, RelationshipStatus, School, University)
 {
     Activate();
 }