Код: Виділити все
Subject_Pravo := '';
DataFirst( 'DM1.ListUser');
While DataEof( 'DM1.ListUser') = False Do
begin
If LocateData( 'DM2.TbTypeOwner', 'ID_TypeOwner', <DM1.ListUser."ID_TypeOwner">) = True Then
begin
If (<DM2.TbTypeOwner."ID_TypeUser"> = True) And (LocateData( 'DM1.QsFirm', 'ID_Firm', <DM1.ListUser."ID_Firm">) = True) Then
Subject_Pravo := Subject_Pravo + <DM1.QsFirm."Name_Who"> + ', ';
If (<DM2.TbTypeOwner."ID_TypeUser"> = False) And (LocateData( 'DM1.QsPeople', 'ID_People', <DM1.ListUser."ID_People">) = True) Then
Subject_Pravo := Subject_Pravo + <DM1.QsPeople."Family"> + ', ' ;
end;
DataNext( 'DM1.ListUser');
end;
Subject_Pravo := Copy(Subject_Pravo, 1, LENGTH(Subject_Pravo) -2);
If RECORDCOUNT( 'DM1.QiLease') > 0 Then
Subject_Pravo := <DM1.QiLease."LeaserName">; //Оредар ДОБАВИЛ
end.