B
bozhilong
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TFmRCAP_ALL.DBGridEh1GetFooterParams(Sender: TObject
DataCol,
Row: Integer
Column: TColumnEh
AFont: TFont
var Background: TColor;
var Alignment: TAlignment
State: TGridDrawState
var Text: String);
begin
if (Column.Field.FieldName = '金额') then
Text := '共【 ' + Text + ' 】元' ;
end;
procedure TFmRCAP_ALL.ToolButton3Click(Sender: TObject);
begin
if ToolButton3.Caption = '保存' then
begin
if Application.MessageBox('确认保存清单', '提示', MB_OKCANCEL +
MB_ICONQUESTION + MB_DEFBUTTON2) = IDOK then
begin
FMData.ADOBX.Append;
FMData.ADOBX.FieldValues['日期'] := FmRCAP_DXXG.DateTimePicker1.Date;
FMData.ADOBX.FieldValues['说明'] := FmRCAP_DXXG.Edit1.Text;
FMData.ADOBX.FieldValues['金额'] := Text // 就是上面那个局部变量,怎么调用?
FMData.ADOBX.FieldValues['操作员'] := Form1.StatusBar1.Panels[0].Text;
FMData.ADOBX.Post;
end else Exit;
if Application.MessageBox('是否打印清单', '提示', MB_OKCANCEL +
MB_ICONQUESTION + MB_DEFBUTTON2) = IDCANCEL then
begin
Exit;
end;
end;
PrintDBGridEh1.SetSubstitutes(['%[Today]',DateToStr(Now)]);
PrintDBGridEh1.Preview;
end;
DataCol,
Row: Integer
Column: TColumnEh
AFont: TFont
var Background: TColor;
var Alignment: TAlignment
State: TGridDrawState
var Text: String);
begin
if (Column.Field.FieldName = '金额') then
Text := '共【 ' + Text + ' 】元' ;
end;
procedure TFmRCAP_ALL.ToolButton3Click(Sender: TObject);
begin
if ToolButton3.Caption = '保存' then
begin
if Application.MessageBox('确认保存清单', '提示', MB_OKCANCEL +
MB_ICONQUESTION + MB_DEFBUTTON2) = IDOK then
begin
FMData.ADOBX.Append;
FMData.ADOBX.FieldValues['日期'] := FmRCAP_DXXG.DateTimePicker1.Date;
FMData.ADOBX.FieldValues['说明'] := FmRCAP_DXXG.Edit1.Text;
FMData.ADOBX.FieldValues['金额'] := Text // 就是上面那个局部变量,怎么调用?
FMData.ADOBX.FieldValues['操作员'] := Form1.StatusBar1.Panels[0].Text;
FMData.ADOBX.Post;
end else Exit;
if Application.MessageBox('是否打印清单', '提示', MB_OKCANCEL +
MB_ICONQUESTION + MB_DEFBUTTON2) = IDCANCEL then
begin
Exit;
end;
end;
PrintDBGridEh1.SetSubstitutes(['%[Today]',DateToStr(Now)]);
PrintDBGridEh1.Preview;
end;