|
@@ -5,7 +5,8 @@ interface
|
|
|
uses
|
|
|
BillsCompileDm,
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
- Dialogs, StdCtrls, ExtCtrls, ZJGrid, sdIDTree, dxBar, sdGridDBA, ComCtrls;
|
|
|
+ Dialogs, StdCtrls, ExtCtrls, ZJGrid, sdIDTree, dxBar, sdGridDBA, ComCtrls,
|
|
|
+ ActnList;
|
|
|
|
|
|
type
|
|
|
TInsertType = (itChild, itNextSibling);
|
|
@@ -35,6 +36,8 @@ type
|
|
|
lblHint: TLabel;
|
|
|
sgdDealBills: TsdGridDBA;
|
|
|
udBeginCode: TUpDown;
|
|
|
+ alBatchInsertBills: TActionList;
|
|
|
+ actnInsertCol: TAction;
|
|
|
procedure zgPositionCustomPaste(Sender: TObject; ABounds: TRect;
|
|
|
ASourSheet: TZjSheet);
|
|
|
procedure zgBillsCustomPaste(Sender: TObject; ABounds: TRect;
|
|
@@ -48,6 +51,8 @@ type
|
|
|
procedure leBeginCodeKeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure zgPositionCellTextChanged(Sender: TObject; Col,
|
|
|
Row: Integer);
|
|
|
+ procedure dxpmInsertBillsPopup(Sender: TObject);
|
|
|
+ procedure actnInsertColExecute(Sender: TObject);
|
|
|
private
|
|
|
FInsertType: TInsertType;
|
|
|
FBillsCompileData: TBillsCompileData;
|
|
@@ -75,7 +80,7 @@ procedure AddLeafBills(ABillsCompileData: TBillsCompileData; AInsertType: TInser
|
|
|
implementation
|
|
|
|
|
|
uses
|
|
|
- sdDB, UtilMethods, ProjectData;
|
|
|
+ sdDB, UtilMethods, ProjectData, MainFrm;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
@@ -397,4 +402,18 @@ begin
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
+procedure TBatchInsertBillsForm.dxpmInsertBillsPopup(Sender: TObject);
|
|
|
+begin
|
|
|
+ SetDxBtnAction(actnInsertCol, MainForm.dxbtnInsertCol);
|
|
|
+end;
|
|
|
+
|
|
|
+procedure TBatchInsertBillsForm.actnInsertColExecute(Sender: TObject);
|
|
|
+begin
|
|
|
+ zgPosition.ColCount := zgPosition.ColCount + 1;
|
|
|
+ zgPosition.Cells[zgPosition.ColCount-1, 0].Text := 'Çåµ¥' + IntToStr(zgPosition.ColCount -1 - 1);
|
|
|
+ zgPosition.ColWidths[zgPosition.ColCount-1] := 50;
|
|
|
+ zgBills.RowCount := zgPosition.ColCount - 1;
|
|
|
+ zgBills.Cells[0, zgBills.RowCount-1].Text := 'Çåµ¥' + IntToStr(zgBills.RowCount-1);
|
|
|
+end;
|
|
|
+
|
|
|
end.
|