Example #1
0
        public void AddFriend(string Username, string Friend)
        {
            User NewUser = this.GetUserByUsername(Username);
            User NewFriend = this.GetUserByUsername(Friend);
            Relation RL = new Relation();
            RL.Userid = NewUser.userid;
            RL.FriendId = NewFriend.userid;
            DB.Relations.InsertOnSubmit(RL);
            DB.SubmitChanges();

            Relation RL1 = new Relation();
            RL1.Userid = NewFriend.userid;
            RL1.FriendId = NewUser.userid;
            DB.Relations.InsertOnSubmit(RL1);
            DB.SubmitChanges();
            if (ClientCallBacks.ContainsKey(Friend))
            {
                ClientCallBacks[Friend].UserLoggedin(Username);
            }
        }
		private void detach_Relations(Relation entity)
		{
			this.SendPropertyChanging();
			entity.user = null;
		}
		private void attach_Relations(Relation entity)
		{
			this.SendPropertyChanging();
			entity.user = this;
		}
 partial void DeleteRelation(Relation instance);
 partial void UpdateRelation(Relation instance);
 partial void InsertRelation(Relation instance);
Example #7
0
 private void detach_Relations(Relation entity)
 {
     this.SendPropertyChanging();
     entity.user = null;
 }
Example #8
0
 private void attach_Relations(Relation entity)
 {
     this.SendPropertyChanging();
     entity.user = this;
 }
Example #9
0
 partial void DeleteRelation(Relation instance);
Example #10
0
 partial void UpdateRelation(Relation instance);
Example #11
0
 partial void InsertRelation(Relation instance);