Procedure

TfrmLabTestGroups.cmdDeleteClick

Module

fLabTestGroups

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public/Published

Owner

TfrmLabTestGroups

Declaration

procedure cmdDeleteClick(Sender: TObject);

Calls Hierarchy


TfrmLabTestGroups.cmdDeleteClick
 ├UTGDelete
 └TfrmLabTestGroups.cboUsersClick
   ├TestGroups
   └TfrmLabTestGroups.TestGroupEnable

Calls

Name Declaration Comments
TfrmLabTestGroups.cboUsersClick procedure cboUsersClick(Sender: TObject); -
UTGDelete procedure UTGDelete(testgroup: integer); -


Source

362   procedure TfrmLabTestGroups.cmdDeleteClick(Sender: TObject);
363   var
364     text: string;
365     i: integer;
366   begin
367     text := 'Do you wish to DELETE your test group:' + #13 + '  ';
368     text := text + lstTestGroups.DisplayText[lstTestGroups.ItemIndex] + #13 + '  ';
369     if InfoBox(text,'Confirmation', MB_YESNO or MB_ICONQUESTION) = IDYES then
370     begin
371       UTGDelete(lstTestGroups.ItemIEN);
372       if ScreenReaderSystemActive then
373         GetScreenReader.Speak('Test group deleted');
374       cboUsers.Text := '';
375       lstTestGroups.Clear;
376       cboUsers.InitLongList(User.Name);
377       for i := 0 to cboUsers.Items.Count - 1 do
378         if StrToInt64Def(Piece(cboUsers.Items[i], '^', 1), 0) = User.DUZ then
379         begin
380           cboUsers.ItemIndex := i;
381           break;
382         end;
383     end;
384     if cboUsers.ItemIndex > -1 then cboUsersClick(self);
385     lstTestGroups.SetFocus;
386   end;