| 
				  pRs->GetFieldValue("pass_word",strpassword); 
            pRs->MoveNext(); 
            count++; 
        } 
        pRs->Close(); 
    } 
    if(m_password == strpassword && count!=0) 
    { 
        CDialog::OnOK(); 
    } 
    else 
    { 
        AfxMessageBox("密码错误"); 
    } 
} 
4.2 工单登记模块 
新建立一个类CJobReg继承于CDialog,设计窗体如下, 控件分别与类的变量相关联。 
(1) 流水号生成函数 
CString str_time; 
int seq = 0; 
str_time=CTime::GetCurrentTime().Format("%Y-%m-%d"); 
CADORecordset* pRs = new CADORecordset(((CRepairServiceApp*)AfxGetApp())->g_pDb); 
CString sqlcommand="select max(seq) as seqnum from repair_relation   where start_time='"; 
sqlcommand+=str_time; 
sqlcommand+="'"; 
if(pRs->Open((LPCTSTR)sqlcommand)) 
{ 			
				 |