public BlockTypeModel(BlockType blockType) : base(blockType) { if (blockType != null) { Name = blockType.Name; Days = blockType.Days; Description = blockType.Description; } }
public void UpdateBlockType(int appid, int userId, string token, BlockType blockType) { try { CheckToken(appid, userId, token); CheckCommand(appid, BuiltIns.AllApplication.Id, userId, BuiltIns.BlockTypeCommand.Id, BuiltIns.AllRole.Id); modelAccesser.Update(blockType); } catch (Exception) { throw new DatabaseException(); } }
public BlockType GetBlockType(int appid, int userId, string token, int id) { try { CheckToken(appid, userId, token); BlockType t = new BlockType { Id = id }; modelAccesser.Get<BlockType>(t); return t.Loaded ? t : null; } catch (Exception) { throw new DatabaseException(); } }
public void UpdateBlockType(int userId, string token, YoYoStudio.Model.Core.BlockType blockType) { client.UpdateBlockType(application_Id, userId, token, blockType); }
public YoYoStudio.Model.Core.BlockType AddBlockType(int userId, string token, YoYoStudio.Model.Core.BlockType blockType) { return(client.AddBlockType(application_Id, userId, token, blockType)); }