📄 qfdview.cpp
字号:
for(v=1;v<=num_gongcheng;v++)
{
mm.Format("%d",v);
strSQL10.Format("select b from 需求和措施关系表 where ID='%s' \
",\
mm
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL10))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str7=VariantToCString(m_pRecordset->GetCollect("b"));
textout(pDC,x0+x1+x2*(v-1),y0+x3+x4*1,5,5,str7,RGB(255,0,0));
array1[1][v-1]=atoi(str7);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(v=1;v<=num_gongcheng;v++)
{
mm.Format("%d",v);
strSQL10.Format("select c from 需求和措施关系表 where ID='%s' \
",\
mm
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL10))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str7=VariantToCString(m_pRecordset->GetCollect("c"));
textout(pDC,x0+x1+x2*(v-1),y0+x3+x4*2,5,5,str7,RGB(255,0,0));
array1[2][v-1]=atoi(str7);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(v=1;v<=num_gongcheng;v++)
{
mm.Format("%d",v);
strSQL10.Format("select d from 需求和措施关系表 where ID='%s' \
",\
mm
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL10))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str7=VariantToCString(m_pRecordset->GetCollect("d"));
textout(pDC,x0+x1+x2*(v-1),y0+x3+x4*3,5,5,str7,RGB(255,0,0));
array1[3][v-1]=atoi(str7);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(v=1;v<=num_gongcheng;v++)
{
mm.Format("%d",v);
strSQL10.Format("select e from 需求和措施关系表 where ID='%s' \
",\
mm
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL10))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str7=VariantToCString(m_pRecordset->GetCollect("e"));
textout(pDC,x0+x1+x2*(v-1),y0+x3+x4*4,5,5,str7,RGB(255,0,0));
array1[4][v-1]=atoi(str7);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(v=1;v<=num_gongcheng;v++)
{
mm.Format("%d",v);
strSQL10.Format("select f from 需求和措施关系表 where ID='%s' \
",\
mm
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL10))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str7=VariantToCString(m_pRecordset->GetCollect("f"));
textout(pDC,x0+x1+x2*(v-1),y0+x3+x4*5,5,5,str7,RGB(255,0,0));
array1[5][v-1]=atoi(str7);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(v=1;v<=num_gongcheng;v++)
{
mm.Format("%d",v);
strSQL10.Format("select g from 需求和措施关系表 where ID='%s' \
",\
mm
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL10))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str7=VariantToCString(m_pRecordset->GetCollect("g"));
textout(pDC,x0+x1+x2*(v-1),y0+x3+x4*6,5,5,str7,RGB(255,0,0));
array1[6][v-1]=atoi(str7);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(v=1;v<=num_gongcheng;v++)
{
mm.Format("%d",v);
strSQL10.Format("select i from 需求和措施关系表 where ID='%s' \
",\
mm
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL10))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str7=VariantToCString(m_pRecordset->GetCollect("i"));
textout(pDC,x0+x1+x2*(v-1),y0+x3+x4*7,5,5,str7,RGB(255,0,0));
array1[6][v-1]=atoi(str7);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(v=1;v<=num_gongcheng;v++)
{
mm.Format("%d",v);
strSQL10.Format("select h from 需求和措施关系表 where ID='%s' \
",\
mm
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL10))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str7=VariantToCString(m_pRecordset->GetCollect("h"));
textout(pDC,x0+x1+x2*(v-1),y0+x3+x4*8,5,5,str7,RGB(255,0,0));
array1[6][v-1]=atoi(str7);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
}
///////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
else{}
/////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
CString str8;
CString strSQL11;
CString pp;
int k;
if(num_xuqiu==1)
{
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select a from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("a"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3,5,5,str8,RGB(255,0,0));
array3[0][k-1]=atoi(str8);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
}
/////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
if(num_xuqiu==2)
{
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select a from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("a"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3,5,5,str8,RGB(255,0,0));
array3[0][k-1]=atoi(str8);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select b from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("b"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3+x4,5,5,str8,RGB(255,0,0));
array3[1][k-1]=atoi(str8);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
}
/////////////////////////////////////////////////////////////////////////////////
if(num_xuqiu==3)
{
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select a from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("a"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3,5,5,str8,RGB(255,0,0));
array3[0][k-1]=atoi(str8);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select b from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("b"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3+x4,5,5,str8,RGB(255,0,0));
array3[1][k-1]=atoi(str8);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select c from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("c"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3+x4*2,5,5,str8,RGB(255,0,0));
array3[2][k-1]=atoi(str8);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
}
////////////////////////////////////////////////////////////////////////////////
if(num_xuqiu==4)
{
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select a from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("a"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3,5,5,str8,RGB(255,0,0));
array3[0][k-1]=atoi(str8);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select b from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("b"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3+x4,5,5,str8,RGB(255,0,0));
array3[1][k-1]=atoi(str8);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select c from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("c"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3+x4*2,5,5,str8,RGB(255,0,0));
array3[2][k-1]=atoi(str8);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select d from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("d"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3+x4*3,5,5,str8,RGB(255,0,0));
array3[3][k-1]=atoi(str8);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
}
///////////////////////////////////////////////////////////////////////////////
if(num_xuqiu==5)
{
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select a from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("a"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3,5,5,str8,RGB(255,0,0));
array3[0][k-1]=atoi(str8);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select b from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("b"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3+x4*1,5,5,str8,RGB(255,0,0));
array3[1][k-1]=atoi(str8);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select c from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("c"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3+x4*2,5,5,str8,RGB(255,0,0));
array3[2][k-1]=atoi(str8);
//关闭
m_pRecordset->Close();
m_pRecordset=NULL;
}
for(k=1;k<=num_duixiang;k++)
{
pp.Format("%d",k);
strSQL11.Format("select d from 需求和比较对象关系表 where ID='%s' \
",\
pp
);
//打开记录集 选择表名
if(!OpenRecordSet(m_pRecordset,strSQL11))
{
AfxMessageBox("没有成功打开数据表");
return;
}
str8=VariantToCString(m_pRecordset->GetCollect("d"));
textout(pDC,x0+x1+x2*num_gongcheng+x2*(k-1),y0+x3+x4*3,5,5,str8,RGB(255,0,0));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -