Jump to content

I don't know whether it's a unidntreegrid BUG or a firedac BUG


powergov

Recommended Posts

procedure Tmd01.FDM_Shangpin_jiageBeforePost(DataSet: TDataSet);

var s :string;

begin

   

   if md01.FDM_Shangpin_jiage.FieldByName('sonnum').AsInteger = 0 then

      begin

      s := 'Do nothing' ;

      s := md01.FDM_Shangpin_jiage.FieldByName('typeid').AsString.Trim;

 

      md01.FDC_OneUpdate_price.ParamByName('pm2').AsFloat :=  md01.FDM_Shangpin_jiage.FieldByName('PreSalePrice1').AsFloat ;

      md01.FDC_OneUpdate_price.ParamByName('pm3').AsFloat :=  md01.FDM_Shangpin_jiage.FieldByName('PreSalePrice2').AsFloat ;

      md01.FDC_OneUpdate_price.ParamByName('pm4').AsFloat :=  md01.FDM_Shangpin_jiage.FieldByName('PreSalePrice3').AsFloat ;

      md01.FDC_OneUpdate_price.ParamByName('pm5').AsString := md01.FDQ_sysdate.FieldByName('实时').AsString.Trim + ' By ' + md01.username ;

      md01.FDC_OneUpdate_price.ParamByName('pm1').AsString  := s    ;

      md01.FDC_OneUpdate_price.Execute() ;

 

    end;

end;

 

When I modified one record in unidntreegrid, I was hoping to execute a TFDCommand only for the current record,but TFDCommand run (the rows count in  unidntreegrid) times,I think  It should be traversal all records in unidntreegrid!

Link to comment
Share on other sites

if have column A,column B,column C,When I modified  column B or column C,I want to automatically write the current system time to column A, and I don't allow keyboard input. I will use the beforepost to set value to column A, but it will automatically set column A value to all the rows in the unidbtreegrid 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...