Example #1
0
 public BlockTypeModel(BlockType blockType)
     : base(blockType)
 {
     if (blockType != null)
     {
         Name = blockType.Name;
         Days = blockType.Days;
         Description = blockType.Description;
     }
 }
Example #2
0
 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();
     }
 }
Example #3
0
 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();
     }
 }
Example #4
0
 public void UpdateBlockType(int userId, string token, YoYoStudio.Model.Core.BlockType blockType)
 {
     client.UpdateBlockType(application_Id, userId, token, blockType);
 }
Example #5
0
 public YoYoStudio.Model.Core.BlockType AddBlockType(int userId, string token, YoYoStudio.Model.Core.BlockType blockType)
 {
     return(client.AddBlockType(application_Id, userId, token, blockType));
 }