void CSGMSView::Calculate()
{
double english, maths, lmaths, pascl, cplus, struc=0; m_pSet->MoveFirst();
while (!m_pSet->IsEOF())
{
m_pSet->Edit();
if (m_pSet->m_english >= 60)
english = (m_pSet->m_english - 50)/10;
if (m_pSet->m_maths >= 60)
maths = (m_pSet->m_maths - 50)/10;
if (m_pSet->m_Lmaths >= 60)
lmaths = (m_pSet->m_Lmaths - 50)/10;
if (m_pSet->m_pascal >= 60)
pascl = (m_pSet->m_pascal - 50)/10;
if (m_pSet->m_struct >= 60)
struc = (m_pSet->m_struct - 50)/10;
if (m_pSet->m_cPlus >= 60)
cplus = (m_pSet->m_cPlus - 50)/10;
m_pSet->m_AvePoint = (english + maths + lmaths + pascl + cplus + struc)/6;
m_pSet->m_totalpoint = english*4 + maths*4 + lmaths*3.5 + pascl*3.5 + cplus*3.5 + struc*3.5 + m_pSet->m_moral;
m_pSet->MoveNext();
}
m_pSet->Update();
UpdateData(FALSE);
m_pSet->Requery();}
{
double english, maths, lmaths, pascl, cplus, struc=0; m_pSet->MoveFirst();
while (!m_pSet->IsEOF())
{
m_pSet->Edit();
if (m_pSet->m_english >= 60)
english = (m_pSet->m_english - 50)/10;
if (m_pSet->m_maths >= 60)
maths = (m_pSet->m_maths - 50)/10;
if (m_pSet->m_Lmaths >= 60)
lmaths = (m_pSet->m_Lmaths - 50)/10;
if (m_pSet->m_pascal >= 60)
pascl = (m_pSet->m_pascal - 50)/10;
if (m_pSet->m_struct >= 60)
struc = (m_pSet->m_struct - 50)/10;
if (m_pSet->m_cPlus >= 60)
cplus = (m_pSet->m_cPlus - 50)/10;
m_pSet->m_AvePoint = (english + maths + lmaths + pascl + cplus + struc)/6;
m_pSet->m_totalpoint = english*4 + maths*4 + lmaths*3.5 + pascl*3.5 + cplus*3.5 + struc*3.5 + m_pSet->m_moral;
m_pSet->MoveNext();
}
m_pSet->Update();
UpdateData(FALSE);
m_pSet->Requery();}
解决方案 »
- 在IOCP中投递了多个Accept,在退出流程中,有办法取消该投递操作码?
- 我在MFC中定义了个数组,然后把数据库里的表的记录存在里面,大家看看我的语句哪有问题?
- 传递CString指针的WPARAM自定义消息时,出现wincore.cpp处的dubug assertion failed ??
- 关于鼠标双击事件的返回值
- 高分菜鸟问题:2个combo box和2组radio,如何设置变量并且将其打印出来(内详)
- activex与com组件互相调用时的问题
- 请推荐几本初学VC的书籍(有一定的windows开发经验)
- 关于钩子截获的问题????
- 请问哪位有BMP->JPEG 的源程序 就是Base 压缩方案的源程序
- 多次打开对框框崩溃问题?
- 用ADO 访问ACCESS 数据库
- ************** 招聘VC程序员 **********************
{
double english, maths, lmaths, pascl, cplus, struc=0; m_pSet->MoveFirst();
while (!m_pSet->IsEOF())
{
m_pSet->Edit();
if (m_pSet->m_english >= 60)
english = (m_pSet->m_english - 50)/10;
if (m_pSet->m_maths >= 60)
maths = (m_pSet->m_maths - 50)/10;
if (m_pSet->m_Lmaths >= 60)
lmaths = (m_pSet->m_Lmaths - 50)/10;
if (m_pSet->m_pascal >= 60)
pascl = (m_pSet->m_pascal - 50)/10;
if (m_pSet->m_struct >= 60)
struc = (m_pSet->m_struct - 50)/10;
if (m_pSet->m_cPlus >= 60)
cplus = (m_pSet->m_cPlus - 50)/10;
m_pSet->m_AvePoint = (english + maths + lmaths + pascl + cplus + struc)/6;
m_pSet->m_totalpoint = english*4 + maths*4 + lmaths*3.5 + pascl*3.5 + cplus*3.5 + struc*3.5 + m_pSet->m_moral;
m_pSet->MoveNext();
}
m_pSet->Update();
UpdateData(FALSE);
m_pSet->Requery();}
好象是添加一条纪录,不过你好像是添加很多纪录阿
说情出问题
m_pSet->MoveNext();