zoukankan      html  css  js  c++  java
  • 多条明细(绑定到一个字段)汇总

    procedure TdmlSBWXJL_R.qryDataBeforePost(DataSet: TDataSet);
    var
      BookMark: TBookmark;
      fYLJE, fYGJE : Extended;
    begin
      inherited;
      fYLJE := 0;
      fYGJE := 0;
      BookMark := qryJXYL.GetBookmark;
      qryJXYL.DisableControls;
      try
        qryJXYL.First;
        while not qryJXYL.Eof do
        begin
          fYLJE := fYLJE + tvDetailJXYLSBWXYL_SL.AsFloat * tvDetailJXYLSBWXYL_JG.AsFloat;
          qryJXYL.Next;
        end;
      finally
        qryJXYL.GotoBookmark(BookMark);
        qryJXYL.FreeBookmark(BookMark);
        qryJXYL.EnableControls;
      end;
      BookMark := qryJXYG.GetBookmark;
      qryJXYG.DisableControls;
      try
        qryJXYG.First;
        while not qryJXYG.Eof do
        begin
          fYLJE := fYLJE + tvSBJXYGSBWXYG_GS.AsFloat * tvSBJXYGSBWXYG_JG.AsFloat;
          qryJXYG.Next;
        end;
      finally
        qryJXYG.GotoBookmark(BookMark);
        qryJXYG.FreeBookmark(BookMark);
        qryJXYG.EnableControls;
      end;
      qryDataSBWX_FY.AsFloat := fYLJE + fYGJE;
      if (qryData.State in [dsInsert]) and bIsGZL then
        CallBackOwnerForm(cbWFNewInst,'','');
    end;

  • 相关阅读:
    03_线性表
    02_算法与数据结构
    01_python中内置类型的时间复杂度
    00_常见的时间复杂度
    03_docker导出和导入镜像
    09_创建mysql数据库的用户
    14_linux添加主机列表
    13_linux修改主机名
    12_centos7安装好后的网络设置
    00_使用pdb调试python代码
  • 原文地址:https://www.cnblogs.com/FuYan/p/3195789.html
Copyright © 2011-2022 走看看