n_insert.enabled := not n_insert.enabled;
n_delete.enabled := not n_delete.enabled;
n_edit.enabled := not n_edit.enabled;
n_cancel.enabled := not n_cancel.enabled;
n_save.enabled := not n_save.enabled;
n_refresh.enabled := not n_refresh.enabled;
treeview.enabled := not treeview.Enabled;
add.Enabled := not add.Enabled ;
del2.Enabled := not del2.Enabled ;
edit.Enabled :=not edit.Enabled ;
hui1.Enabled := not hui1.Enabled ;
save.Enabled :=not save.Enabled ;
fresh.Enabled :=not fresh.Enabled ;
end;
procedure TBM_BENMENF.TreeViewClick(Sender: TObject);
var
mynode: Ttreenode;
s_value_1: string;
begin
if Treeview.Items.Count = 0 then
exit;
mynode := Treeview.selected;
//如果是在目录树的第一级,代表是第一级部门,它的部门编码只有两位
if mynode.Level = 1 then
begin
//从目录树的节点标题中,提取部门编码
s_value_1 := copy(mynode.text, 2, 2);
//DM.BUMEN.IndexFieldNames := '部门编码';
//DM.BUMEN.findkey([s_value_1]);
DM.BUMEN.Locate('部门编码',s_value_1,[]);
DM.BUMEN.FieldByName('部门编码').editmask := '99;1;_';
end;
if mynode.Level = 2 then
begin
//从目录树的节点标题中,提取部门编码
s_value_1 := copy(mynode.text, 2, 5);
DM.BUMEN.Locate('部门编码',s_value_1,[]);
DM.bumen.FieldByName('部门编码').editmask := '99-999;1;_';
end;
end;
procedure TBM_BENMENF.FormShow(Sender: TObject);
begin
with DM do
begin
BUMEN.Active := True;
ZHIGONG.Active :=TRUE;
end;
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] ... 下一页 >>