Procedure

TfrmODBBank.cboModifiersChange

Module

fODBBank

Last Modified

7/15/2014 3:26:40 PM

Visibility

Public/Published

Owner

TfrmODBBank

Declaration

procedure cboModifiersChange(Sender: TObject);

Calls Hierarchy


TfrmODBBank.cboModifiersChange
 ├TResponses.Update
 │ ├TResponses.FindResponseByName
 │ └TResponses.IENForPrompt
 └TResponses.GetOrderText
   ├TResponses.NextInstance
   ├TResponses.FindResponseByName
   ├TResponses.FormatResponse
   │ └TResponses.FindResponseByIEN
   └TResponses.AppendChildren
     ├TResponses.FindPromptByIEN
     ├TResponses.FindResponseByIEN
     └TResponses.FormatResponse...

Calls

Name Declaration Comments
TResponses.GetOrderText function GetOrderText: string; -
TResponses.Update procedure Update(const APromptID: string; AnInstance: Integer; const AnIValue, AnEValue: string); -


Source

3378  procedure TfrmODBBank.cboModifiersChange(Sender: TObject);
3379  var
3380    i: integer;
3381    ListItem: TListItem;
3382    x,q,m: string;
3383  begin
3384    inherited;
3385    if changing = true then Exit;
3386    if (cboAvailComp.ItemIndex <> -1) and (uSelectedItems.Count > 0) then
3387      begin
3388        for i := 0 to lvSelectionList.Items.Count - 1 do
3389          begin
3390            x := uSelectedItems[i];
3391            m := piece(x,'^',4);
3392            q := piece(x,'^',3);
3393            if lvSelectionList.Items[i].Caption = piece(cboAvailComp.Items[cboAvailComp.ItemIndex],'^',2) then
3394              begin
3395                ListItem := lvSelectionList.Items[i];
3396                ListItem.SubItems.Clear;
3397                ListItem.SubItems.Add(q);
3398                if length(cboModifiers.ItemID) > 0 then
3399                  begin
3400                    ListItem.SubItems.Add(cboModifiers.Items[cboModifiers.ItemIndex]);
3401                    ListItem.SubItems.Add(IntToStr(cboModifiers.ItemIndex));
3402                  end
3403                  else
3404                    begin
3405                      ListItem.SubItems.Add('');
3406                      ListItem.SubItems.Add('');
3407                    end;
3408                ListItem.SubItems.Add(piece(cboAvailComp.Items[cboAvailComp.ItemIndex],'^',1));
3409                Responses.Update('MODIFIER', (i+1), cboModifiers.Text, cboModifiers.Text);
3410                Break;
3411              end;
3412          end;
3413      end;
3414    if Length(cboModifiers.Text) > 0 then
3415      begin
3416        memOrder.Text := Responses.OrderText;
3417      end;
3418  end;