예제 #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);
예제 #7
0
 private void detach_Relations(Relation entity)
 {
     this.SendPropertyChanging();
     entity.user = null;
 }
예제 #8
0
 private void attach_Relations(Relation entity)
 {
     this.SendPropertyChanging();
     entity.user = this;
 }
예제 #9
0
 partial void DeleteRelation(Relation instance);
예제 #10
0
 partial void UpdateRelation(Relation instance);
예제 #11
0
 partial void InsertRelation(Relation instance);