while(!pRs->IsEof())
{
pRs->GetFieldValue("seqnum",seq);
pRs->MoveNext();
}
pRs->Close();
}
seq++;
CString str_seq;
str_seq.Format("%03d",seq);
m_id=str_time;
m_id += str_seq;
m_information_code.Format("%03d",seq);
return seq;
(2) 登记函数
UpdateData();
int seq = 0;
seq = m_seq;
CString sqlcommand;
CString str_dating_time;
str_dating_time=m_dating_time.Format("%Y-%m-%d");
CString str_send_time;
str_send_time=m_send_time.Format("%Y-%m-%d");
sqlcommand="insert into prerepair(repair_id,accept_time,operator_man,information_source,information_code,service_type,name,address,phone,dating_time,brand,brand_type,sms_phone,send_time,send_operator,worker,need_charge,deliver,goods_source,store_type,bill_number,trans_man,remark)values(";
sqlcommand += "'";
sqlcommand += m_id; sqlcommand += "','";
sqlcommand += m_accept_time; sqlcommand += "','";
sqlcommand += m_operator_man; sqlcommand += "','";
sqlcommand += m_information_source; sqlcommand += "','";
|