DinDanHistroy.cpp 32 KB

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