/// <summary> /// 头像点击详情 /// </summary> /// <param name="para">参数</param> private void AvatorDetial(string para) { DataofMember dm = DisplayRoom.members.FirstOrDefault(m => m.userId == Applicate.MyAccount.userId); if (GroupItem.Jid.Length > 15 && DisplayRoom.allowSendCard == 0) { if (DisplayRoom.userId.ToString() != Applicate.MyAccount.userId) { return; } } if (para.Length > 15) { var tmpRoom = new Room().GetRoomIdByJid(para); //获取 GroupChatDetial.GetWindow().Show(); Messenger.Default.Send(tmpRoom, GroupDetialViewModel.InitialGroupDetial); //初始化群组 GroupChatDetial.GetWindow().Activate(); } else { if (Applicate.MyAccount.userId != para) // 点自己的头像不做操作 { if (para == "10001") { //新的好友不显示个人资料 } else { Messenger.Default.Send(para, UserDetailNotifications.ShowUserDetial); UserDetailView.GetWindow().Show(); } } } }
public DataofMember GetModel() { using (var DBContext = new SQLiteDBContext()) { //var result = ( // from RoomMember in DBContext.RoomMembers // where RoomMember.groupid == this.groupid // && RoomMember.userId == this.userId // select RoomMember // ).FirstOrDefault(); //return result; DbRawSqlQuery <DataofMember> queue = DBContext.Database.SqlQuery <DataofMember>("SELECT * FROM RoomMember WHERE userId = '" + this.userId + "' and groupid='" + this.groupid + "'"); DataofMember obj = queue.FirstOrDefault(); return(obj); } }
public DataofMember toModel(string strJson) { DataofMember msgObj = JsonConvert.DeserializeObject <DataofMember>(strJson); return(msgObj); }
public JsonRoomMember() { data = new DataofMember(); }