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