Changeset 61 for trunk/Forms/UFormContacts.pas
- Timestamp:
- Dec 9, 2021, 12:31:17 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormContacts.pas
r53 r61 120 120 AddItem(Fields[cfMiddleName]); 121 121 AddItem(Fields[cfLastName]); 122 AddItem(Fields[cfTel]); 122 123 AddItem(Fields[cfTelCell]); 123 124 AddItem(Fields[cfTelHome]); 125 AddItem(Fields[cfTelWork]); 124 126 Item.Data := ListViewSort1.List[Item.Index]; 125 127 end; … … 158 160 2: Result := CompareString(TContact(Item1).Fields[cfMiddleName], TContact(Item2).Fields[cfMiddleName]); 159 161 3: Result := CompareString(TContact(Item1).Fields[cfLastName], TContact(Item2).Fields[cfLastName]); 160 4: Result := CompareString(TContact(Item1).Fields[cfTelCell], TContact(Item2).Fields[cfTelCell]); 161 5: Result := CompareString(TContact(Item1).Fields[cfTelHome], TContact(Item2).Fields[cfTelHome]); 162 4: Result := CompareString(TContact(Item1).Fields[cfTel], TContact(Item2).Fields[cfTel]); 163 5: Result := CompareString(TContact(Item1).Fields[cfTelCell], TContact(Item2).Fields[cfTelCell]); 164 6: Result := CompareString(TContact(Item1).Fields[cfTelHome], TContact(Item2).Fields[cfTelHome]); 165 7: Result := CompareString(TContact(Item1).Fields[cfTelWork], TContact(Item2).Fields[cfTelWork]); 162 166 end; 163 167 if ListViewSort1.Order = soDown then Result := -Result; … … 196 200 UTF8LowerCase(TContact(List.Items[I]).Fields[cfLastName])) > 0 then Inc(FoundCount); 197 201 if Pos(UTF8LowerCase(StringGrid.Cells[4, 0]), 202 UTF8LowerCase(TContact(List.Items[I]).Fields[cfTel])) > 0 then Inc(FoundCount); 203 if Pos(UTF8LowerCase(StringGrid.Cells[5, 0]), 198 204 UTF8LowerCase(TContact(List.Items[I]).Fields[cfTelCell])) > 0 then Inc(FoundCount); 199 if Pos(UTF8LowerCase(StringGrid.Cells[ 5, 0]),205 if Pos(UTF8LowerCase(StringGrid.Cells[6, 0]), 200 206 UTF8LowerCase(TContact(List.Items[I]).Fields[cfTelHome])) > 0 then Inc(FoundCount); 207 if Pos(UTF8LowerCase(StringGrid.Cells[7, 0]), 208 UTF8LowerCase(TContact(List.Items[I]).Fields[cfTelWork])) > 0 then Inc(FoundCount); 201 209 if FoundCount <> EnteredCount then List.Delete(I); 202 210 end;
Note:
See TracChangeset
for help on using the changeset viewer.