BurnCD.cpp 16 KB

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