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; }
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(); } }
public void UpdateRoomGroup(int userId, string token, YoYoStudio.Model.Chat.RoomGroup roomGroup) { client.UpdateRoomGroup(application_Id, userId, token, roomGroup); }
public YoYoStudio.Model.Chat.RoomGroup AddRoomGroup(int userId, string token, YoYoStudio.Model.Chat.RoomGroup roomGroup) { return(client.AddRoomGroup(application_Id, userId, token, roomGroup)); }
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; } }