DinDanHistroy.cpp 32 KB

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