ClientForm.cpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. // CClientForm.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "ClientForm.h"
  6. #include "MyMdi.H"
  7. #include "SendMsgDlg.h"
  8. #include "SelBrunDevice.h"
  9. #include "SelExportType.h"
  10. #ifdef _DEBUG
  11. #define new DEBUG_NEW
  12. #undef THIS_FILE
  13. static char THIS_FILE[] = __FILE__;
  14. #endif
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CClientForm
  17. IMPLEMENT_DYNCREATE(CClientForm, MyFormView)
  18. CClientForm::CClientForm()
  19. : MyFormView(CClientForm::IDD)
  20. {
  21. //{{AFX_DATA_INIT(CClientForm)
  22. m_filter = _T("");
  23. //}}AFX_DATA_INIT
  24. }
  25. CClientForm::~CClientForm()
  26. {
  27. }
  28. void CClientForm::DoDataExchange(CDataExchange* pDX)
  29. {
  30. MyFormView::DoDataExchange(pDX);
  31. //{{AFX_DATA_MAP(CClientForm)
  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. //}}AFX_DATA_MAP
  37. }
  38. BEGIN_MESSAGE_MAP(CClientForm, MyFormView)
  39. //{{AFX_MSG_MAP(CClientForm)
  40. ON_BN_CLICKED(IDC_BUTclose, OnBUTclose)
  41. ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
  42. ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1)
  43. ON_WM_TIMER()
  44. ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
  45. ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
  46. //}}AFX_MSG_MAP
  47. END_MESSAGE_MAP()
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CClientForm diagnostics
  50. #ifdef _DEBUG
  51. void CClientForm::AssertValid() const
  52. {
  53. MyFormView::AssertValid();
  54. }
  55. void CClientForm::Dump(CDumpContext& dc) const
  56. {
  57. MyFormView::Dump(dc);
  58. }
  59. #endif //_DEBUG
  60. /////////////////////////////////////////////////////////////////////////////
  61. // CClientForm message handlers
  62. void CClientForm::OnInitialUpdate()
  63. {
  64. MyFormView::OnInitialUpdate();
  65. // TODO: Add your specialized code here and/or call the base class
  66. CMyMdi Mdi;
  67. Mdi.SetSubView((CWnd*)GetParent(), (CWnd*)this);
  68. m_bHideBtn = 0;
  69. if (g_dx >= 10000)
  70. {
  71. m_bHideBtn = 1;
  72. g_dx -= 10000;
  73. }
  74. // Here we create the outbar control using the splitter as its parent
  75. // and setting its id to the first pane.
  76. CRect rc2;
  77. GetWindowRect(rc2);
  78. ::MoveWindow(m_hWnd, g_rc.left, g_rc.top, g_rc.Width(), g_rc.Height(), TRUE);
  79. EnumChildWindows(m_hWnd, (WNDENUMPROC)EnumChildProc, 0);
  80. if (m_bHideBtn)
  81. {
  82. CRect rc, rc2;
  83. // GetDlgItem(IDC_BUTTON2)->ShowWindow(SW_HIDE);
  84. GetDlgItem(IDC_BUTTON2)->SetWindowText("导出");
  85. GetDlgItem(IDC_BUTTON2)->EnableWindow(IsHasRights2new(49));
  86. GetDlgItem(IDC_BUTTON3)->ShowWindow(SW_HIDE);
  87. GetDlgItem(IDC_BUTTON3)->GetWindowRect(rc);
  88. ScreenToClient(rc);
  89. GetDlgItem(IDC_BUTTON1)->GetWindowRect(rc2);
  90. ScreenToClient(rc2);
  91. rc2.right -= rc2.right - rc.right;
  92. rc2.left = rc.left;
  93. GetDlgItem(IDC_BUTTON1)->MoveWindow(rc2);
  94. m_static1.SetWindowText("订单客户");
  95. }
  96. m_static1.SetFont(&g_titlefont);
  97. #ifdef CHILD_VERSION
  98. //m_List1.SetHeadings("订单号,100;家长姓名,100;宝宝姓名,100;手机,100;固定电话,100;地址,100;地区,100;宝宝生日,100;QQ,100;套系名称,100;套系价格,100");
  99. m_List1.SetHeadings("订单号,100;家长姓名,100;宝宝姓名,100;手机,100;固定电话,100;地址,100;地区,100;宝宝生日,100;QQ,100;套系名称,100;套系价格,100;拍照状态,100;选片状态,100;取件状态,100;初修状态,100;设计状态,100;看设计状态,100");
  100. #else
  101. // 添加一婚期;
  102. //m_List1.SetHeadings("订单号,100;男宾姓名,100;女宾姓名,100;男宾电话,100;女宾电话,100;男宾地址,100;女宾地址,100;男宾地区,100;女宾地区,100;男宾生日,100;女宾生日,100;男宾QQ,100;女宾QQ,100;婚期,100;套系名称,100;套系价格,100" );
  103. m_List1.SetHeadings("订单号,100;男宾姓名,100;女宾姓名,100;男宾电话,100;女宾电话,100;男宾地址,100;女宾地址,100;男宾地区,100;女宾地区,100;男宾生日,100;女宾生日,100;男宾QQ,100;女宾QQ,100;婚期,100;套系名称,100;套系价格,100;拍照状态,100;选片状态,100;取件状态,100;初修状态,100;设计状态,100;看设计状态,100" );
  104. #endif
  105. m_List1.LoadColumnInfo(108);
  106. g_sendhead.bsql = 0;
  107. g_sendhead.code[0] = 15;
  108. g_sendhead.code[1] = 6;
  109. g_sendhead.tabcount = 2;
  110. g_pMainWnd->ProcessChatMessageRequest2(15);
  111. if (g_bSendOK == 0)return;
  112. DataToArray(&m_List1array, &g_List1array);
  113. HidePrice();
  114. for (int i = 0; i < g_List1array.GetSize(); i++)
  115. {
  116. if (m_combo1.FindString(0, g_List1array.ElementAt(i).ElementAt(1)) == -1)
  117. m_combo1.AddString(g_List1array.ElementAt(i).ElementAt(1));
  118. }
  119. FillGrid();
  120. m_combo1.GetWindowRect(rc2);
  121. ScreenToClient(rc2);
  122. rc2.bottom += 200;
  123. m_combo1.MoveWindow(rc2);
  124. GetDlgItem(IDC_BUTclose)->GetWindowRect(rc2);
  125. SetComboHei(&m_combo1, rc2.Height());
  126. }
  127. void CClientForm::FillGrid(int mode)
  128. {
  129. UpdateData();
  130. m_List1.DeleteAllItems2();
  131. int ii = 0;
  132. m_List1.m_arLabels.SetSize(m_List1array.GetSize(), 1);
  133. int count = 0;
  134. #ifdef CHILD_VERSION
  135. if (!m_area.IsEmpty())
  136. {
  137. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  138. {
  139. if (m_List1array.ElementAt(ii).ElementAt(6) == m_area)
  140. {
  141. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  142. }
  143. }
  144. }
  145. else
  146. {
  147. if (m_filter.IsEmpty())
  148. {
  149. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  150. {
  151. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  152. }
  153. }
  154. else
  155. {
  156. int type = GetType(m_filter);
  157. if (type == 1)//电话
  158. {
  159. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  160. {
  161. if (m_List1array.ElementAt(ii).ElementAt(3).Find(m_filter) != -1 || \
  162. m_List1array.ElementAt(ii).ElementAt(4).Find(m_filter) != -1)
  163. {
  164. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  165. }
  166. }
  167. }
  168. else if (type == 2)//拼音
  169. {
  170. m_filter.MakeUpper();
  171. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  172. {
  173. if (m_List1array.ElementAt(ii).ElementAt(11).Find(m_filter) != -1 || \
  174. m_List1array.ElementAt(ii).ElementAt(12).Find(m_filter) != -1)
  175. {
  176. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  177. }
  178. }
  179. }
  180. else
  181. {
  182. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  183. {
  184. if (m_List1array.ElementAt(ii).ElementAt(0).Find(m_filter) != -1 || \
  185. m_List1array.ElementAt(ii).ElementAt(1).Find(m_filter) != -1 || \
  186. m_List1array.ElementAt(ii).ElementAt(2).Find(m_filter) != -1 || \
  187. m_List1array.ElementAt(ii).ElementAt(3).Find(m_filter) != -1 || \
  188. m_List1array.ElementAt(ii).ElementAt(4).Find(m_filter) != -1 || \
  189. m_List1array.ElementAt(ii).ElementAt(9).Find(m_filter) != -1)
  190. {
  191. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  192. }
  193. }
  194. }
  195. }
  196. }
  197. #else
  198. if(!m_area.IsEmpty ())
  199. {
  200. for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
  201. {
  202. if(m_List1array.ElementAt(ii).ElementAt(7)==m_area || m_List1array.ElementAt(ii).ElementAt(8)==m_area)
  203. {
  204. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  205. }
  206. }
  207. }
  208. else
  209. {
  210. if(m_filter.IsEmpty ())
  211. {
  212. for(ii=0; ii<m_List1.m_arLabels.GetSize(); ii++)
  213. {
  214. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  215. }
  216. }
  217. else
  218. {
  219. int type=GetType(m_filter);
  220. if(type==1)//电话
  221. {
  222. for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
  223. {
  224. if(m_List1array.ElementAt (ii).ElementAt (3).Find (m_filter)!=-1 || m_List1array.ElementAt (ii).ElementAt (4).Find (m_filter)!=-1)
  225. {
  226. m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
  227. }
  228. }
  229. }
  230. else if(type==2)//拼音
  231. {
  232. m_filter.MakeUpper ();
  233. for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
  234. {
  235. if(m_List1array.ElementAt (ii).ElementAt (15).Find (m_filter)!=-1 || \
  236. m_List1array.ElementAt (ii).ElementAt (16).Find (m_filter)!=-1)
  237. {
  238. m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
  239. }
  240. }
  241. }
  242. else
  243. {
  244. for(ii=0; ii<m_List1.m_arLabels.GetSize (); ii++)
  245. {
  246. if(m_List1array.ElementAt (ii).ElementAt (0).Find (m_filter)!=-1 || \
  247. m_List1array.ElementAt (ii).ElementAt (1).Find (m_filter)!=-1 ||\
  248. m_List1array.ElementAt (ii).ElementAt (2).Find (m_filter)!=-1 ||\
  249. m_List1array.ElementAt (ii).ElementAt (3).Find (m_filter)!=-1 ||\
  250. m_List1array.ElementAt (ii).ElementAt (4).Find (m_filter)!=-1 ||\
  251. m_List1array.ElementAt (ii).ElementAt (13).Find (m_filter)!=-1)
  252. {
  253. m_List1.m_arLabels.ElementAt (count++).Copy (m_List1array.ElementAt (ii));
  254. }
  255. }
  256. }
  257. }
  258. }
  259. #endif
  260. m_List1.m_arLabels.SetSize(count, 1);
  261. ii = count;
  262. m_List1.m_LabelCount = ii;
  263. m_List1.SetItemCountEx(ii);
  264. }
  265. void CClientForm::OnBUTclose()
  266. {
  267. // TODO: Add your control notification handler code here
  268. GetParent()->SendMessage(WM_CLOSE);
  269. }
  270. void CClientForm::OnSelchangeCombo1()
  271. {
  272. // TODO: Add your control notification handler code here
  273. SetTimer(1, 100, NULL);
  274. }
  275. void CClientForm::OnTimer(UINT nIDEvent)
  276. {
  277. // TODO: Add your message handler code here and/or call default
  278. KillTimer(nIDEvent);
  279. OnButton1();
  280. }
  281. BOOL CClientForm::PreTranslateMessage(MSG* pMsg)
  282. {
  283. // TODO: Add your specialized code here and/or call the base class
  284. try
  285. {
  286. if (pMsg->message == WM_KEYDOWN)
  287. {
  288. switch (pMsg->wParam)
  289. {
  290. case VK_RETURN:
  291. OnButton1();
  292. return 1;
  293. case 0x43: // copy
  294. if ((GetKeyState(VK_CONTROL) & 0x80))
  295. {
  296. GetFocus()->SendMessage(WM_COPY);
  297. return TRUE;
  298. }
  299. break;
  300. case 0x56: //Ctrl + V:
  301. if ((GetKeyState(VK_CONTROL) & 0x80))
  302. {
  303. GetFocus()->SendMessage(WM_PASTE);
  304. return TRUE;
  305. }
  306. break;
  307. case 0x58: // cut
  308. if ((GetKeyState(VK_CONTROL) & 0x80))
  309. {
  310. GetFocus()->SendMessage(WM_CUT);
  311. return TRUE;
  312. }
  313. break;
  314. case 0x5A: //undo
  315. case 0x59: //redo
  316. if ((GetKeyState(VK_CONTROL) & 0x80))
  317. {
  318. GetFocus()->SendMessage(WM_UNDO);
  319. return TRUE;
  320. }
  321. break;
  322. }
  323. }
  324. return MyFormView::PreTranslateMessage(pMsg);
  325. }
  326. catch (...)
  327. {
  328. }
  329. return TRUE;
  330. }
  331. void CClientForm::OnButton1()
  332. {
  333. // TODO: Add your control notification handler code here
  334. UpdateData();
  335. m_filter.TrimLeft();
  336. m_filter.TrimRight();
  337. m_area.Empty();
  338. FillGrid();
  339. }
  340. void CClientForm::OnButton2()
  341. {
  342. // TODO: Add your control notification handler code here
  343. if (m_bHideBtn)
  344. {
  345. GetClientPhone();
  346. return;
  347. }
  348. POSITION pos;
  349. pos = m_List1.GetFirstSelectedItemPosition();
  350. if (pos == NULL)
  351. {
  352. AfxMessageBox("请先选中您要发送短信的客人!", MB_ICONINFORMATION);
  353. return;
  354. }
  355. int iItem;
  356. CStringArray array;
  357. while (pos)
  358. {
  359. iItem = m_List1.GetNextSelectedItem(pos);
  360. array.Add(m_List1.GetItemText(iItem, 3));
  361. array.Add(m_List1.GetItemText(iItem, 4));
  362. }
  363. SendMsgDlg dlg;
  364. dlg.m_pArray = &array;
  365. dlg.DoModal();
  366. }
  367. void CClientForm::OnButton3()
  368. {
  369. // TODO: Add your control notification handler code here
  370. g_sendhead.bsql = 0;
  371. g_sendhead.code[0] = 82;
  372. g_sendhead.tabcount = 1;
  373. g_pMainWnd->ProcessChatMessageRequest2(1);
  374. if (g_bSendOK == 0)
  375. {
  376. return;
  377. }
  378. CArray<CStringArray, CStringArray>m_List1array;
  379. DataToArray(&m_List1array); HidePrice();
  380. if (m_List1array.GetSize() == 0)return;
  381. CStringArray array;
  382. for (int i = 0; i < m_List1array.GetSize(); i++)
  383. {
  384. array.Add(m_List1array.ElementAt(i).ElementAt(0));
  385. }
  386. SelBrunDevice dlg;
  387. dlg.pArray = &array;
  388. if (dlg.DoModal() == IDOK)
  389. {
  390. m_area = array.ElementAt(dlg.m_sel);
  391. FillGrid();
  392. }
  393. }
  394. void CClientForm::GetClientPhone()
  395. {
  396. SelExportType dlg;
  397. if (dlg.DoModal() != IDOK)return;
  398. if (dlg.m_type == 1)
  399. {
  400. ListToXLS(&m_List1, "c:\\客户资料.xls", 0);
  401. return;
  402. }
  403. #ifdef CHILD_VERSION
  404. CStdioFile fp;
  405. if ( fp.Open("c:\\clientphone.txt", CFile::modeCreate | CFile::modeWrite) )
  406. {
  407. AfxMessageBox(_T("创建文件失败,请在管理员权限下运行!"));
  408. return;
  409. }
  410. CString str;
  411. CString str1, str2, str3, str4, str5, str6, str7, str8, str9, str10, str11, str12, str13, str14;
  412. CString phone;
  413. CString txname, txprice, mensi;
  414. int leng1 = 20;
  415. int leng2 = 20;
  416. int leng3 = 20;
  417. int leng4 = 20;
  418. int leng5 = 15;
  419. int leng6 = 15;
  420. int leng7 = 15;
  421. int leng8 = 15;
  422. int leng9 = 15;
  423. int leng10 = 15;
  424. int leng11 = 15;
  425. int leng12 = 15;
  426. int leng13 = 15;
  427. int leng14 = 15;
  428. int leng15 = 15;
  429. int leng16 = 15;
  430. int leng17 = 15;
  431. str1 = "家长姓名";
  432. str2 = "宝宝姓名";
  433. str3 = "手机";
  434. str4 = "电话";
  435. str5 = "QQ";
  436. str6 = "宝宝生日";
  437. str7 = "套系";
  438. str8 = "金额";
  439. str9 = _T("拍照状态");
  440. str10 = _T("选片状态");
  441. str11 = _T("取件状态");
  442. str12 = _T("初修状态");
  443. str13 = _T("设计状态");
  444. str14 = _T("看设计状态");
  445. FillLength(str1, leng1);
  446. FillLength(str2, leng2);
  447. FillLength(str3, leng3);
  448. FillLength(str4, leng4);
  449. FillLength(str5, leng5);
  450. FillLength(str6, leng6);
  451. FillLength(str7, leng7);
  452. FillLength(str8, leng8);
  453. FillLength(str9 , leng9 );
  454. FillLength(str10, leng10);
  455. FillLength(str11, leng11);
  456. FillLength(str12, leng12);
  457. FillLength(str13, leng13);
  458. FillLength(str14, leng14);
  459. //订单号,100;家长姓名,100;宝宝姓名,100;手机,100;固定电话,100;地址,100;地区,100;宝宝生日,100;QQ,100;套系名称,100;套系价格,100;拍照状态,100;选片状态,100;取件状态,100;初修状态,100;设计状态,100;看设计状态,100
  460. str = str1 + str2 + str3 + str4 + str5 + str6 + str7 + str8 + str9 + str10 + str11 + str12 + str13 + str14 + "\n";
  461. fp.WriteString(str);
  462. for (int i = 0; i < m_List1.GetItemCount(); i++)
  463. {
  464. str1 = m_List1.GetItemText(i, 1);
  465. str2 = m_List1.GetItemText(i, 2);
  466. str3 = m_List1.GetItemText(i, 3);
  467. str4 = m_List1.GetItemText(i, 4);
  468. str5 = m_List1.GetItemText(i, 8);
  469. str6 = m_List1.GetItemText(i, 7);
  470. str7 = m_List1.GetItemText(i, 9);
  471. str8 = m_List1.GetItemText(i, 10);
  472. str9 = m_List1.GetItemText(i, 11);
  473. str10= m_List1.GetItemText(i, 12);
  474. str11= m_List1.GetItemText(i, 13);
  475. str12= m_List1.GetItemText(i, 14);
  476. str13= m_List1.GetItemText(i, 15);
  477. str14= m_List1.GetItemText(i, 16);
  478. FillLength(str1, leng1);
  479. FillLength(str2, leng2);
  480. FillLength(str3, leng3);
  481. FillLength(str4, leng4);
  482. FillLength(str5, leng5);
  483. FillLength(str6, leng6);
  484. FillLength(str7, leng7);
  485. FillLength(str8, leng8);
  486. FillLength(str9 , leng9 );
  487. FillLength(str10, leng10);
  488. FillLength(str11, leng11);
  489. FillLength(str12, leng12);
  490. FillLength(str13, leng13);
  491. FillLength(str14, leng14);
  492. str = str1 + str2 + str3 + str4 + str5 + str6 + str7 + str8 + str9 + str10 + str11 + str12 + str13 + str14 + "\n";
  493. fp.WriteString(str);
  494. }
  495. fp.Close();
  496. MessageBox("电话已保存到c:\\clientphone.txt");
  497. ShellExecute(NULL, _T("open"), _T("c:\\clientphone.txt"), NULL, NULL, SW_SHOWMAXIMIZED);
  498. #else
  499. CStdioFile fp;
  500. if ( !fp.Open("c:\\clientphone.txt", CFile::modeCreate|CFile::modeWrite) )
  501. {
  502. AfxMessageBox(_T("创建文件失败,请在管理员权限下运行!"));
  503. return;
  504. }
  505. CString str;
  506. CString str1,str2,str3,str4,str5,str6,str7,str8,str9,str10,str11;
  507. CString phone;
  508. CString txname,txprice,mensi;
  509. int leng1=15;
  510. int leng2=15;
  511. int leng3=18;
  512. int leng4=18;
  513. int leng5=15;
  514. int leng6=15;
  515. int leng7=15;
  516. int leng8=15;
  517. int leng9=20;
  518. int leng10=15;
  519. //100;拍照状态,100;选片状态,100;取件状态,100;初修状态,100;设计状态,100;看设计状态,100
  520. str1="男宾";
  521. str2="女宾";
  522. str3="男宾电话";
  523. str4="女宾电话";
  524. str5="男宾QQ";
  525. str6="女宾QQ";
  526. str7="男宾生日";
  527. str8="女宾生日";
  528. str9="套系";
  529. str10="金额";
  530. FillLength(str1, leng1);
  531. FillLength(str2, leng2);
  532. FillLength(str3, leng3);
  533. FillLength(str4, leng4);
  534. FillLength(str5, leng5);
  535. FillLength(str6, leng6);
  536. FillLength(str7, leng7);
  537. FillLength(str8, leng8);
  538. FillLength(str9, leng9);
  539. FillLength(str10,leng10);
  540. str= str1 + str2 + str3 + str4 + str5 + str6 + str7 + str8 + str9 + str10 + "\n";
  541. fp.WriteString (str);
  542. //"订单号,100;男宾姓名,100;女宾姓名,100;男宾电话,100;女宾电话,100;男宾地址,100;女宾地址,100;男宾地区,100;女宾地区,100;男宾生日,100;女宾生日,100;
  543. // 男宾QQ,100;女宾QQ,100;婚期,100; 套系名称,100;套系价格,100;拍照状态,100;选片状态,100;取件状态,100;初修状态,100;设计状态,100;看设计状态,100"
  544. for(int i=0; i<m_List1.GetItemCount (); i++)
  545. {
  546. str1=m_List1.GetItemText (i, 1);
  547. str2=m_List1.GetItemText (i, 2);
  548. str3=m_List1.GetItemText (i, 3);
  549. str4=m_List1.GetItemText (i, 4);
  550. str5=m_List1.GetItemText (i, 11);
  551. str6=m_List1.GetItemText (i, 12);
  552. str7=m_List1.GetItemText (i, 9);
  553. str8=m_List1.GetItemText (i, 10);
  554. str9=m_List1.GetItemText (i, 14);
  555. str10=m_List1.GetItemText (i, 15);
  556. FillLength(str1, leng1);
  557. FillLength(str2, leng2);
  558. FillLength(str3, leng3);
  559. FillLength(str4, leng4);
  560. FillLength(str5, leng5);
  561. FillLength(str6, leng6);
  562. FillLength(str7, leng7);
  563. FillLength(str8, leng8);
  564. FillLength(str9, leng9);
  565. FillLength(str10,leng10);
  566. str=str1+str2+str3+str4+str5+str6+str7+str8+str9+str10 + "\n";
  567. fp.WriteString (str);
  568. }
  569. fp.Close ();
  570. MessageBox("电话已保存到c:\\clientphone.txt");
  571. ShellExecute(NULL, _T("open"), _T("c:\\clientphone.txt"), NULL, NULL, SW_SHOWMAXIMIZED);
  572. #endif
  573. }
  574. void CClientForm::HidePrice()
  575. {
  576. #ifdef LKAY_VERSION
  577. if(!m_bHideBtn)return;
  578. if(IsHasRights2new(31))return;
  579. for(int i=0; i< m_List1array.GetSize (); i++)
  580. {
  581. m_List1array.ElementAt (i).SetAt (3, "***");
  582. m_List1array.ElementAt (i).SetAt (4, "***");
  583. m_List1array.ElementAt (i).SetAt (9, "***");
  584. m_List1array.ElementAt (i).SetAt (10, "***");
  585. }
  586. #else
  587. if (!m_bHideBtn)return;
  588. if (IsHasRights2new(31))return;
  589. for (int i = 0; i < m_List1array.GetSize(); i++)
  590. {
  591. m_List1array.ElementAt (i).SetAt (3, "***");
  592. m_List1array.ElementAt (i).SetAt (4, "***");
  593. m_List1array.ElementAt(i).SetAt(9, "***");
  594. m_List1array.ElementAt(i).SetAt(10, "***");
  595. }
  596. #endif
  597. }