DinDanHistroy.cpp 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124
  1. // DinDanHistroy.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "DinDanHistroy.h"
  6. #include "MyMdi.h"
  7. #include "ModifyDinDan.h"
  8. #include "ClientDlg.h"
  9. #include "ClientDlg2.h"
  10. #include "./helper/ffsco.h"
  11. #include "Booking2.h"
  12. #include "SelExportType.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. ////////////////////////////////////////////////////////////////////IDC_BUTprint
  20. // DinDanHistroy IDC_COMBO5
  21. IMPLEMENT_DYNCREATE(DinDanHistroy, MyFormView)
  22. DinDanHistroy::DinDanHistroy()
  23. : MyFormView(DinDanHistroy::IDD)
  24. {
  25. //{{AFX_DATA_INIT(DinDanHistroy)
  26. m_filter = _T("");
  27. m_radio1 = 3;
  28. //}}AFX_DATA_INIT
  29. }
  30. DinDanHistroy::~DinDanHistroy()
  31. {
  32. }
  33. void DinDanHistroy::DoDataExchange(CDataExchange* pDX)
  34. {
  35. MyFormView::DoDataExchange(pDX);
  36. //{{AFX_DATA_MAP(DinDanHistroy)
  37. DDX_Control(pDX, IDC_COMBO1, m_combo1);
  38. DDX_Control(pDX, IDC_LIST2, m_List1);
  39. DDX_Control(pDX, IDC_STATIC1, m_static1);
  40. DDX_CBString(pDX, IDC_COMBO1, m_filter);
  41. DDX_Radio(pDX, IDC_RADIO1, m_radio1);
  42. //}}AFX_DATA_MAP
  43. }
  44. BEGIN_MESSAGE_MAP(DinDanHistroy, MyFormView)
  45. //{{AFX_MSG_MAP(DinDanHistroy)
  46. ON_BN_CLICKED(IDC_BUTclose, OnBUTclose)
  47. ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
  48. ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1)
  49. ON_WM_TIMER()
  50. ON_BN_CLICKED(IDC_BUTmodify3, OnBUTmodify3)
  51. ON_BN_CLICKED(IDC_BUTmodify4, OnBUTmodify4)
  52. ON_BN_CLICKED(IDC_BUTmodify, OnBUTmodify)
  53. ON_BN_CLICKED(IDC_BUTprint, OnBUTprint)
  54. ON_NOTIFY(NM_DBLCLK, IDC_LIST2, OnDblclkList2)
  55. ON_BN_CLICKED(IDC_BUTclient, OnBUTclient)
  56. ON_NOTIFY(NM_CLICK, IDC_LIST2, OnClickList2)
  57. ON_BN_CLICKED(IDC_BUTprint3, OnBUTprint3)
  58. ON_NOTIFY(NM_CUSTOMDRAW, IDC_LIST2, OnCustomdrawList1)
  59. ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
  60. ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
  61. ON_BN_CLICKED(IDC_BTNSEARCHFILTER, OnBtnsearchfilter)
  62. ON_BN_CLICKED(IDC_RADIO4, OnRadio4)
  63. ON_BN_CLICKED(IDC_RADIO6, OnRadio6)
  64. ON_BN_CLICKED(IDC_RADIO7, OnRadio7)
  65. //}}AFX_MSG_MAP
  66. END_MESSAGE_MAP()
  67. /////////////////////////////////////////////////////////////////////////////
  68. // DinDanHistroy diagnostics
  69. #ifdef _DEBUG
  70. void DinDanHistroy::AssertValid() const
  71. {
  72. MyFormView::AssertValid();
  73. }
  74. void DinDanHistroy::Dump(CDumpContext& dc) const
  75. {
  76. MyFormView::Dump(dc);
  77. }
  78. #endif //_DEBUG
  79. /////////////////////////////////////////////////////////////////////////////
  80. // DinDanHistroy message handlers
  81. extern void SetComboHei(CComboBox *pCombo, int hei);
  82. void DinDanHistroy::OnInitialUpdate()
  83. {
  84. MyFormView::OnInitialUpdate();
  85. CMyMdi Mdi;
  86. Mdi.SetSubView((CWnd*)GetParent(), (CWnd*)this);
  87. #ifndef LKAY_VERSION
  88. GetDlgItem(IDC_STATIC4)->ShowWindow(0);
  89. GetDlgItem(IDC_RADIO1)->ShowWindow(0);
  90. GetDlgItem(IDC_RADIO3)->ShowWindow(0);
  91. GetDlgItem(IDC_RADIO4)->ShowWindow(0);
  92. GetDlgItem(IDC_RADIO6)->ShowWindow(0);
  93. GetDlgItem(IDC_RADIO7)->ShowWindow(0);
  94. #endif
  95. CRect rc2;
  96. GetWindowRect(rc2);
  97. int dty = g_screenhei - 768;
  98. if (dty > 0)
  99. {
  100. g_rc.bottom -= dty;
  101. MoveWindow(g_rc);
  102. EnumChildWindows(m_hWnd, (WNDENUMPROC)EnumChildProc, 0);
  103. g_rc.bottom += dty;
  104. MoveWindow(g_rc);
  105. }
  106. else
  107. {
  108. MoveWindow(g_rc);
  109. EnumChildWindows(m_hWnd, (WNDENUMPROC)EnumChildProc, 0);
  110. }
  111. int idarray[] = { IDC_BUTmodify, IDC_BUTclient, IDC_BUTprint3, IDC_BUTmodify3, IDC_BUTclose };
  112. int idcount = 5;
  113. int btnwid;
  114. CRect prerc;
  115. for (int a = idcount - 2; a >= 0; a--)
  116. {
  117. GetDlgItem(idarray[a + 1])->GetWindowRect(prerc);
  118. ScreenToClient(prerc);
  119. GetDlgItem(idarray[a])->GetWindowRect(rc2);
  120. ScreenToClient(rc2);
  121. btnwid = rc2.Width();
  122. rc2.right = prerc.left;
  123. rc2.left = rc2.right - btnwid;
  124. GetDlgItem(idarray[a])->MoveWindow(rc2);
  125. }
  126. m_static1.SetFont(&g_titlefont);
  127. #ifdef CHILD_VERSION
  128. #ifdef LKAY_VERSION
  129. m_List1.SetHeadings("订单号,100;家长姓名,100;宝宝姓名,100;宝宝性别,100;生日,100;历别,100;类别,100;折扣,100;拍照,100;初修,100;选片,100;精修,100;设计,100;看设计,100;取件,100;预约时间,100;拍照时间,100;选片时间,100;看设计时间,100;取件时间,100;接单人,100;套系名称,100;套系价格,100;摄影师,100;化妆师,100;初修,100;选片,100;精修,100;设计师,100;看设计,100;录单,100;手机,100;固定电话,100;拍摄合同,100;选片合同,100" );
  130. #else
  131. m_List1.SetHeadings("订单号,100;家长姓名,100;宝宝姓名,100;类别,100;来源,100;拍照,100;初修,100;选片,100;精修,100;设计,100;看设计,100;取件,100;预约时间,100;拍照时间,100;选片时间,100;看设计时间,100;取件时间,100;接单人,100;套系名称,100;套系价格,100;摄影师,100;化妆师,100;初修,100;选片,100;精修,100;设计师,100;看设计,100;录单,100;折扣,100;授权,100;折扣(后),100;授权(后),100;手机,100;固定电话,100");
  132. #endif
  133. #else
  134. #ifdef ZHIAI_VERSION
  135. m_List1.SetHeadings("订单号,100;男宾姓名,100;女宾姓名,100;预约点,100;类别,100;折扣,100;拍照,100;初修,100;选片,100;精修,100;设计,100;看设计,100;取件,100;预约时间,100;拍照时间,100;选片时间,100;看设计时间,100;取件时间,100;接单人,100;套系名称,100;套系价格,100;摄影师,100;化妆师,100;初修,100;选片,100;精修,100;设计师,100;看设计,100;录单,100;男宾电话,100;女宾电话,100" );
  136. #else
  137. m_List1.SetHeadings("订单号,100;男宾姓名,100;女宾姓名,100;类别,100;来源,100;拍照,100;初修,100;选片,100;精修,100;设计,100;看设计,100;取件,100;预约时间,100;拍照时间,100;选片时间,100;看设计时间,100;取件时间,100;接单人,100;套系名称,100;套系价格,100;摄影师,100;化妆师,100;初修,100;选片,100;精修,100;设计师,100;看设计,100;录单,100;折扣,100;授权,100;折扣(后),100;授权(后),100;男宾电话,100;女宾电话,100" );
  138. #endif
  139. #endif
  140. m_List1.LoadColumnInfo(109);
  141. #ifdef ZHIAI_VERSION
  142. m_nadd=2;
  143. #else
  144. m_nadd = 1;
  145. #endif
  146. GetData();
  147. m_combo1.AddString(g_user.name);
  148. for (int i = 0; i < g_userarray.GetSize(); i++)
  149. {
  150. m_combo1.AddString(g_userarray.ElementAt(i).ElementAt(1));
  151. }
  152. FillGrid();
  153. m_combo1.GetWindowRect(rc2);
  154. ScreenToClient(rc2);
  155. rc2.bottom += 200;
  156. m_combo1.MoveWindow(rc2);
  157. GetDlgItem(IDC_BUTclose)->GetWindowRect(rc2);
  158. SetComboHei(&m_combo1, rc2.Height());
  159. GetDlgItem(IDC_BUTprint3)->EnableWindow(IsHasRights2new(49));
  160. GetDlgItem(IDC_BUTprint)->EnableWindow(IsHasRights2new(3));
  161. GetDlgItem(IDC_BUTclient)->EnableWindow(IsHasRights2new(1));
  162. }
  163. void DinDanHistroy::FillGrid2()
  164. {
  165. int m_nadd2 = m_nadd;
  166. m_nadd2 -= 3;
  167. if (g_bSearchFilter)
  168. {
  169. m_List1.DeleteAllItems2();
  170. int ii = 0;
  171. m_List1.m_arLabels.SetSize(m_List1array.GetSize(), 1);
  172. int count = 0;
  173. {
  174. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  175. {
  176. if (g_filterdate1 != "")
  177. {
  178. if (m_List1array.ElementAt(ii).ElementAt(14 + m_nadd2) < g_filterdate1 || m_List1array.ElementAt(ii).ElementAt(14 + m_nadd2) > g_filterdate2)
  179. continue;
  180. }
  181. if (g_waiter1 != "")
  182. {
  183. if (m_List1array.ElementAt(ii).ElementAt(19 + m_nadd2) != g_waiter1)
  184. continue;
  185. }
  186. if (g_waiter2 != "")
  187. {
  188. if (m_List1array.ElementAt(ii).ElementAt(22 + m_nadd2) != g_waiter2)
  189. continue;
  190. }
  191. if (g_waiter3 != "")
  192. {
  193. if (m_List1array.ElementAt(ii).ElementAt(23 + m_nadd2) != g_waiter3)
  194. continue;
  195. }
  196. if (1)
  197. {
  198. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  199. }
  200. }
  201. }
  202. m_List1.m_arLabels.SetSize(count, 1);
  203. ii = count;
  204. m_List1.m_LabelCount = ii;
  205. m_List1.SetItemCountEx(ii);
  206. CString str;
  207. str.Format("单数:%d", ii);
  208. SetDlgItemText(IDC_STATIC2, str);
  209. }
  210. else
  211. {
  212. m_List1.DeleteAllItems2();
  213. int ii = 0;
  214. m_List1.m_arLabels.SetSize(m_List1array.GetSize(), 1);
  215. int count = 0;
  216. if (m_filter.IsEmpty())
  217. {
  218. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  219. {
  220. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  221. }
  222. }
  223. else
  224. {
  225. int type = GetType(m_filter);
  226. if (type == 1)//电话
  227. {
  228. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  229. {
  230. if (m_List1array.ElementAt(ii).ElementAt(30 + m_nadd2).Find(m_filter) != -1 || \
  231. m_List1array.ElementAt(ii).ElementAt(31 + m_nadd2).Find(m_filter) != -1)
  232. {
  233. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  234. }
  235. }
  236. }
  237. else if (type == 2)//拼音
  238. {
  239. m_filter.MakeUpper();
  240. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  241. {
  242. if (m_List1array.ElementAt(ii).ElementAt(32 + m_nadd2).Find(m_filter) != -1 || \
  243. m_List1array.ElementAt(ii).ElementAt(33 + m_nadd2).Find(m_filter) != -1)
  244. {
  245. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  246. }
  247. }
  248. }
  249. else
  250. {
  251. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  252. {
  253. if (m_List1array.ElementAt(ii).ElementAt(0).Find(m_filter) != -1 || \
  254. m_List1array.ElementAt(ii).ElementAt(1).Find(m_filter) != -1 || \
  255. m_List1array.ElementAt(ii).ElementAt(2).Find(m_filter) != -1 || \
  256. m_List1array.ElementAt(ii).ElementAt(3).Find(m_filter) != -1 || \
  257. m_List1array.ElementAt(ii).ElementAt(19 + m_nadd2).Find(m_filter) != -1 || \
  258. m_List1array.ElementAt(ii).ElementAt(20 + m_nadd2).Find(m_filter) != -1 || \
  259. m_List1array.ElementAt(ii).ElementAt(22 + m_nadd2).Find(m_filter) != -1 || \
  260. m_List1array.ElementAt(ii).ElementAt(23 + m_nadd2).Find(m_filter) != -1 || \
  261. m_List1array.ElementAt(ii).ElementAt(33 + m_nadd2).Find(m_filter) != -1 || \
  262. m_List1array.ElementAt(ii).ElementAt(30 + m_nadd2).Find(m_filter) != -1 || \
  263. m_List1array.ElementAt(ii).ElementAt(31 + m_nadd2).Find(m_filter) != -1 || \
  264. m_List1array.ElementAt(ii).ElementAt(32 + m_nadd2).Find(m_filter) != -1)
  265. {
  266. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  267. }
  268. }
  269. }
  270. }
  271. m_List1.m_arLabels.SetSize(count, 1);
  272. ii = count;
  273. m_List1.m_LabelCount = ii;
  274. m_List1.SetItemCountEx(ii);
  275. CString str;
  276. str.Format("单数:%d", ii);
  277. SetDlgItemText(IDC_STATIC2, str);
  278. }
  279. }
  280. void DinDanHistroy::FillGrid()
  281. {
  282. #ifdef ZHIAI_VERSION
  283. FillGrid2();return;
  284. #endif
  285. int m_nadd2 = 0;
  286. #ifdef LKAY_VERSION
  287. m_nadd2+=2;
  288. #endif
  289. if (g_bSearchFilter)
  290. {
  291. m_List1.DeleteAllItems2();
  292. int ii = 0;
  293. m_List1.m_arLabels.SetSize(m_List1array.GetSize(), 1);
  294. int count = 0;
  295. {
  296. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  297. {
  298. if (g_filterdate1 != "")
  299. {
  300. if (m_List1array.ElementAt(ii).ElementAt(11 + m_nadd) < g_filterdate1 || m_List1array.ElementAt(ii).ElementAt(11 + m_nadd) > g_filterdate2)
  301. continue;
  302. }
  303. if (g_waiter1 != "")
  304. {
  305. if (m_List1array.ElementAt(ii).ElementAt(16 + m_nadd) != g_waiter1)
  306. continue;
  307. }
  308. if (g_waiter2 != "")
  309. {
  310. if (m_List1array.ElementAt(ii).ElementAt(19 + m_nadd) != g_waiter2)
  311. continue;
  312. }
  313. if (g_waiter3 != "")
  314. {
  315. if (m_List1array.ElementAt(ii).ElementAt(20 + m_nadd) != g_waiter3)
  316. continue;
  317. }
  318. if (g_waiter4 != "")
  319. {
  320. if (m_List1array.ElementAt(ii).ElementAt(3) != g_waiter4)
  321. continue;
  322. }
  323. if (g_waiter5 != "")
  324. {
  325. if (m_List1array.ElementAt(ii).ElementAt(4) != g_waiter5)
  326. continue;
  327. }
  328. if (1)
  329. {
  330. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  331. }
  332. }
  333. }
  334. m_List1.m_arLabels.SetSize(count, 1);
  335. ii = count;
  336. m_List1.m_LabelCount = ii;
  337. m_List1.SetItemCountEx(ii);
  338. CString str;
  339. str.Format("单数:%d", ii);
  340. SetDlgItemText(IDC_STATIC2, str);
  341. }
  342. else
  343. {
  344. m_List1.DeleteAllItems2();
  345. int ii = 0;
  346. m_List1.m_arLabels.SetSize(m_List1array.GetSize(), 1);
  347. int count = 0;
  348. if (m_filter.IsEmpty())
  349. {
  350. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  351. {
  352. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  353. }
  354. }
  355. else
  356. {
  357. int type = GetType(m_filter);
  358. if (type == 1)//电话
  359. {
  360. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  361. {
  362. if (m_List1array.ElementAt(ii).ElementAt(32 + m_nadd).Find(m_filter) != -1 || \
  363. m_List1array.ElementAt(ii).ElementAt(31 + m_nadd).Find(m_filter) != -1)
  364. {
  365. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  366. }
  367. }
  368. }
  369. else if (type == 2)//拼音
  370. {
  371. m_filter.MakeUpper();
  372. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  373. {
  374. if (m_List1array.ElementAt(ii).ElementAt(34 + m_nadd + m_nadd2).Find(m_filter) != -1 || \
  375. m_List1array.ElementAt(ii).ElementAt(33 + m_nadd + m_nadd2).Find(m_filter) != -1)
  376. {
  377. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  378. }
  379. }
  380. }
  381. else
  382. {
  383. for (ii = 0; ii < m_List1.m_arLabels.GetSize(); ii++)
  384. {
  385. if (m_List1array.ElementAt(ii).ElementAt(0).Find(m_filter) != -1 || \
  386. m_List1array.ElementAt(ii).ElementAt(1).Find(m_filter) != -1 || \
  387. m_List1array.ElementAt(ii).ElementAt(2).Find(m_filter) != -1 || \
  388. m_List1array.ElementAt(ii).ElementAt(3).Find(m_filter) != -1 || \
  389. m_List1array.ElementAt(ii).ElementAt(16 + m_nadd).Find(m_filter) != -1 || \
  390. m_List1array.ElementAt(ii).ElementAt(17 + m_nadd).Find(m_filter) != -1 || \
  391. m_List1array.ElementAt(ii).ElementAt(19 + m_nadd).Find(m_filter) != -1 || \
  392. m_List1array.ElementAt(ii).ElementAt(20 + m_nadd).Find(m_filter) != -1 || \
  393. m_List1array.ElementAt(ii).ElementAt(34 + m_nadd).Find(m_filter) != -1 || \
  394. m_List1array.ElementAt(ii).ElementAt(31 + m_nadd).Find(m_filter) != -1 || \
  395. m_List1array.ElementAt(ii).ElementAt(32 + m_nadd).Find(m_filter) != -1 || \
  396. m_List1array.ElementAt(ii).ElementAt(33 + m_nadd).Find(m_filter) != -1)
  397. {
  398. m_List1.m_arLabels.ElementAt(count++).Copy(m_List1array.ElementAt(ii));
  399. }
  400. }
  401. }
  402. }
  403. m_List1.m_arLabels.SetSize(count, 1);
  404. ii = count;
  405. m_List1.m_LabelCount = ii;
  406. m_List1.SetItemCountEx(ii);
  407. CString str;
  408. str.Format("单数:%d", ii);
  409. SetDlgItemText(IDC_STATIC2, str);
  410. }
  411. if (!g_id.IsEmpty())
  412. {
  413. for (int i = 0; i < m_List1.GetItemCount(); i++)
  414. {
  415. if (g_id == m_List1.GetItemText(i, 0))
  416. {
  417. m_List1.SetItemState(i, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
  418. m_List1.EnsureVisible(i, FALSE);
  419. break;
  420. }
  421. }
  422. }
  423. }
  424. void DinDanHistroy::OnBUTclose()
  425. {
  426. // TODO: Add your control notification handler code here
  427. GetParent()->SendMessage(WM_CLOSE);
  428. }
  429. extern void SaveImageToFile(Image *img, CString path);
  430. void DinDanHistroy::OnButton1()
  431. {
  432. // TODO: Add your control notification handler code here
  433. /*
  434. Image *img=NULL;
  435. ::LoadImageFromBuf (&img, "e:\\1x.jpg");
  436. if(img->GetWidth())
  437. {
  438. CRect rc(0,0,1000,1000);
  439. RectFitDes(img->GetWidth(), img->GetHeight(), rc);
  440. Image *simg= img->GetThumbnailImage(rc.Width (), rc.Height (), NULL, NULL);
  441. Graphics graphic(simg);//防止GetThumbnailImage影响质量
  442. graphic.DrawImage(img, 0,0,simg->GetWidth(), simg->GetHeight() );
  443. delete img;
  444. ::SaveImageToFile(simg, "e:\\1x2.jpg");
  445. delete simg;
  446. }*/
  447. UpdateData();
  448. m_filter.TrimLeft();
  449. m_filter.TrimRight();
  450. FillGrid();
  451. }
  452. void DinDanHistroy::OnSelchangeCombo1()
  453. {
  454. // TODO: Add your control notification handler code here
  455. SetTimer(1, 100, NULL);
  456. }
  457. void DinDanHistroy::OnTimer(UINT nIDEvent)
  458. {
  459. // TODO: Add your message handler code here and/or call default
  460. KillTimer(nIDEvent);
  461. OnButton1();
  462. }
  463. void DinDanHistroy::OnBUTmodify3()
  464. {
  465. POSITION pos;
  466. pos = m_List1.GetFirstSelectedItemPosition();
  467. if (pos == NULL)
  468. {
  469. return;
  470. }
  471. int iItem = m_List1.GetNextSelectedItem(pos);
  472. int g_nYearposTemp = g_nYearpos;
  473. g_nYearpos = atoi(m_List1.GetItemText(iItem, 36));
  474. g_pMainWnd->PrintDinDan(m_List1.GetItemText(iItem, 0));
  475. g_nYearpos = g_nYearposTemp;
  476. }
  477. void DinDanHistroy::OnBUTmodify4()
  478. {
  479. POSITION pos;
  480. pos = m_List1.GetFirstSelectedItemPosition();
  481. if (pos == NULL)
  482. {
  483. return;
  484. }
  485. int iItem = m_List1.GetNextSelectedItem(pos);
  486. if (AfxMessageBox("完成后此单将存入历史数据库并不可修改, 确认吗?", MB_YESNO | MB_ICONINFORMATION) != IDYES)return;
  487. CString m_id = m_List1.GetItemText(iItem, 0);
  488. {
  489. CString sql = "update dindan set [status3]='OK',[time5]='" + g_date + "' where id='" + m_id + "'";
  490. g_sendhead.bsql = 1;
  491. g_pMainWnd->ProcessChatMessageRequest2(sql);
  492. if (g_bSendOK == 0)return;
  493. #if JEFF_TEST_ON
  494. // 2015-05-30 若取件状态OK,写日志;
  495. CString strLog;
  496. strLog.Format(_T(" 订单:%s 在预约修改中被设置为取件OK"),m_id);
  497. WriteLog(_T("预约修改"), strLog);
  498. #endif
  499. }
  500. AfxMessageBox("保存成功!", MB_ICONINFORMATION);
  501. GetData();
  502. FillGrid();
  503. }
  504. BOOL DinDanHistroy::PreTranslateMessage(MSG* pMsg)
  505. {
  506. // TODO: Add your c code here and/or call the base class
  507. try
  508. {
  509. if (pMsg->message == WM_KEYDOWN)
  510. {
  511. // CString ss;
  512. // ss.Format ("%d", pMsg->wParam);
  513. // MessageBox(ss);
  514. switch (pMsg->wParam)
  515. {
  516. case VK_RETURN:
  517. OnButton1();
  518. return 1;
  519. case VK_F9:
  520. // GetClientPhone();
  521. return 1;
  522. case 0x43: // copy
  523. if ((GetKeyState(VK_CONTROL) & 0x80))
  524. {
  525. GetFocus()->SendMessage(WM_COPY);
  526. return TRUE;
  527. }
  528. break;
  529. case 0x56: //Ctrl + V:
  530. if ((GetKeyState(VK_CONTROL) & 0x80))
  531. {
  532. GetFocus()->SendMessage(WM_PASTE);
  533. return TRUE;
  534. }
  535. break;
  536. case 0x58: // cut
  537. if ((GetKeyState(VK_CONTROL) & 0x80))
  538. {
  539. GetFocus()->SendMessage(WM_CUT);
  540. return TRUE;
  541. }
  542. break;
  543. case 0x5A: //undo
  544. case 0x59: //redo
  545. if ((GetKeyState(VK_CONTROL) & 0x80))
  546. {
  547. GetFocus()->SendMessage(WM_UNDO);
  548. return TRUE;
  549. }
  550. break;
  551. }
  552. }
  553. return MyFormView::PreTranslateMessage(pMsg);
  554. }
  555. catch (...)
  556. {
  557. }
  558. }
  559. //extern void DeleteDirectory(CString strDir);
  560. void DinDanHistroy::OnBUTprint()
  561. {
  562. // TODO: Add your control notification handler code here
  563. if (IsHasRights2new(3) == 0)return;
  564. POSITION pos;
  565. pos = m_List1.GetFirstSelectedItemPosition();
  566. if (pos == NULL)
  567. {
  568. return;
  569. }
  570. int iItem = m_List1.GetNextSelectedItem(pos);
  571. if (AfxMessageBox("警告! 此单相关资料将全部被删除? 确定吗?", MB_YESNO | MB_ICONSTOP) != IDYES)return;
  572. CString id = m_List1.GetItemText(iItem, 0);
  573. CString name1 = m_List1.GetItemText(iItem, 1);
  574. CString name2 = m_List1.GetItemText(iItem, 2);
  575. CString sql;
  576. sql = "delete from dindan where id='" + id + "'";
  577. sql += "***delete from dindansp where id='" + id + "'";
  578. sql += "***delete from dindansp2 where id='" + id + "'";
  579. sql += "***delete from dindansp3 where id='" + id + "'";
  580. sql += "***delete from photoprint where id='" + id + "'";
  581. sql += "***delete from dindanbukuan where id='" + id + "'";
  582. sql += "***delete from dindanbukuan2 where id='" + id + "'";
  583. sql += "***delete from client where [id]='" + id + "'";
  584. sql += "***delete from burncdreg where [id]='" + id + "'";
  585. sql += "***delete from digitalwork where [id]='" + id + "'";
  586. sql += "***delete from mywork where [id]='" + id + "'";
  587. sql += "***delete from dindanjd where [id]='" + id + "'";
  588. sql += "***" + GetLogStr("删除客人" + name1 + name2 + id + "订单!");
  589. g_sendhead.bsql = 1;
  590. g_pMainWnd->ProcessChatMessageRequest2(sql);
  591. id.TrimLeft();
  592. id.TrimRight();
  593. if (id.GetLength() > 3)
  594. {
  595. CString path;
  596. path = g_path1 + "\\";
  597. path += id;
  598. DeleteDirectory(path); // 递归删除原片;
  599. path = g_path2 + "\\";
  600. path += id;
  601. DeleteDirectory(path); // 递归删除初修;
  602. path = g_path3 + "\\";
  603. path += id;
  604. DeleteDirectory(path); // 递归删除精修;
  605. path = g_path4 + "\\";
  606. path += id;
  607. DeleteDirectory(path); // 递归删除设计;
  608. }
  609. GetData();
  610. FillGrid();
  611. }
  612. /*
  613. dindan
  614. dindansp
  615. dindansp2
  616. dindansp3
  617. photoprint
  618. dindanbukuan
  619. dindanbukuan2
  620. client
  621. burncdreg
  622. digitalwork
  623. mywork
  624. dindanjd
  625. delete from dindan
  626. delete from dindansp
  627. delete from dindansp2
  628. delete from dindansp3
  629. delete from photoprint
  630. delete from dindanbukuan
  631. delete from dindanbukuan2
  632. delete from client
  633. delete from burncdreg
  634. delete from digitalwork
  635. delete from mywork
  636. delete from dindanjd
  637. */
  638. void DinDanHistroy::OnDblclkList2(NMHDR* pNMHDR, LRESULT* pResult)
  639. {
  640. // TODO: Add your control notification handler code here
  641. OnBUTmodify();
  642. *pResult = 0;
  643. }
  644. void DinDanHistroy::OnBUTclient()
  645. {
  646. // TODO: Add your control notification handler code here
  647. POSITION pos;
  648. pos = m_List1.GetFirstSelectedItemPosition();
  649. if (pos == NULL)
  650. {
  651. return;
  652. }
  653. int iItem = m_List1.GetNextSelectedItem(pos);
  654. #ifdef CHILD_VERSION
  655. CClientDlg2 dlg;
  656. #else
  657. CClientDlg dlg;
  658. #endif
  659. dlg.m_bHistory = 1;
  660. dlg.m_bAdd = 0;
  661. dlg.id = m_List1.GetItemText(iItem, 0);
  662. dlg.m_name1 = m_List1.GetItemText(iItem, 1);
  663. dlg.m_name2 = m_List1.GetItemText(iItem, 2);
  664. int g_nYearposTemp = g_nYearpos;
  665. g_nYearpos = atoi(m_List1.GetItemText(iItem, 36));
  666. dlg.DoModal();
  667. g_nYearpos = g_nYearposTemp;
  668. }
  669. void DinDanHistroy::GetClientPhone()
  670. {
  671. SelExportType dlg;
  672. if (dlg.DoModal() != IDOK)return;
  673. if (dlg.m_type == 1)
  674. {
  675. ListToXLS(&m_List1, "c:\\历史订单.xls", 0);
  676. // Import2Excle(&m_List1, "E:\\历史订单.xls",0 , 0, -1, 10000);
  677. // Import2Excle(&m_List1, "E:\\历史订单1.xls",0 , 10000, -1, 12000);
  678. // Import2Excle(&m_List1, "E:\\历史订单2.xls",0 , 12000, -1, 14000);
  679. // Import2Excle(&m_List1, "E:\\历史订单3.xls",0 , 14000, -1, 16000);
  680. // Import2Excle(&m_List1, "E:\\历史订单4.xls",0 , 16000, -1, 18000);
  681. //Import2Excle(&m_List1, "C:\\历史订单.xls",0 , 0, -1, -1);
  682. return;
  683. }
  684. #ifdef LKAY_VERSION
  685. CStdioFile fp;
  686. fp.Open ("c:\\clientphone.txt", CFile::modeCreate|CFile::modeWrite);
  687. CString str;
  688. CString name,m_name1,m_name2;
  689. CString phone,m_phone1,m_phone2;
  690. CString txname,txprice,mensi,sex,birthday,date;
  691. int leng1=23;
  692. int leng2=10;
  693. int leng3=18;
  694. int leng4=13;
  695. int leng5=30;
  696. int leng6=30;
  697. int leng7=13;
  698. int leng8=20;
  699. name="姓名";
  700. sex="性别";
  701. birthday="生日";
  702. mensi="门市";
  703. phone="电话";
  704. txname="套系";
  705. txprice="价格";
  706. date="拍摄日期";
  707. FillLength(name, leng1);
  708. FillLength(sex, leng2);
  709. FillLength(birthday, leng3);
  710. FillLength(mensi, leng4);
  711. FillLength(phone, leng5);
  712. FillLength(txname, leng6);
  713. FillLength(txprice,leng7);
  714. FillLength(date,leng8);
  715. str=name+sex+birthday+mensi+phone+txname+txprice+date+"\n";
  716. fp.WriteString (str);
  717. for(int i=0; i<m_List1.m_arLabels.GetSize (); i++)
  718. {
  719. // if(atof(m_List1.GetItemText (i, 15))<600)continue;
  720. name.Empty ();
  721. phone.Empty ();
  722. m_name1=m_List1.m_arLabels.ElementAt(i).ElementAt(1);
  723. m_name2=m_List1.m_arLabels.ElementAt(i).ElementAt(2);
  724. m_phone1=m_List1.m_arLabels.ElementAt(i).ElementAt(30+m_nadd);
  725. m_phone2=m_List1.m_arLabels.ElementAt(i).ElementAt(31+m_nadd);
  726. mensi=m_List1.m_arLabels.ElementAt(i).ElementAt(19+m_nadd);
  727. txname=m_List1.m_arLabels.ElementAt(i).ElementAt(20+m_nadd);
  728. txprice=m_List1.m_arLabels.ElementAt(i).ElementAt(21+m_nadd);
  729. date=m_List1.m_arLabels.ElementAt(i).ElementAt(16);
  730. sex=m_List1.m_arLabels.ElementAt(i).ElementAt(3);
  731. birthday=m_List1.m_arLabels.ElementAt(i).ElementAt(4);
  732. if(birthday!="" && m_List1.m_arLabels.ElementAt(i).ElementAt(5)=="农历")
  733. birthday+="(农)";
  734. if(!m_name1.IsEmpty ())
  735. name=m_name1+",";
  736. name+=m_name2;
  737. name.TrimRight (",");
  738. if(!m_phone1.IsEmpty ())
  739. phone=m_phone1+",";
  740. phone+=m_phone2;phone.TrimRight (",");
  741. FillLength(name, leng1);
  742. FillLength(sex, leng2);
  743. FillLength(birthday, leng3);
  744. FillLength(mensi, leng4);
  745. FillLength(phone, leng5);
  746. FillLength(txname, leng6);
  747. FillLength(txprice,leng7);
  748. FillLength(date,leng8);
  749. str=name+sex+birthday+mensi+phone+txname+txprice+date+"\n";
  750. fp.WriteString (str);
  751. }
  752. fp.Close ();
  753. MessageBox("电话已保存到c:\\clientphone.txt");
  754. ShellExecute(NULL, _T("open"), _T("c:\\clientphone.txt"), NULL, NULL, SW_SHOWMAXIMIZED);
  755. #else
  756. CStdioFile fp;
  757. fp.Open("c:\\clientphone.txt", CFile::modeCreate | CFile::modeWrite);
  758. CString str;
  759. CString name, m_name1, m_name2;
  760. CString phone, m_phone1, m_phone2;
  761. CString txname, txprice, mensi, type, from;
  762. int leng1 = 26;
  763. int leng2 = 20;
  764. int leng3 = 30;
  765. int leng4 = 20;
  766. int leng5 = 20;
  767. int leng6 = 20;
  768. int leng7 = 20;
  769. name = "姓名";
  770. mensi = "门市";
  771. phone = "电话";
  772. txname = "套系";
  773. txprice = "价格";
  774. type = "套系类别";
  775. from = "来源";
  776. FillLength(name, leng1);
  777. FillLength(mensi, leng2);
  778. FillLength(phone, leng3);
  779. FillLength(txname, leng4);
  780. FillLength(txprice, leng5);
  781. FillLength(type, leng6);
  782. FillLength(from, leng7);
  783. str = name + mensi + phone + txname + txprice + type + from + "\n";
  784. fp.WriteString(str);
  785. for (int i = 0; i < m_List1.GetItemCount(); i++)
  786. {
  787. // if(atof(m_List1.GetItemText (i, 15))<600)continue;
  788. name.Empty();
  789. phone.Empty();
  790. m_name1 = m_List1.GetItemText(i, 1);
  791. m_name2 = m_List1.GetItemText(i, 2);
  792. m_phone1 = m_List1.GetItemText(i, 31 + m_nadd);
  793. m_phone2 = m_List1.GetItemText(i, 32 + m_nadd);
  794. mensi = m_List1.GetItemText(i, 16 + m_nadd);
  795. txname = m_List1.GetItemText(i, 17 + m_nadd);
  796. txprice = m_List1.GetItemText(i, 18 + m_nadd);
  797. type = m_List1.GetItemText(i, 3);
  798. from = m_List1.GetItemText(i, 4);
  799. if (!m_name1.IsEmpty())
  800. name = m_name1 + ",";
  801. name += m_name2;
  802. name.TrimRight(",");
  803. if (!m_phone1.IsEmpty())
  804. phone = m_phone1 + ",";
  805. phone += m_phone2; phone.TrimRight(",");
  806. FillLength(name, leng1);
  807. FillLength(mensi, leng2);
  808. FillLength(phone, leng3);
  809. FillLength(txname, leng4);
  810. FillLength(txprice, leng5);
  811. FillLength(type, leng6);
  812. FillLength(from, leng7);
  813. str = name + mensi + phone + txname + txprice + type + from + "\n";
  814. fp.WriteString(str);
  815. }
  816. fp.Close();
  817. MessageBox("电话已保存到c:\\clientphone.txt");
  818. ShellExecute(NULL, _T("open"), _T("c:\\clientphone.txt"), NULL, NULL, SW_SHOWMAXIMIZED);
  819. #endif
  820. }
  821. void DinDanHistroy::OnBUTmodify()
  822. {
  823. POSITION pos;
  824. pos = m_List1.GetFirstSelectedItemPosition();
  825. if (pos == NULL)
  826. {
  827. return;
  828. }
  829. int iItem = m_List1.GetNextSelectedItem(pos);
  830. Booking2 dlg;
  831. dlg.m_id = m_List1.GetItemText(iItem, 0);
  832. dlg.m_bModify = 2;
  833. int g_nYearposTemp = g_nYearpos;
  834. g_nYearpos = atoi(m_List1.GetItemText(iItem, 36));
  835. dlg.DoModal();
  836. g_nYearpos = g_nYearposTemp;
  837. }
  838. void DinDanHistroy::OnClickList2(NMHDR* pNMHDR, LRESULT* pResult)
  839. {
  840. // TODO: Add your control notification handler code here
  841. *pResult = 0;
  842. }
  843. void DinDanHistroy::OnBUTprint3()
  844. {
  845. // TODO: Add your control notification handler code here
  846. GetClientPhone();
  847. }
  848. void DinDanHistroy::OnCustomdrawList1(NMHDR* pNMHDR, LRESULT* pResult)
  849. {
  850. NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>(pNMHDR);
  851. // Take the default processing unless we set this to something else below.
  852. *pResult = 0;
  853. // First thing - check the draw stage. If it's the control's prepaint
  854. // stage, then tell Windows we want messages for every item.
  855. if (CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage)
  856. {
  857. *pResult = CDRF_NOTIFYITEMDRAW;
  858. }
  859. else if (CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage)
  860. {
  861. // This is the prepaint stage for an item. Here's where we set the
  862. // item's text color. Our return value will tell Windows to draw the
  863. // item itself, but it will use the new color we set here.
  864. // We'll cycle the colors through red, green, and light blue.
  865. #ifdef ZHIAI_VERSION
  866. if(atof(m_List1.m_arLabels.ElementAt (pLVCD->nmcd.dwItemSpec).ElementAt (5))<5.0 || (atof(m_List1.m_arLabels.ElementAt (pLVCD->nmcd.dwItemSpec).ElementAt (7))<5.0)&&m_List1.m_arLabels.ElementAt (pLVCD->nmcd.dwItemSpec).ElementAt (7)!="" )
  867. {
  868. pLVCD->clrText = RGB(220,0,0);
  869. }
  870. else if(atof(m_List1.m_arLabels.ElementAt (pLVCD->nmcd.dwItemSpec).ElementAt (5))<8.0 || (atof(m_List1.m_arLabels.ElementAt (pLVCD->nmcd.dwItemSpec).ElementAt (7))<8.0)&&m_List1.m_arLabels.ElementAt (pLVCD->nmcd.dwItemSpec).ElementAt (7)!="" )
  871. {
  872. pLVCD->clrText = RGB(255,255,0);
  873. }
  874. else if(atof(m_List1.m_arLabels.ElementAt (pLVCD->nmcd.dwItemSpec).ElementAt (5))==0 && atof(m_List1.m_arLabels.ElementAt (pLVCD->nmcd.dwItemSpec).ElementAt (7))==0)
  875. {
  876. pLVCD->clrText = RGB(0,0,0);
  877. }
  878. #else
  879. if (atof(m_List1.m_arLabels.ElementAt(pLVCD->nmcd.dwItemSpec).ElementAt(28)) < 5.0 || (atof(m_List1.m_arLabels.ElementAt(pLVCD->nmcd.dwItemSpec).ElementAt(30)) < 5.0) && m_List1.m_arLabels.ElementAt(pLVCD->nmcd.dwItemSpec).ElementAt(30) != "")
  880. {
  881. pLVCD->clrText = RGB(220, 0, 0);
  882. }
  883. else if (atof(m_List1.m_arLabels.ElementAt(pLVCD->nmcd.dwItemSpec).ElementAt(28)) < 8.0 || (atof(m_List1.m_arLabels.ElementAt(pLVCD->nmcd.dwItemSpec).ElementAt(30)) < 8.0) && m_List1.m_arLabels.ElementAt(pLVCD->nmcd.dwItemSpec).ElementAt(30) != "")
  884. {
  885. pLVCD->clrText = RGB(255, 255, 0);
  886. }
  887. else if (atof(m_List1.m_arLabels.ElementAt(pLVCD->nmcd.dwItemSpec).ElementAt(28)) == 0 && atof(m_List1.m_arLabels.ElementAt(pLVCD->nmcd.dwItemSpec).ElementAt(30)) == 0)
  888. {
  889. pLVCD->clrText = RGB(0, 0, 0);
  890. }
  891. #endif
  892. else
  893. {
  894. pLVCD->clrText = RGB(20, 133, 20);
  895. }
  896. if (pLVCD->nmcd.dwItemSpec % 2)
  897. pLVCD->clrTextBk = g_gridcol1;
  898. else
  899. pLVCD->clrTextBk = g_gridcol2;
  900. // Store the color back in the NMLVCUSTOMDRAW struct.
  901. // Tell Windows to paint the control itself.
  902. *pResult = CDRF_DODEFAULT;
  903. }
  904. }
  905. void DinDanHistroy::HidePrice()
  906. {
  907. #ifdef LKAY_VERSION
  908. if(IsHasRights2new(31))return;
  909. for(int i=0; i< m_List1array.GetSize (); i++)
  910. {
  911. m_List1array.ElementAt (i).SetAt (21, "***");
  912. m_List1array.ElementAt (i).SetAt (22, "***");
  913. m_List1array.ElementAt (i).SetAt (31, "***");
  914. m_List1array.ElementAt (i).SetAt (32, "***");
  915. }
  916. #else
  917. if (IsHasRights2new(31) == 0)
  918. {
  919. for (int i = 0; i < m_List1array.GetSize(); i++)
  920. {
  921. m_List1array.ElementAt(i).SetAt(32, "***");
  922. m_List1array.ElementAt(i).SetAt(33, "***");
  923. }
  924. }
  925. if (IsHasRights2new(50) == 0)
  926. {
  927. for (int i = 0; i < m_List1array.GetSize(); i++)
  928. {
  929. m_List1array.ElementAt(i).SetAt(28, "***");
  930. m_List1array.ElementAt(i).SetAt(29, "***");
  931. m_List1array.ElementAt(i).SetAt(30, "***");
  932. m_List1array.ElementAt(i).SetAt(31, "***");
  933. }
  934. }
  935. #endif
  936. }
  937. void DinDanHistroy::OnRadio1()
  938. {
  939. UpdateData(); GetData(); FillGrid();
  940. }
  941. void DinDanHistroy::OnRadio3()
  942. {
  943. OnRadio1();
  944. }
  945. void DinDanHistroy::OnRadio4()
  946. {
  947. OnRadio1();
  948. }
  949. void DinDanHistroy::OnRadio6()
  950. {
  951. OnRadio1();
  952. }
  953. void DinDanHistroy::OnRadio7()
  954. {
  955. OnRadio1();
  956. }
  957. extern CString GetDindanType(int type);
  958. void DinDanHistroy::GetData()
  959. {
  960. #ifdef ZHIAI_VERSION
  961. if(g_bShowOK==0)
  962. {
  963. CString filter="status3='未取'";
  964. g_sendhead.bsql=0;
  965. g_sendhead.code[0]=151;
  966. g_sendhead.tabcount=1;
  967. g_pMainWnd->ProcessChatMessageRequest2(filter);if(g_bSendOK==0)return;
  968. }
  969. else
  970. {
  971. g_sendhead.bsql=0;
  972. g_sendhead.code[0]=151;
  973. g_sendhead.tabcount=1;
  974. g_pMainWnd->ProcessChatMessageRequest2(1);if(g_bSendOK==0)return;
  975. }
  976. #else
  977. #ifdef LKAY_VERSION
  978. g_sendhead.bsql=0;
  979. g_sendhead.code[0]=217;
  980. g_sendhead.tabcount=1;
  981. g_pMainWnd->ProcessChatMessageRequest2(1);if(g_bSendOK==0)return;
  982. #else
  983. g_sendhead.bsql = 0;
  984. g_sendhead.code[0] = 226;
  985. g_sendhead.tabcount = 1;
  986. g_pMainWnd->ProcessChatMessageRequest2(1);
  987. if (g_bSendOK == 0)return;
  988. #endif
  989. #endif
  990. DataToArray(&m_List1array);
  991. HidePrice();
  992. if (g_sInfo == "")
  993. {
  994. CString m_edit1 = (g_cominfoarray.ElementAt(0).ElementAt(10));
  995. CString m_edit2 = (g_cominfoarray.ElementAt(0).ElementAt(11));
  996. CString m_edit3 = (g_cominfoarray.ElementAt(0).ElementAt(12));
  997. CString m_edit4 = (g_cominfoarray.ElementAt(0).ElementAt(14));
  998. CString m_edit5 = g_cominfoarray.ElementAt(0).ElementAt(0);
  999. CString separator = "*%!X";
  1000. g_sInfo.Format("%s%s%s%s%s%s%s%s%s%s%s%scurdan/%d",
  1001. g_domain, separator, m_edit1, separator, m_edit2,
  1002. separator, m_edit3,
  1003. separator, m_edit4,
  1004. separator, m_edit5,
  1005. separator, m_List1array.GetSize());
  1006. g_ncot = m_List1array.GetSize();
  1007. }
  1008. }
  1009. void DinDanHistroy::OnBtnsearchfilter()
  1010. {
  1011. SearchFilter dlg;
  1012. dlg.m_mode = 0;
  1013. if (dlg.DoModal() == IDOK)FillGrid();
  1014. g_bSearchFilter = 0;
  1015. }