BurnCD.cpp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. // BurnCD.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "BurnCD.h"
  6. #include "MyMdi.H"
  7. #include "ModifyDinDan.h"
  8. #include "NeroDlg.h"
  9. #include "ClientRequirement.h"
  10. #include "ChoosePhotoSkin2.h"
  11. #include "./helper/ffsco.h"
  12. #ifdef _DEBUG
  13. #define new DEBUG_NEW
  14. #undef THIS_FILE
  15. static char THIS_FILE[] = __FILE__;
  16. #endif
  17. #pragma comment(lib, "Shlwapi.lib")
  18. /////////////////////////////////////////////////////////////////////////////
  19. // BurnCD
  20. IMPLEMENT_DYNCREATE(BurnCD, MyFormView)
  21. BurnCD::BurnCD(): MyFormView(BurnCD::IDD)
  22. {
  23. m_filter = _T("");
  24. }
  25. BurnCD::~BurnCD()
  26. {
  27. }
  28. void BurnCD::DoDataExchange(CDataExchange* pDX)
  29. {
  30. MyFormView::DoDataExchange(pDX);
  31. DDX_Control(pDX, IDC_COMBO1, m_combo1);
  32. DDX_Control(pDX, IDC_LIST2, m_List1);
  33. DDX_Control(pDX, IDC_STATIC1, m_static1);
  34. DDX_CBString(pDX, IDC_COMBO1, m_filter);
  35. }
  36. BEGIN_MESSAGE_MAP(BurnCD, MyFormView)
  37. //{{AFX_MSG_MAP(BurnCD)
  38. ON_BN_CLICKED(IDC_BUTclose, OnBUTclose)
  39. ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
  40. ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1)
  41. ON_WM_TIMER()
  42. ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
  43. ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST2, OnItemchangedList2)
  44. ON_BN_CLICKED(IDC_BUTburncd, OnBUTburncd)
  45. ON_NOTIFY(NM_DBLCLK, IDC_LIST2, OnDblclkList2)
  46. ON_BN_CLICKED(IDC_BUTburnreg, OnBUTburnreg)
  47. ON_NOTIFY(NM_CLICK, IDC_LIST2, OnClickList2)
  48. //}}AFX_MSG_MAP
  49. END_MESSAGE_MAP()
  50. /////////////////////////////////////////////////////////////////////////////
  51. // BurnCD diagnostics
  52. #ifdef _DEBUG
  53. void BurnCD::AssertValid() const
  54. {
  55. MyFormView::AssertValid();
  56. }
  57. void BurnCD::Dump(CDumpContext& dc) const
  58. {
  59. MyFormView::Dump(dc);
  60. }
  61. #endif //_DEBUG
  62. /////////////////////////////////////////////////////////////////////////////
  63. // BurnCD message handlers
  64. void BurnCD::OnInitialUpdate()
  65. {
  66. MyFormView::OnInitialUpdate();
  67. // TODO: Add your specialized code here and/or call the base class
  68. CMyMdi Mdi;
  69. Mdi.SetSubView((CWnd*)GetParent(), (CWnd*)this);
  70. GetDlgItem(IDC_BUTburncd)->EnableWindow(IsHasRights2new(46));
  71. // Here we create the outbar control using the splitter as its parent
  72. // and setting its id to the first pane.
  73. CRect rc2;
  74. GetWindowRect(rc2);
  75. ::MoveWindow(m_hWnd, g_rc.left, g_rc.top, g_rc.Width(), g_rc.Height(), TRUE);
  76. EnumChildWindows(m_hWnd, (WNDENUMPROC)EnumChildProc, 0);
  77. int idarray[] = { IDC_BUTburncd, IDC_BUTburnreg, IDC_BUTclose };
  78. int idcount = 3;
  79. int btnwid;
  80. CRect prerc;
  81. for (int a = idcount - 2; a >= 0; a--)
  82. {
  83. GetDlgItem(idarray[a + 1])->GetWindowRect(prerc);
  84. ScreenToClient(prerc);
  85. GetDlgItem(idarray[a])->GetWindowRect(rc2);
  86. ScreenToClient(rc2);
  87. btnwid = rc2.Width();
  88. rc2.right = prerc.left;
  89. rc2.left = rc2.right - btnwid;
  90. GetDlgItem(idarray[a])->MoveWindow(rc2);
  91. }
  92. m_static1.SetFont(&g_titlefont);
  93. #ifdef CHILD_VERSION
  94. m_List1.SetHeadings("订单号,100;家长姓名,100;宝宝姓名,100;选片,100;光盘,100;刻录次数,100;加急,100;取件日期,100;接单人,100;套系名称,100;套系价格,100;手机,100;固定电话,100" );
  95. #else
  96. m_List1.SetHeadings("订单号,100;男宾姓名,100;女宾姓名,100;选片,100;光盘,100;刻录次数,100;加急,100;取件日期,100;接单人,100;套系名称,100;套系价格,100;男宾电话,100;女宾电话,100");
  97. #endif
  98. m_List1.LoadColumnInfo(125);
  99. if (g_bShowOK == 0)
  100. {
  101. #ifdef LKAY_VERSION
  102. CString filter="status3='未取' and (dindantype<>'意向客户' or dindantype is null)";
  103. #else
  104. CString filter = "status3='未取'";
  105. #endif
  106. g_sendhead.bsql = 0;
  107. g_sendhead.code[0] = 17;
  108. g_sendhead.tabcount = 1;
  109. g_pMainWnd->ProcessChatMessageRequest2(filter); if (g_bSendOK == 0)return;
  110. }
  111. else
  112. {
  113. g_sendhead.bsql = 0;
  114. g_sendhead.code[0] = 17;
  115. g_sendhead.tabcount = 1;
  116. #ifdef LKAY_VERSION
  117. CString filter="dindantype<>'意向客户' or dindantype is null";
  118. g_pMainWnd->ProcessChatMessageRequest2(filter);
  119. #else
  120. g_pMainWnd->ProcessChatMessageRequest2(1);
  121. #endif
  122. if (g_bSendOK == 0)return;
  123. }
  124. DataToArray(&m_List1array); HidePrice();
  125. m_combo1.AddString(g_user.name);
  126. for (int i = 0; i < g_userarray.GetSize(); i++)
  127. {
  128. m_combo1.AddString(g_userarray.ElementAt(i).ElementAt(1));
  129. }
  130. FillGrid();
  131. m_combo1.GetWindowRect(rc2);
  132. ScreenToClient(rc2);
  133. rc2.bottom += 200;
  134. m_combo1.MoveWindow(rc2);
  135. GetDlgItem(IDC_BUTclose)->GetWindowRect(rc2);
  136. SetComboHei(&m_combo1, rc2.Height());
  137. }
  138. void BurnCD::FillGrid(BOOL bStatus)
  139. {
  140. m_List1.DeleteAllItems2();
  141. int ii = 0;
  142. m_List1.m_arLabels.SetSize(m_List1array.GetSize(), 1);
  143. int count = 0;
  144. if (m_filter.IsEmpty())
  145. {
  146. if (bStatus)
  147. {
  148. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  149. {
  150. if (m_List1array.ElementAt(ii).ElementAt(3) == "OK")
  151. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  152. }
  153. }
  154. else
  155. {
  156. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  157. {
  158. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  159. }
  160. }
  161. }
  162. else
  163. {
  164. if (bStatus)
  165. {
  166. int type = GetType(m_filter);
  167. if (type == 1)//电话
  168. {
  169. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  170. {
  171. if (m_List1array.ElementAt(ii).ElementAt(3) == "OK" && (m_List1array.ElementAt(ii).ElementAt(11).Find(m_filter) != -1 || \
  172. m_List1array.ElementAt(ii).ElementAt(12).Find(m_filter) != -1))
  173. {
  174. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  175. }
  176. }
  177. }
  178. else if (type == 2)//拼音
  179. {
  180. m_filter.MakeUpper();
  181. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  182. {
  183. if (m_List1array.ElementAt(ii).ElementAt(3) == "OK" && (m_List1array.ElementAt(ii).ElementAt(13).Find(m_filter) != -1 || \
  184. m_List1array.ElementAt(ii).ElementAt(14).Find(m_filter) != -1))
  185. {
  186. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  187. }
  188. }
  189. }
  190. else
  191. {
  192. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  193. {
  194. if (m_List1array.ElementAt(ii).ElementAt(3) == "OK" && (m_List1array.ElementAt(ii).ElementAt(0).Find(m_filter) != -1 || \
  195. m_List1array.ElementAt(ii).ElementAt(1).Find(m_filter) != -1 || \
  196. m_List1array.ElementAt(ii).ElementAt(2).Find(m_filter) != -1 || \
  197. m_List1array.ElementAt(ii).ElementAt(7).Find(m_filter) != -1 || \
  198. m_List1array.ElementAt(ii).ElementAt(10).Find(m_filter) != -1 || \
  199. m_List1array.ElementAt(ii).ElementAt(11).Find(m_filter) != -1 || \
  200. m_List1array.ElementAt(ii).ElementAt(12).Find(m_filter) != -1 || \
  201. m_List1array.ElementAt(ii).ElementAt(13).Find(m_filter) != -1 || \
  202. m_List1array.ElementAt(ii).ElementAt(14).Find(m_filter) != -1))
  203. {
  204. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  205. }
  206. }
  207. }
  208. }
  209. else
  210. {
  211. int type = GetType(m_filter);
  212. if (type == 1)//电话
  213. {
  214. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  215. {
  216. if (m_List1array.ElementAt(ii).ElementAt(11).Find(m_filter) != -1 || \
  217. m_List1array.ElementAt(ii).ElementAt(12).Find(m_filter) != -1)
  218. {
  219. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  220. }
  221. }
  222. }
  223. else if (type == 2)//拼音
  224. {
  225. m_filter.MakeUpper();
  226. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  227. {
  228. if (m_List1array.ElementAt(ii).ElementAt(13).Find(m_filter) != -1 || \
  229. m_List1array.ElementAt(ii).ElementAt(14).Find(m_filter) != -1)
  230. {
  231. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  232. }
  233. }
  234. }
  235. else
  236. {
  237. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  238. {
  239. if (m_List1array.ElementAt(ii).ElementAt(0).Find(m_filter) != -1 || \
  240. m_List1array.ElementAt(ii).ElementAt(1).Find(m_filter) != -1 || \
  241. m_List1array.ElementAt(ii).ElementAt(2).Find(m_filter) != -1 || \
  242. m_List1array.ElementAt(ii).ElementAt(7).Find(m_filter) != -1 || \
  243. m_List1array.ElementAt(ii).ElementAt(10).Find(m_filter) != -1 || \
  244. m_List1array.ElementAt(ii).ElementAt(11).Find(m_filter) != -1 || \
  245. m_List1array.ElementAt(ii).ElementAt(12).Find(m_filter) != -1 || \
  246. m_List1array.ElementAt(ii).ElementAt(13).Find(m_filter) != -1 || \
  247. m_List1array.ElementAt(ii).ElementAt(14).Find(m_filter) != -1)
  248. {
  249. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  250. }
  251. }
  252. }
  253. }
  254. }
  255. m_List1.m_arLabels.SetSize(count, 1);
  256. ii = count;
  257. m_List1.m_LabelCount = ii;
  258. m_List1.SetItemCountEx(ii);
  259. CString str;
  260. str.Format("单数:%d", ii);
  261. SetDlgItemText(IDC_STATIC2, str);
  262. if (!g_id.IsEmpty())
  263. {
  264. for (int i = 0; i < m_List1.GetItemCount(); i++)
  265. {
  266. if (g_id == m_List1.GetItemText(i, 0))
  267. {
  268. m_List1.SetItemState(i, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
  269. m_List1.EnsureVisible(i, FALSE);
  270. break;
  271. }
  272. }
  273. }
  274. }
  275. void BurnCD::OnBUTclose()
  276. {
  277. GetParent()->SendMessage(WM_CLOSE);
  278. }
  279. void BurnCD::OnSelchangeCombo1()
  280. {
  281. SetTimer(1, 100, NULL);
  282. }
  283. void BurnCD::OnTimer(UINT nIDEvent)
  284. {
  285. KillTimer(nIDEvent);
  286. OnButton1();
  287. }
  288. BOOL BurnCD::PreTranslateMessage(MSG* pMsg)
  289. {
  290. try
  291. {
  292. if (pMsg->message == WM_KEYDOWN)
  293. {
  294. switch (pMsg->wParam)
  295. {
  296. case VK_RETURN:
  297. OnButton1();
  298. return 1;
  299. case 0x43: // copy
  300. if ((GetKeyState(VK_CONTROL) & 0x80))
  301. {
  302. GetFocus()->SendMessage(WM_COPY);
  303. return TRUE;
  304. }
  305. break;
  306. case 0x56: //Ctrl + V:
  307. if ((GetKeyState(VK_CONTROL) & 0x80))
  308. {
  309. GetFocus()->SendMessage(WM_PASTE);
  310. return TRUE;
  311. }
  312. break;
  313. case 0x58: // cut
  314. if ((GetKeyState(VK_CONTROL) & 0x80))
  315. {
  316. GetFocus()->SendMessage(WM_CUT);
  317. return TRUE;
  318. }
  319. break;
  320. case 0x5A: //undo
  321. case 0x59: //redo
  322. if ((GetKeyState(VK_CONTROL) & 0x80))
  323. {
  324. GetFocus()->SendMessage(WM_UNDO);
  325. return TRUE;
  326. }
  327. break;
  328. }
  329. }
  330. }
  331. catch (...)
  332. {
  333. }
  334. return MyFormView::PreTranslateMessage(pMsg);
  335. }
  336. extern int CALLBACK BrowseProc(HWND hwnd, UINT msg, LPARAM lParam, LPARAM lpData);
  337. /*{
  338. switch(msg)
  339. {
  340. case BFFM_INITIALIZED:
  341. SendMessage(hwnd, BFFM_SETSELECTION, TRUE, NULL);
  342. break;
  343. case BFFM_SELCHANGED:
  344. {
  345. char szFileName[MAX_PATH];
  346. LPITEMIDLIST pidlCurrent = (LPITEMIDLIST)lParam;
  347. SHGetPathFromIDList(pidlCurrent, szFileName);
  348. SendMessage(hwnd, BFFM_SETSTATUSTEXT, 0, (LPARAM)szFileName);
  349. }
  350. break;
  351. }
  352. return 0;
  353. }*/
  354. void BurnCD::GetSavePath(CString &path)
  355. {
  356. char lpszDisplayName[MAX_PATH], szFileName[MAX_PATH];
  357. LPITEMIDLIST pidlDesktop, pidlCurrent;
  358. if (SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidlDesktop)== NOERROR)
  359. {
  360. BROWSEINFO bi;
  361. bi.hwndOwner = this->m_hWnd;
  362. bi.pidlRoot = pidlDesktop;
  363. bi.pszDisplayName = lpszDisplayName;
  364. bi.lpszTitle = "\n文档保存的目录:";
  365. bi.ulFlags = BIF_STATUSTEXT&BIF_RETURNONLYFSDIRS;
  366. bi.lpfn = BrowseProc;
  367. bi.lParam = 0;
  368. bi.iImage = 0;
  369. pidlCurrent = SHBrowseForFolder(&bi);
  370. SHGetPathFromIDList(pidlCurrent, szFileName);
  371. path = szFileName;
  372. }
  373. }
  374. int BurnCD::FindArray(CStringArray *pArray, CString Str)
  375. {
  376. for (int i = 0; i < pArray->GetSize(); i++)
  377. {
  378. if (pArray->ElementAt(i) == Str)
  379. return i;
  380. }
  381. return -1;
  382. }
  383. void BurnCD::GetNo(CString str, CStringArray &array)
  384. {
  385. if (!str.IsEmpty())
  386. {
  387. #ifdef USE_SEP_VEB
  388. int pos = str.Find(SEPS_VEB);
  389. #else
  390. int pos = str.Find(",");
  391. #endif
  392. while (pos != -1)
  393. {
  394. if (FindArray(&array, str.Left(pos)) == -1)
  395. array.Add(str.Left(pos));
  396. str = str.Right(str.GetLength() - pos - 1);
  397. #ifdef USE_SEP_VEB
  398. pos = str.Find(SEPS_VEB);
  399. #else
  400. pos = str.Find(",");
  401. #endif
  402. }
  403. if (FindArray(&array, str) == -1)
  404. array.Add(str);
  405. }
  406. }
  407. CString BurnCD::GetSelName(CString name, CArray<CStringArray, CStringArray>&spnamearray)
  408. {
  409. CString ret;
  410. #ifdef USE_SEP_VEB
  411. name = SEPS_VEB + name + SEPS_VEB;
  412. #else
  413. name = "," + name + ",";
  414. #endif
  415. CString str;
  416. for (int i = 0; i < spnamearray.GetSize(); i++)
  417. {
  418. #ifdef USE_SEP_VEB
  419. str = SEPS_VEB + spnamearray.ElementAt(i).ElementAt(6) + SEPS_VEB;
  420. #else
  421. str = "," + spnamearray.ElementAt(i).ElementAt(6) + ",";
  422. #endif
  423. if (str.Find(name) != -1)
  424. {
  425. ret += spnamearray.ElementAt(i).ElementAt(5);
  426. ret += ";";
  427. }
  428. }
  429. ret.TrimRight(";");
  430. ret.Replace("*", "x");
  431. return ret;
  432. }
  433. void BurnCD::OnButton1()
  434. {
  435. UpdateData();
  436. m_filter.TrimLeft();
  437. m_filter.TrimRight();
  438. FillGrid();
  439. }
  440. void BurnCD::OnButton2()
  441. {
  442. UpdateData();
  443. m_filter.TrimLeft();
  444. m_filter.TrimRight();
  445. FillGrid(1);
  446. }
  447. void BurnCD::OnItemchangedList2(NMHDR* pNMHDR, LRESULT* pResult)
  448. {
  449. NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
  450. *pResult = 0;
  451. }
  452. /************************************************************************/
  453. /*
  454. 函数: OnBUTburncd
  455. 描述: 光盘刻录按钮
  456. 参数:
  457. 返回:
  458. 注意:
  459. */
  460. /************************************************************************/
  461. void BurnCD::OnBUTburncd() // 光盘刻录按钮;
  462. {
  463. if (IsHasRights2new(46) == 0)return;
  464. POSITION pos = m_List1.GetFirstSelectedItemPosition();
  465. if (pos == NULL)
  466. {
  467. AfxMessageBox("请先选中您要刻盘的定单!", MB_ICONINFORMATION);
  468. return;
  469. }
  470. int iItem = m_List1.GetNextSelectedItem(pos);
  471. CString strOrderNum = m_List1.GetItemText(iItem, 0);
  472. CString name1 = m_List1.GetItemText(iItem, 1);
  473. CString name2 = m_List1.GetItemText(iItem, 2);
  474. CString str = m_List1.GetItemText(iItem, 4);
  475. CString bruncount;
  476. bruncount.Format("%d", atoi(str) + 1);
  477. CString strCustomerInfo;
  478. if (!name1.IsEmpty())
  479. strCustomerInfo = name1 + ",";
  480. strCustomerInfo += name2;
  481. strCustomerInfo.TrimRight(",");
  482. CNeroDlg mBurnDlg;
  483. mBurnDlg.m_strOrderNum = strOrderNum;
  484. mBurnDlg.m_strCustomerInfo = strCustomerInfo;
  485. if (mBurnDlg.DoModal() != IDOK)
  486. return;
  487. CString remark = "选中的照片";
  488. if (mBurnDlg.m_checkphoto4)
  489. {
  490. remark += "+全部原片";
  491. if (mBurnDlg.m_bScale == 0)
  492. remark += "(未缩放)";
  493. else
  494. {
  495. int pos = mBurnDlg.m_combo1.GetCurSel();
  496. if (pos == 0)
  497. remark += "(缩放1600x1200)";
  498. else if (pos == 1)
  499. remark += "(缩放1024x768)";
  500. else if (pos == 2)
  501. remark += "(缩放800x600)";
  502. else
  503. remark += "(缩放640x480)";
  504. }
  505. }
  506. CString sql;
  507. sql = "update dindan set status7='OK' where id='" + strOrderNum + "'";
  508. sql += "^^^insert into burncdreg([id],[date],[ren],[remark])values('" + strOrderNum + "','" + g_date + "','" + g_user.name + "','" + remark + "')";
  509. sql += "^^^";
  510. sql += strOrderNum;
  511. g_sendhead.bsql = 1;
  512. g_pMainWnd->ProcessChatMessageRequest2(sql); if (g_bSendOK == 0)return;
  513. for (int i = 0; i < m_List1array.GetSize(); i++)
  514. {
  515. if (strOrderNum == m_List1array.ElementAt(i).ElementAt(0))
  516. {
  517. m_List1array.ElementAt(i).SetAt(3, "OK");
  518. m_List1array.ElementAt(i).SetAt(4, bruncount);
  519. FillGrid();
  520. break;
  521. }
  522. }
  523. }
  524. void BurnCD::OnDblclkList2(NMHDR* pNMHDR, LRESULT* pResult)
  525. {
  526. OnBUTburncd();
  527. *pResult = 0;
  528. }
  529. void BurnCD::OnBUTburnreg() // 刻录记录;
  530. {
  531. CArray<CStringArray, CStringArray>List1array;
  532. POSITION pos;
  533. pos = m_List1.GetFirstSelectedItemPosition();
  534. if (pos == NULL)
  535. {
  536. AfxMessageBox("请先选中您要查看的定单!", MB_ICONINFORMATION);
  537. return;
  538. }
  539. int iItem = m_List1.GetNextSelectedItem(pos);
  540. CString id = m_List1.GetItemText(iItem, 0);
  541. g_sendhead.bsql = 0;
  542. g_sendhead.code[0] = 81;
  543. g_sendhead.tabcount = 1;
  544. CString filter = "[id]='" + id + "'";
  545. g_pMainWnd->ProcessChatMessageRequest2(filter); if (g_bSendOK == 0)return;
  546. DataToArray(&List1array);
  547. CString str;
  548. CString temp;
  549. if (List1array.GetSize() == 0)
  550. {
  551. str = "没有相关记录!";
  552. }
  553. else
  554. {
  555. for (int i = 0; i < List1array.GetSize(); i++)
  556. {
  557. temp = List1array.ElementAt(i).ElementAt(0);
  558. ::FillLength(temp, 10);
  559. str += temp;
  560. str += List1array.ElementAt(i).ElementAt(1);
  561. str += " ";
  562. str += List1array.ElementAt(i).ElementAt(2);
  563. str += "\r\n";
  564. }
  565. }
  566. AfxMessageBox(str, MB_ICONINFORMATION);
  567. }
  568. void BurnCD::OnClickList2(NMHDR* pNMHDR, LRESULT* pResult)
  569. {
  570. POSITION pos;
  571. pos = m_List1.GetFirstSelectedItemPosition();
  572. if (pos == NULL)return;
  573. int iItem = m_List1.GetNextSelectedItem(pos);
  574. g_id = m_List1.GetItemText(iItem, 0);
  575. *pResult = 0;
  576. }
  577. void BurnCD::HidePrice()
  578. {
  579. }