object srvLogin: TsrvLogin
  OldCreateOrder = True
  OnCreate = DARemoteServiceCreate
  AcquireConnection = True
  ConnectionName = 'IBX'
  ServiceSchema = schLogin
  ServiceAdapter = DABINAdapter
  OnBeforeAcquireConnection = DARemoteServiceBeforeAcquireConnection
  Height = 300
  Width = 300
  object schLogin: TDASchema
    ConnectionManager = dmServer.ConnectionManager
    Datasets = <
      item
        Params = <
          item
            Name = 'ID_USUARIO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            SQL = 
              'SELECT '#10'    ID_EMPRESA'#10'  FROM'#10'    EMPRESAS_USUARIOS'#10'  WHERE ID_U' +
              'SUARIO = :ID_USUARIO'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID_EMPRESA'
                TableField = 'ID_EMPRESA'
              end>
          end>
        Name = 'EmpresasUsuario'
        Fields = <
          item
            Name = 'ID_EMPRESA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'ID_USUARIO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            SQL = 
              'SELECT '#10'    PERFILES.PERFIL'#10'  FROM'#10'    PERFILES, PERFILES_USUARI' +
              'OS'#10'  WHERE PERFILES_USUARIOS.ID_USUARIO = :ID_USUARIO'#10'  AND PERF' +
              'ILES.ID = PERFILES_USUARIOS.ID_PERFIL'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'PERFIL'
                TableField = 'PERFIL'
              end>
          end>
        Name = 'PerfilesUsuario'
        Fields = <
          item
            Name = 'PERFIL'
            DataType = datString
            Size = 15
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'USUARIO'
            DataType = datString
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'PASS'
            DataType = datString
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            SQL = 
              'SELECT'#10'    ID'#10'  FROM'#10'    USUARIOS'#10'  WHERE USUARIO = :USUARIO AND' +
              #10'        PASS = :PASS AND'#10'        ACTIVO = 1'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'ID'
                TableField = 'ID'
              end>
          end>
        Name = 'UsuarioPermitido'
        Fields = <
          item
            Name = 'ID'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end>
    Commands = <
      item
        Params = <
          item
            Name = 'PASSWORD'
            DataType = datString
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end
          item
            Name = 'USERID'
            DataType = datString
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'USUARIOS'
            SQL = 
              'UPDATE'#10'    USUARIOS'#10'  SET'#10'    PASS = :PASSWORD'#10'  WHERE'#10'    ID = ' +
              ':USERID'
            StatementType = stSQL
            ColumnMappings = <>
          end>
        Name = 'SetUserPassword'
      end>
    RelationShips = <>
    UpdateRules = <>
    Left = 40
    Top = 24
  end
  object DABINAdapter: TDABINAdapter
    Left = 40
    Top = 88
  end
end
