DinDanHistroy.cpp 31 KB

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