end;
procedure TBM_BENMENF.FormCreate(Sender: TObject);
begin
//DM.BUMEN.Active := True;
RefreshTree;
end;
procedure TBM_BENMENF.N_insertClick(Sender: TObject);
var
gs_global: string; //存储添加的父节点标题;
begin
b_pd := true;
Node_Parent := Treeview.selected;
if Node_Parent.level = 2 then
begin
Application.messagebox('最底层不能添加,请在上层添加', '物资管理系统', mb_iconinformation + mb_defbutton1);
exit;
end;
//设置按扭的有效性
button_valid;
if Node_Parent.level = 0 then
begin
DM.BUMEN.Insert;
DM.BUMEN.FieldByName('部门编码').editmask := '99;1;_';
pagecontrol1.ActivePageIndex := 0;
DBEdt_Bmbm.setfocus;
end;
if Node_Parent.level = 1 then
begin
gs_global := copy(Node_Parent.text, 2, 2);
DM.BUMEN.insert;
DM.BUMEN.FieldByName('部门编码').editmask := '99-99;1;_';
pagecontrol1.ActivePageIndex := 0;
DBEdt_Bmbm.setfocus;
DBEdt_Bmbm.text := gs_global;
end;
end;
procedure TBM_BENMENF.button_valid;
begin
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] ... 下一页 >>