DinDanHistroy.cpp 30 KB

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