W
wuzhonglinquan
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TFlowSerialForm.CB_FromDepartmentDropDown(Sender: TObject);
begin
CB_FromDepartment.Items.Clear;
with ADOQdo
begin
close;
sql.Clear;
sql.Add('select 部门名称 from 部门库房编号表 where 部门标识 in (01,02)');
open;
first;
while not eof do
begin
CB_FromDepartment.Items.Add(Fieldbyname('部门名称').AsString);
next;
end;
end;
end;
procedure TFlowSerialForm.CB_FromDepartmentSelect(Sender: TObject);
var
str:string;
begin
str:=CB_FromDepartment.Items[CB_FromDepartment.ItemIndex];
with ADOQdo
begin
close;
sql.Clear;
sql.Add('select 部门标识 from 部门库房编号表 where 部门名称='+Quotedstr(str));
open;
CB_FromDepartment.Text:='';
//CB_FromDepartment.Text希望赋值为02
CB_FromDepartment.Text:=Fieldbyname('部门标识').AsString;
end;
end;
就是相互转换,但是怎么也做不到,高手帮忙.
begin
CB_FromDepartment.Items.Clear;
with ADOQdo
begin
close;
sql.Clear;
sql.Add('select 部门名称 from 部门库房编号表 where 部门标识 in (01,02)');
open;
first;
while not eof do
begin
CB_FromDepartment.Items.Add(Fieldbyname('部门名称').AsString);
next;
end;
end;
end;
procedure TFlowSerialForm.CB_FromDepartmentSelect(Sender: TObject);
var
str:string;
begin
str:=CB_FromDepartment.Items[CB_FromDepartment.ItemIndex];
with ADOQdo
begin
close;
sql.Clear;
sql.Add('select 部门标识 from 部门库房编号表 where 部门名称='+Quotedstr(str));
open;
CB_FromDepartment.Text:='';
//CB_FromDepartment.Text希望赋值为02
CB_FromDepartment.Text:=Fieldbyname('部门标识').AsString;
end;
end;
就是相互转换,但是怎么也做不到,高手帮忙.