Procedure

TProbRec.LoadField

Module

uProbs

Last Modified

7/15/2014 3:26:44 PM

Visibility

Private

Owner

TProbRec

Declaration

Procedure LoadField(Fldrec:TKeyVal;Id:String;name:string);

Calls Hierarchy


TProbRec.LoadField
 └GetOrigVal

Called-By Hierarchy


                          TProbRec.LoadField
                           TProbRec.Create┘ 
           TfrmProblems.lstProbActsClick┤   
       TfrmProblems.wgProbDataDblClick┤ │   
             TfrmProblems.lstViewClick┘ │   
     TfrmProblems.HighlightDuplicate┘   │   
           TfrmProblems.AddProblem┤     │   
TfrmProblems.lstProbActsClick...┤ │     │   
   TfrmProblems.lstProbPickClick┤ │     │   
TfrmProblems.lstProbPickDblClick┤ │     │   
TfrmProblems.edProbEntKeyPress┘ │ │     │   
        TfrmProblems.UMPLLexicon┘ │     │   
     TfrmdlgProb.bbChangeProbClick┘     │   
              TfrmProblems.UpdateProblem┤   
      TfrmProblems.lstProbActsClick...┘ │   
             TfrmProblems.RestoreProblem┤   
      TfrmProblems.lstProbActsClick...┘ │   
                    TfrmdlgProb.FormShow┤   
             TfrmDiagnoses.UpdateProblem┘   
    TfrmDiagnoses.lbxSectionClickCheck┘     

Calls

Name Declaration Comments
GetOrigVal function GetOrigVal(id:string):string; -

Called-By

Name Declaration Comments
TProbRec.Create constructor Create(AList:TstringList); -


Source

636   procedure TProbRec.LoadField(Fldrec:TKeyVal;Id:String;name:string);
637   var
638     i:integer;
639     fldval:string;
640   
641     function GetOrigVal(id:string):string;
642     var
643       i:integer;
644     begin
645       i := 0;
646       Result := '^';
647       if fOrigRec.count = 0 then exit;
648       while (i < fOrigRec.Count) and (Piece(fOrigRec[i],v,2)<>id) do inc(i);
649       if i = fOrigRec.Count then exit;
650       if Piece(fOrigRec[i],v,2) = id then Result := Piece(fOrigRec[i],v,3)
651     end;
652   
653   begin
654     i := -1;
655     repeat
656      inc(i);
657     until (Piece(fNewRec[i],v,2) = id) or (i = Pred(fNewRec.count));
658     if Piece(fNewrec[i],v,2) = id then
659       fldVal := Piece(fNewrec[i],v,3)
660     else
661       fldVal := '^';
662     fldRec.id := id;
663     fldrec.name := name;
664     fldRec.intern := Piece(fldVal,'^',1);
665     fldRec.extern := Piece(fldval,'^',2);
666     {get the original values for later comparison}
667     fldVal := GetOrigVal(id);
668     fldRec.internOrig := Piece(fldVal,'^',1);
669     fldRec.externOrig := Piece(fldVal,'^',2);
670     {add this field to list}
671     fFieldList.addobject(id,fldrec);
672   end;