Ignore:
Timestamp:
Apr 3, 2012, 8:31:39 AM (12 years ago)
Author:
chronos
Message:
  • Opraveno: Aktualizace seznamu modulů do databáze a použití příznaku modulů "Instalován" pro zjištění, zda vytvářet znova strukturu.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Client/USystem.pas

    r52 r53  
    194194      Properties.Client := Base.Client;
    195195      Properties.ObjectName := PropertyTable;
    196       Properties.SchemaName := Base.Client.Schema;
     196      Properties.Path := Base.Client.Schema;
    197197      Properties.Condition := 'Object="' + IntToStr(Obj.Id) + '"';
    198198      Properties.Load;
     
    219219      Values.ColummsFilterUse := True;
    220220      Values.ObjectName := Obj.Table;
    221       Values.SchemaName := Obj.Schema;
     221      Values.Path := Obj.Schema;
    222222      Values.Condition := Filter;
    223223      Values.Load;
     
    249249    Client.Connect;
    250250    if Client.Connected then begin
     251      if not Modules.IsInstalled then begin
     252        Modules.Install;
     253        Modules.UpdateList;
     254      end;
     255      Modules.UpdateList;
    251256      if not ModuleSystem.IsInstalled then ModuleSystem.Install;
    252257      LoadTypes;
     
    273278    Proxy.Client := Client;
    274279    Proxy.ObjectName := PropertyTypeTable;
     280    Proxy.Id := Integer(TypeIndex);
    275281    Proxy.Properties.Add('Name', Name);
    276282    Proxy.Properties.Add('DbType', DataType);
    277     Proxy.Properties.Add('Id', IntToStr(Integer(TypeIndex)));
    278283    Proxy.Save;
    279284    Result := Proxy.Id;
     
    655660    Proxy := TListProxy.Create;
    656661    Proxy.Client := Client;
    657     Proxy.SchemaName := 'information_schema';
     662    Proxy.Path := 'information_schema';
    658663    Proxy.ObjectName := 'tables';
    659664    Proxy.Condition := 'table_name = "SystemModule" AND table_schema = "' +
     
    719724    List.Client := Core.System.Client;
    720725    List.ObjectName := ObjectTable;
    721     List.SchemaName := Core.System.Client.Schema;
     726    List.Path := Core.System.Client.Schema;
    722727    List.Condition := 'Id=' + IntToStr(ObjectId);
    723728    List.Load;
     
    758763  List := TListProxy.Create;
    759764  List.Client := Base.Client;
    760   List.SchemaName := Base.Client.Schema;
    761   NewObject := TObjectProxy.Create;
    762   NewObject.Client := Base.Client;
     765  List.Path := Base.Client.Schema;
     766  List.ObjectName := SystemModuleObject;
    763767  for I := 0 to Count - 1 do
    764768  with TChronisModule(Items[I]) do begin
    765769    List.Condition := 'SysName="' + SysName + '"';
    766770    List.Load;
     771    NewObject := TObjectProxy.Create;
     772    NewObject.Client := Base.Client;
    767773    if List.Objects.Count > 0 then
    768774      NewObject.Id := StrToInt(TObjectProxy(List.Objects[0]).Properties.Values['Id'])
    769775      else NewObject.Id := 0;
    770     NewObject.SchemaName := Base.Client.Schema;
     776    NewObject.Path := Base.Client.Schema;
    771777    NewObject.ObjectName := SystemModuleObject;
    772     NewObject.Properties.Add('SysName', SysName);
    773     NewObject.Properties.Add('Name', Name);
    774     NewObject.Properties.Add('Version', Version);
    775     NewObject.Properties.Add('License', License);
    776     NewObject.Properties.Add('Creator', Creator);
    777     NewObject.Properties.Add('HomePage', HomePage);
     778    with NewObject.Properties do begin
     779      Add('SysName', SysName);
     780      Add('Name', Name);
     781      Add('Version', Version);
     782      Add('License', License);
     783      Add('Creator', Creator);
     784      Add('HomePage', HomePage);
     785    end;
    778786    NewObject.Save;
    779   end;
    780   NewObject.Free;
     787    NewObject.Free;
     788  end;
    781789  List.Free;
    782790end;
Note: See TracChangeset for help on using the changeset viewer.