Procedure

TfrmARTAllergy.btnRemoveClick

Module

fARTAllgy

Last Modified

7/15/2014 3:26:36 PM

Visibility

Public/Published

Owner

TfrmARTAllergy

Declaration

procedure btnRemoveClick(Sender: TObject);

Calls Hierarchy


TfrmARTAllergy.btnRemoveClick
 └TfrmARTAllergy.ControlChange
   └FMNow

Calls

Name Declaration Comments
TfrmARTAllergy.ControlChange procedure ControlChange(Sender: TObject); -


Source

1070  procedure TfrmARTAllergy.btnRemoveClick(Sender: TObject);
1071  var
1072    i: integer;
1073    x: string;
1074  begin
1075    inherited;
1076    Changing := True;
1077    with lstSelectedSymptoms do
1078      begin
1079        if (Items.Count = 0) or (ItemIndex = -1) then exit;
1080        i := ItemIndex;
1081        if uEditing then
1082        begin
1083          if OldRec.SignsSymptoms.IndexOf(Items[ItemIndex]) > -1 then
1084            begin
1085              x := Items[i];
1086              SetPiece(x, U, 5, '@');
1087              uDeletedSymptoms.Add(x);
1088            end;
1089        end;
1090        Items.Delete(ItemIndex);
1091        ItemIndex := i - 1;
1092        if (Items.Count > 0) and (ItemIndex = -1) then ItemIndex := 0;
1093      end;
1094    Changing := False;
1095    ControlChange(btnRemove);
1096  end;