public RoomGroupViewModel(RoomGroup rg)
     : base(rg)
 {
     name.SetValue(rg.Name);
     ParentRoomGroupId = rg.ParentGroup_Id.HasValue ? rg.ParentGroup_Id.Value : -1;
     Enabled = rg.Enabled.HasValue ? rg.Enabled.Value : false;
 }
示例#2
0
 public RoomGroup GetRoomGroup(int appid, int userId, string token, int id)
 {
     try
     {
         CheckToken(appid, userId, token);
         RoomGroup roomGroup = new RoomGroup { Id = id };
         modelAccesser.Get(roomGroup);
         return roomGroup.Loaded ? roomGroup : null;
     }
     catch (Exception)
     {
         throw new DatabaseException();
     }
 }
示例#3
0
 public void UpdateRoomGroup(int userId, string token, YoYoStudio.Model.Chat.RoomGroup roomGroup)
 {
     client.UpdateRoomGroup(application_Id, userId, token, roomGroup);
 }
示例#4
0
 public YoYoStudio.Model.Chat.RoomGroup AddRoomGroup(int userId, string token, YoYoStudio.Model.Chat.RoomGroup roomGroup)
 {
     return(client.AddRoomGroup(application_Id, userId, token, roomGroup));
 }
示例#5
0
 public RoomGroupModel(RoomGroup roomG)
     : base(roomG)
 {
     if (roomG != null)
     {
         Name = roomG.Name;
         Description = roomG.Description;
         ParentGroup_Id = roomG.ParentGroup_Id;
         Enabled = (roomG.Enabled.HasValue && roomG.Enabled.Value)?1:0;
     }
 }