object DMDB: TDMDB
  OldCreateOrder = False
  OnCreate = DataModuleCreate
  OnDestroy = DataModuleDestroy
  Height = 401
  Width = 642
  object qSelect: TFDQuery
    SQL.Strings = (
      'SELECT * FROM treeview_db.tree order by `index`;')
    Left = 160
    Top = 32
  end
  object qInsert: TFDQuery
    SQL.Strings = (
      
        'INSERT INTO `treeview_db`.`tree` (`IdParent`, `Name`, `Index`,`i' +
        'sChecked`,`Level`) VALUES (:idParent, :name, :index,:isChecked,:' +
        'Level);'#10)
    Left = 208
    Top = 64
    ParamData = <
      item
        Name = 'IDPARENT'
        ParamType = ptInput
      end
      item
        Name = 'NAME'
        ParamType = ptInput
      end
      item
        Name = 'INDEX'
        ParamType = ptInput
      end
      item
        Name = 'ISCHECKED'
        ParamType = ptInput
      end
      item
        Name = 'LEVEL'
        ParamType = ptInput
      end>
  end
  object qEdit: TFDQuery
    SQL.Strings = (
      'UPDATE TREE SET Name=:Name WHERE id=:id;')
    Left = 272
    Top = 72
    ParamData = <
      item
        Name = 'NAME'
        ParamType = ptInput
      end
      item
        Name = 'ID'
        ParamType = ptInput
      end>
  end
  object qDelete: TFDQuery
    SQL.Strings = (
      ''
      'DELETE FROM `treeview_db`.`tree` WHERE `id`=:id;')
    Left = 336
    Top = 88
    ParamData = <
      item
        Name = 'ID'
        ParamType = ptInput
      end>
  end
  object qGetKey: TFDQuery
    SQL.Strings = (
      'SELECT Max(id) as newkey FROM treeview_db.tree;')
    Left = 400
    Top = 104
  end
  object FDConnection: TFDConnection
    Left = 24
    Top = 80
  end
  object FDPhysMySQLDriverLink: TFDPhysMySQLDriverLink
    Left = 48
    Top = 144
  end
  object qEditIndex: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      'UPDATE `treeview_db`.`tree` SET `Index`=:Index WHERE `id`=:id;'#10
      ''
      '')
    Left = 464
    Top = 136
    ParamData = <
      item
        Name = 'INDEX'
        ParamType = ptInput
      end
      item
        Name = 'ID'
        ParamType = ptInput
      end>
  end
  object qEditParentKey: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      
        'UPDATE `treeview_db`.`tree` SET `idParent`=:idParent WHERE `id`=' +
        ':id;'#10
      ''
      '')
    Left = 528
    Top = 168
    ParamData = <
      item
        Name = 'IDPARENT'
        ParamType = ptInput
      end
      item
        Name = 'ID'
        ParamType = ptInput
      end>
  end
  object qCheckedUpdate: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      
        'UPDATE `treeview_db`.`tree` SET `IsChecked`=:IsChecked WHERE `id' +
        '`=:id;'#10)
    Left = 272
    Top = 136
    ParamData = <
      item
        Name = 'ISCHECKED'
        ParamType = ptInput
      end
      item
        Name = 'ID'
        ParamType = ptInput
      end>
  end
  object qExpanded: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      
        'UPDATE `treeview_db`.`tree` SET `IsExpanded`=:IsExpanded WHERE `' +
        'id`=:id;'#10)
    Left = 272
    Top = 192
    ParamData = <
      item
        Name = 'ISEXPANDED'
        ParamType = ptInput
      end
      item
        Name = 'ID'
        ParamType = ptInput
      end>
  end
  object FDGUIxWaitCursor1: TFDGUIxWaitCursor
    Provider = 'Forms'
    ScreenCursor = gcrNone
    Left = 32
    Top = 208
  end
  object qLevels: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      'UPDATE `treeview_db`.`tree` SET `Level`=:Level WHERE `id`=:id;'#10)
    Left = 272
    Top = 256
    ParamData = <
      item
        Name = 'LEVEL'
        ParamType = ptInput
      end
      item
        Name = 'ID'
        ParamType = ptInput
      end>
  end
  object qMaxLevel: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      'SELECT Max(Level) as MaxLevel FROM treeview_db.tree;')
    Left = 400
    Top = 208
  end
  object qSelectChildren: TFDQuery
    Connection = FDConnection
    SQL.Strings = (
      'SELECT*FROM treeview_db.tree where idParent=:idCurrentRecord;')
    Left = 160
    Top = 120
    ParamData = <
      item
        Name = 'IDCURRENTRECORD'
        ParamType = ptInput
      end>
  end
end
