16,471
社区成员
发帖
与我相关
我的任务
分享
void CJCMXK::OnBnClickedModjc2()
{
int nSel = m_listf.GetSelectionMark();
if (nSel < 0)
{
AfxMessageBox(_T("请选中再修改!"));
return;
}
CMODJC mjc;
mjc.DoModal();
}
void CMODJC::OnBnClickedModjc()
{
CString szSQL;
int nSel = m_listf.GetSelectionMark();
CString str = m_listf.GetItemText(nSel, 0);
UpdateData();
szSQL.Format(_T("UPDATE dbo.MachineCase SET OrdOrNEW='%s' WHERE MachineType='%s'"), m_mjc01, str);
if (m_ado.ExecSQL(szSQL) < 0)
AfxMessageBox(m_ado.GetLastError());
else
{
AfxMessageBox((_T("修改成功!")));
CDialog:; OnOK();
}
}
class CMODJC
{
public:
CMODJC(int nSel, xxx);
private:
int m_nSel;
};
CMODJC::CMODJC(int nSel, xxx) : m_nSel(nSel)
{}