主题:有关RzTreeView控件的问题!
请问各位高手,为什么我在窗体显示的时候显示RzTreeView中的内容!代码如下:
ParamInfo=new TParamInfo;
dmDept->ADOQuery1->Close();
dmDept->ADOQuery1->SQL->Text="select * from comParameters where ParamName=:ParamName";
dmDept->ADOQuery1->Parameters->ParamByName("ParamName")->Value="CompanyCNName";
dmDept->ADOQuery1->Open();
if(!dmDept->ADOQuery1->Eof)
{
StrCopy(ParamInfo->CompanyCNName,(AnsiString(dmDept->ADOQuery1->FieldByName("varcharParam")->AsString)).c_str());
}
dmDept->ADOQuery1->Close();
dmDept->ADOQuery1->SQL->Text="select * from comUser where UserNo='admin'";
dmDept->ADOQuery1->Open();
if(!dmDept->ADOQuery1->Eof)
{
ParamInfo->UserID=dmDept->ADOQuery1->FieldByName("ID")->AsInteger;
strcpy(ParamInfo->UserNo,dmDept->ADOQuery1->FieldByName("UserNo")->AsString.c_str());
strcpy(ParamInfo->UserName,dmDept->ADOQuery1->FieldByName("UserName")->AsString.c_str());
}
AnsiString s= dmDept->ADOConnection1->ConnectionString;
strcpy(this->ParamInfo->ConnectionString,s.c_str());
StrCopy(ParamInfo->SoftName,"sadfasf");
StrCopy(ParamInfo->Ver,"MRP1.0");
ParamInfo->MainApp=Application;
dmDept->ADOQuery1->Close();
UserNameStatus->Caption="操作员:"+AnsiString(ParamInfo->UserName);
CompanyStatus->Caption=ParamInfo->CompanyCNName;
SoftNameStatus->Caption=ParamInfo->SoftName;
dmDept->ADOQuery1->Close();
dmDept->ADOQuery1->SQL->Text="select top 1 * from comCompanyInfo";
dmDept->ADOQuery1->Open();
subVer="MRP1.0*+*"+dmDept->ADOQuery1->FieldByName("subVer")->AsString+"*+*"
+dmDept->ADOQuery1->FieldByName("FootWearVer")->AsString;
StrCopy(ParamInfo->Ver,subVer.c_str());
subVer= dmDept->ADOQuery1->FieldByName("subVer")->AsString;
dmDept->ADOQuery1->Close();
OldSQLText==ParamInfo->FilterText;
First=true;
if(cxGrid1DBTableView1->ColumnCount==0)
cxGrid1DBTableView1->DataController->CreateAllItems();
GridShow(dmDept->ADOConnection1,"VIEWBPRcomDepart",cxGrid1DBTableView1,false,ParamInfo);
TreeParam.ItemID=0;
GetTree(&TreeParam,ParamInfo);
dmDept->ADOQueryRight->Close();
dmDept->ADOQueryRight->Open();
First=false;
ParamInfo=new TParamInfo;
dmDept->ADOQuery1->Close();
dmDept->ADOQuery1->SQL->Text="select * from comParameters where ParamName=:ParamName";
dmDept->ADOQuery1->Parameters->ParamByName("ParamName")->Value="CompanyCNName";
dmDept->ADOQuery1->Open();
if(!dmDept->ADOQuery1->Eof)
{
StrCopy(ParamInfo->CompanyCNName,(AnsiString(dmDept->ADOQuery1->FieldByName("varcharParam")->AsString)).c_str());
}
dmDept->ADOQuery1->Close();
dmDept->ADOQuery1->SQL->Text="select * from comUser where UserNo='admin'";
dmDept->ADOQuery1->Open();
if(!dmDept->ADOQuery1->Eof)
{
ParamInfo->UserID=dmDept->ADOQuery1->FieldByName("ID")->AsInteger;
strcpy(ParamInfo->UserNo,dmDept->ADOQuery1->FieldByName("UserNo")->AsString.c_str());
strcpy(ParamInfo->UserName,dmDept->ADOQuery1->FieldByName("UserName")->AsString.c_str());
}
AnsiString s= dmDept->ADOConnection1->ConnectionString;
strcpy(this->ParamInfo->ConnectionString,s.c_str());
StrCopy(ParamInfo->SoftName,"sadfasf");
StrCopy(ParamInfo->Ver,"MRP1.0");
ParamInfo->MainApp=Application;
dmDept->ADOQuery1->Close();
UserNameStatus->Caption="操作员:"+AnsiString(ParamInfo->UserName);
CompanyStatus->Caption=ParamInfo->CompanyCNName;
SoftNameStatus->Caption=ParamInfo->SoftName;
dmDept->ADOQuery1->Close();
dmDept->ADOQuery1->SQL->Text="select top 1 * from comCompanyInfo";
dmDept->ADOQuery1->Open();
subVer="MRP1.0*+*"+dmDept->ADOQuery1->FieldByName("subVer")->AsString+"*+*"
+dmDept->ADOQuery1->FieldByName("FootWearVer")->AsString;
StrCopy(ParamInfo->Ver,subVer.c_str());
subVer= dmDept->ADOQuery1->FieldByName("subVer")->AsString;
dmDept->ADOQuery1->Close();
OldSQLText==ParamInfo->FilterText;
First=true;
if(cxGrid1DBTableView1->ColumnCount==0)
cxGrid1DBTableView1->DataController->CreateAllItems();
GridShow(dmDept->ADOConnection1,"VIEWBPRcomDepart",cxGrid1DBTableView1,false,ParamInfo);
TreeParam.ItemID=0;
GetTree(&TreeParam,ParamInfo);
dmDept->ADOQueryRight->Close();
dmDept->ADOQueryRight->Open();
First=false;