unit U_OutPutHelp;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, DB, ADODB;

type
  TfrmOutPutHelp = class(TForm)
    Panel1: TPanel;
    Button1: TButton;
    Label1: TLabel;
    Button2: TButton;
    ADOQueryMain: TADOQuery;
    ADOQueryTemp: TADOQuery;
    ADOQueryCmd: TADOQuery;
    OutMoney: TEdit;
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    FGOIDS: string;
    { Public declarations }
  end;

var
  frmOutPutHelp: TfrmOutPutHelp;

implementation

{$R *.dfm}

procedure TfrmOutPutHelp.Button2Click(Sender: TObject);
begin
  Close;
end;

procedure TfrmOutPutHelp.Button1Click(Sender: TObject);
begin
  if StrToFloatDef(OutMoney.Text, 0) = 0 then
    OutMoney.Text := '0';
  try
    with ADOQueryCmd do
    begin
      Close;
      sql.Clear;
      sql.Add(' update Tat_Plan_OutPut   ');
      sql.Add(' set  OutMoney=' + OutMoney.Text);
      sql.Add(' where EXISTS(select X.RTValue from [dbo].[F_Tool_SplitString](' + quotedstr(FGOIDS) + ','','')  X where X.RTValue=Tat_Plan_OutPut.GOID) ');
//      showmessage(sql.text);
      ExecSQL;
    end;
    ModalResult := 1;
  except
    application.MessageBox(PChar(Exception(ExceptObject).Message), 'ΜαΚΎΠΕΟ’', 0);

  end;
end;

end.

