A_EventAideFormMain.cs 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.Collections;
  10. using System.IO;
  11. using LYFZ.ComponentLibrary;
  12. using LYFZ.Helper;
  13. namespace LYFZ.Software.MainBusiness.CameraControlBook
  14. {
  15. public partial class A_EventAideFormMain : LYFZ.Software.UI.CameraControlBook.A_EventAideFormMain
  16. {
  17. LYFZ.BLL.BLL_ErpOrder orbll = new BLL.BLL_ErpOrder();
  18. public A_EventAideFormMain()
  19. {
  20. this.Shown += A_EventAideFormMain_Shown;
  21. this.Load += A_EventAideFormMain_Load;
  22. this.butnAddRecord.Click += butnAddRecord_Click;
  23. this.butnColse.Click += butnColse_Click;
  24. this.butnQuery.Click += butnQuery_Click;
  25. this.buttonEx1.Click += buttonEx1_Click;
  26. this.btnClientServiceAnPai.Click += btnClientServiceAnPai_Click;
  27. this.butnRecordingsPlay.Click += butnRecordingsPlay_Click;
  28. this.tabPanel.SelectedIndexChanged += tabPanel_SelectedIndexChanged;
  29. this.dgvData.MouseDoubleClick += dgvMarry_MouseDoubleClick;
  30. this.btnHighSelect.Click += btnHighSelect_Click;
  31. this.txtPointsEnd.KeyPress += txtPointsEnd_KeyPress;
  32. this.txtPointsStart.KeyPress += txtPointsStart_KeyPress;
  33. this.dtMonthStart.ValueChanged += dtMonthStart_ValueChanged;
  34. this.dtMonthEnd.ValueChanged += dtMonthEnd_ValueChanged;
  35. this.butnAddRecord.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.CommunicationAide, CustomAttributes.OperatingAuthority.Add);
  36. this.butnRecordingsPlay.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.CommunicationAide, CustomAttributes.OperatingAuthority.AudioPlayback);
  37. this.btnExport.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.CommunicationAide, CustomAttributes.OperatingAuthority.DataExport);
  38. this.btnExport.Click += btnExport_Click;
  39. this.Resize += A_EventAideFormMain_Resize;
  40. this.chkAvailablePoints.Click += chkAvailablePoints_Click;
  41. this.chkTotalPoints.Click += chkTotalPoints_Click;
  42. //this.btnClientServiceAnPai.Visible = false;
  43. #region 门店选择;
  44. this.cmbtreevStoreName.ComboBoxTree_NodeMouseClick += CmbtreevStoreName_ComboBoxTree_NodeMouseClick;
  45. #endregion
  46. this.lab_ChildBirth.Click += Lab_ChildBirth_Click;
  47. }
  48. private void Lab_ChildBirth_Click(object sender, EventArgs e)
  49. {
  50. if( this.lab_ChildBirth.BackColor == System.Drawing.Color.DodgerBlue)
  51. {
  52. this.lab_ChildBirth.BackColor = System.Drawing.Color.Red;
  53. labelEx5.Text = "出生日期:";
  54. this.dtYearStart.Enabled = true;
  55. this.dtYearEnd.Enabled = true;
  56. }
  57. else
  58. {
  59. this.lab_ChildBirth.BackColor = System.Drawing.Color.DodgerBlue;
  60. labelEx5.Text = "宝宝生日:";
  61. this.dtYearStart.Enabled = false;
  62. this.dtYearEnd.Enabled = false;
  63. this.dtYearStart.Value = SDateTime.Now.Year;
  64. this.dtYearEnd.Value = SDateTime.Now.Year;
  65. }
  66. }
  67. private void CmbtreevStoreName_ComboBoxTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
  68. {
  69. //throw new NotImplementedException();
  70. this.PublicFunctionRows();
  71. }
  72. /// <summary>
  73. /// 安排任务的任务类型
  74. /// </summary>
  75. public string StrClientServiceType = "";
  76. /// <summary>
  77. /// 高级查询返回的信息
  78. /// </summary>
  79. Hashtable htData = new Hashtable();
  80. /// <summary>
  81. /// 员工工号ID
  82. /// </summary>
  83. string strUserID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
  84. /// <summary>
  85. /// 窗体加载事件
  86. /// </summary>
  87. /// <param name="sender"></param>
  88. /// <param name="e"></param>
  89. void A_EventAideFormMain_Shown(object sender, EventArgs e)
  90. {
  91. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindGroupStoreName(this.cmbtreevStoreName, StrGroupKeyCode: "st071", StrKeyCode: "st0703");
  92. if (this.cmbtreevStoreName.Nodes.Count <= 0)
  93. {
  94. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindGroupStoreName(this.cmbtreevStoreName, StrGroupKeyCode: LYFZ.Model.Model_UserRights.GetQuickToolsPet(), StrKeyCode: "st0703");
  95. }
  96. ///版本权限控制
  97. Dictionary<VersionControl.VersionFunctionEnum, TabPage> dicPageList = new Dictionary<VersionControl.VersionFunctionEnum, TabPage>();
  98. dicPageList.Add(VersionControl.VersionFunctionEnum.客服中心沟通助手结婚客人, this.tabPanel.TabPages[0]);
  99. dicPageList.Add(VersionControl.VersionFunctionEnum.客服中心沟通助手纪念日客人, this.tabPanel.TabPages[1]);
  100. dicPageList.Add(VersionControl.VersionFunctionEnum.客服中心沟通助手客户生日, this.tabPanel.TabPages[2]);
  101. dicPageList.Add(VersionControl.VersionFunctionEnum.客服中心沟通助手宝宝生日, this.tabPanel.TabPages[3]);
  102. dicPageList.Add(VersionControl.VersionFunctionEnum.客服中心沟通助手转介绍客人, this.tabPanel.TabPages[4]);
  103. dicPageList.Add(VersionControl.VersionFunctionEnum.客服中心沟通助手会员积分, this.tabPanel.TabPages[5]);
  104. dicPageList.Add(VersionControl.VersionFunctionEnum.客服中心沟通助手孕妇周期, this.tabPanel.TabPages[6]);
  105. foreach (var key in dicPageList.Keys)
  106. {
  107. List<TabPage> hideControls = new List<TabPage>();
  108. hideControls.Add(dicPageList[key]);
  109. LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideTabControl(key, this.tabPanel, hideControls);
  110. }
  111. if (this.tabPanel.TabCount == 0)
  112. {
  113. MessageBoxCustom.Show("当前版本无 沟通助手 模块的功能!");
  114. this.Close();
  115. return;
  116. }
  117. this.dtYearStart.Value = SDateTime.Now.Year;
  118. this.dtYearEnd.Value = SDateTime.Now.Year;
  119. this.dtYearStart.Enabled = false;
  120. this.dtYearEnd.Enabled = false;
  121. this.dtMonthStart.Value = 1;
  122. this.dtDayStart.Value = DateTime.DaysInMonth(SDateTime.Now.Year, 1);
  123. this.dtMonthEnd.Value = 12;
  124. this.dtDayEnd.Value = DateTime.DaysInMonth(SDateTime.Now.Year, 12);
  125. if (this.StrClientServiceType.Trim().Length > 0)
  126. {
  127. TabPage strTabName = null;
  128. switch (this.StrClientServiceType.Trim())
  129. {
  130. case "结婚客人": strTabName = this.tb_Marry; break;
  131. case "结婚纪念日": strTabName = this.tb_MemorialDay; break;
  132. case "客户生日": strTabName = this.tb_Birthday; break;
  133. case "宝宝生日": strTabName = this.tb_ChildBirthday; break;
  134. case "转介绍客户": strTabName = this.tb_Referral; break;
  135. case "会员积分": strTabName = this.tb_Points; break;
  136. case "孕妇周期": strTabName = this.tb_PregnantCycle; break;
  137. }
  138. if (strTabName != null && this.tabPanel.Contains(strTabName))
  139. {
  140. this.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
  141. this.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
  142. this.tabPanel.SelectedTab = strTabName;
  143. }
  144. }
  145. this.PublicFunctionRows();
  146. /*foreach(TabPage page in this.tabPanel.TabPages)
  147. {
  148. if(page)
  149. }*/
  150. }
  151. /// <summary>
  152. /// 窗体加载事件
  153. /// </summary>
  154. /// <param name="sender"></param>
  155. /// <param name="e"></param>
  156. void A_EventAideFormMain_Load(object sender, EventArgs e)
  157. {
  158. this.lab_ChildBirth.Visible = false;
  159. this.panelDateTime.Visible = false;
  160. this.dgvData.Columns.Clear();
  161. this.dgvData.Rows.Clear();
  162. string strColumn = "订单号,客户类型,客户姓名,手机号码,性别,结婚日期,地区,套系类别,套系名称,套系价格,消费总额,订单类型,客户来源,沟通状态,跟踪人员姓名,沟通日期,沟通时长,备注";
  163. this.dgvData.DataColumns(strColumn);
  164. }
  165. /// <summary>
  166. /// 积分限制输入
  167. /// </summary>
  168. /// <param name="sender"></param>
  169. /// <param name="e"></param>
  170. void txtPointsEnd_KeyPress(object sender, KeyPressEventArgs e)
  171. {
  172. if (!Char.IsNumber(e.KeyChar) && !Char.IsControl(e.KeyChar))
  173. { e.Handled = true; }
  174. }
  175. /// <summary>
  176. /// 积分限制输入
  177. /// </summary>
  178. /// <param name="sender"></param>
  179. /// <param name="e"></param>
  180. void txtPointsStart_KeyPress(object sender, KeyPressEventArgs e)
  181. {
  182. if (!Char.IsNumber(e.KeyChar) && !Char.IsControl(e.KeyChar))
  183. { e.Handled = true; }
  184. }
  185. /// <summary>
  186. /// 月离开事件
  187. /// </summary>
  188. /// <param name="sender"></param>
  189. /// <param name="e"></param>
  190. void dtMonthStart_ValueChanged(object sender, EventArgs e)
  191. {
  192. this.dtDayStart.Value = DateTime.DaysInMonth(SDateTime.Now.Year, Convert.ToInt32(this.dtMonthStart.Value));
  193. this.dtDayStart.Maximum = this.dtDayStart.Value;
  194. }
  195. /// <summary>
  196. /// 月离开事件
  197. /// </summary>
  198. /// <param name="sender"></param>
  199. /// <param name="e"></param>
  200. void dtMonthEnd_ValueChanged(object sender, EventArgs e)
  201. {
  202. this.dtDayEnd.Value = DateTime.DaysInMonth(SDateTime.Now.Year, Convert.ToInt32(this.dtMonthEnd.Value));
  203. this.dtDayEnd.Maximum = this.dtDayEnd.Value;
  204. }
  205. /// <summary>
  206. /// 窗体大小发生变化
  207. /// </summary>
  208. /// <param name="sender"></param>
  209. /// <param name="e"></param>
  210. void A_EventAideFormMain_Resize(object sender, EventArgs e)
  211. {
  212. switch (this.butnColse.Location.Y)
  213. {
  214. case 2: this.flowLayoutPanel1.Height = 34; break;
  215. case 35: this.flowLayoutPanel1.Height = 68; break;
  216. }
  217. }
  218. /// <summary>
  219. /// 高级查询
  220. /// </summary>
  221. /// <param name="sender"></param>
  222. /// <param name="e"></param>
  223. void btnHighSelect_Click(object sender, EventArgs e)
  224. {
  225. LYFZ.Software.MainBusiness.SMSManagement.ShortSmsMessage.FrmHigehrSelect frm = new SMSManagement.ShortSmsMessage.FrmHigehrSelect();
  226. if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  227. {
  228. htData["StrPackages"] = frm.CtvPak_PackagesClass.Text;
  229. htData["StrOrderCategory"] = frm.cmbtreevOrdeClass.Text;
  230. htData["StrConsumptionBind"] = Convert.ToInt32(frm.numTaoxijiageA.Value);
  231. htData["StrConsumptionEnd"] = Convert.ToInt32(frm.numTaoxijiageZ.Value);
  232. htData["StrAppointmentBind"] = frm.txtyuyueshijianA.Text;
  233. htData["StrAppointmentEnd"] = frm.txtyuyueshijianZ.Text;
  234. htData["StrCustomerArea"] = frm.cmbCus_Region.Text;
  235. htData["StrCustomerSource"] = frm.cmbtreevCustomerSource.Text;
  236. htData["StrBirthday"] = frm.cmbAnshenri.Text;
  237. htData["StrMarriage"] = frm.cmbAnhungqi.Text;
  238. htData["StryearBind"] = frm.numShuiA.Value;
  239. htData["StryearEnd"] = frm.numShuiZ.Value;
  240. htData["StrDayBind"] = frm.numTianA.Value;
  241. htData["StrDayEnd"] = frm.numTianZ.Value;
  242. htData["IsYears"] = frm.rdoanshui.Checked;
  243. this.PublicFunctionRows();
  244. }
  245. }
  246. /// <summary>
  247. /// 添加记录
  248. /// </summary>
  249. /// <param name="sender"></param>
  250. /// <param name="e"></param>
  251. void butnAddRecord_Click(object sender, EventArgs e)
  252. {
  253. string StrClientGroupNumber = "";
  254. string StrClientNumber = "";
  255. string StrMemberNumber = "";
  256. string StrHctOddnumber = "";
  257. LYFZ.EnumPublic.ClientServiceTaskItem EnumbInputType = EnumPublic.ClientServiceTaskItem.结婚客人;
  258. switch (this.tabPanel.TabPages[this.tabPanel.SelectedIndex].Name.Trim())
  259. {
  260. case "tb_Marry":
  261. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  262. {
  263. StrClientGroupNumber = this.dgvData.CurrentRow.Cells["客户组编号"].Value.ToString();
  264. EnumbInputType = LYFZ.EnumPublic.ClientServiceTaskItem.结婚客人;
  265. }
  266. break;
  267. case "tb_MemorialDay":
  268. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  269. {
  270. StrClientGroupNumber = this.dgvData.CurrentRow.Cells["客户组编号"].Value.ToString();
  271. EnumbInputType = LYFZ.EnumPublic.ClientServiceTaskItem.结婚纪念日;
  272. }
  273. break;
  274. case "tb_Birthday":
  275. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  276. {
  277. StrClientNumber = this.dgvData.CurrentRow.Cells["客户编号"].Value.ToString();
  278. EnumbInputType = LYFZ.EnumPublic.ClientServiceTaskItem.客户生日;
  279. }
  280. break;
  281. case "tb_ChildBirthday":
  282. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  283. {
  284. StrClientNumber = this.dgvData.CurrentRow.Cells["客户编号"].Value.ToString();
  285. EnumbInputType = LYFZ.EnumPublic.ClientServiceTaskItem.宝贝生日;
  286. }
  287. break;
  288. case "tb_Referral":
  289. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  290. {
  291. StrClientNumber = this.dgvData.CurrentRow.Cells["客户编号"].Value.ToString();
  292. EnumbInputType = LYFZ.EnumPublic.ClientServiceTaskItem.转介绍客户;
  293. }
  294. break;
  295. case "tb_Points":
  296. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  297. {
  298. StrClientNumber = this.dgvData.CurrentRow.Cells["客户编号"].Value.ToString();
  299. StrMemberNumber = this.dgvData.CurrentRow.Cells["Mc_Number"].Value.ToString();
  300. EnumbInputType = LYFZ.EnumPublic.ClientServiceTaskItem.会员积分;
  301. }
  302. break;
  303. case "tb_PregnantCycle":
  304. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  305. {
  306. StrHctOddnumber = this.dgvData.CurrentRow.Cells["来单批号"].Value.ToString();
  307. EnumbInputType = LYFZ.EnumPublic.ClientServiceTaskItem.孕妇周期;
  308. }
  309. break;
  310. }
  311. if (string.IsNullOrEmpty(StrClientNumber) && string.IsNullOrEmpty(StrClientGroupNumber) && string.IsNullOrEmpty(StrMemberNumber) && string.IsNullOrEmpty(StrHctOddnumber))
  312. { MessageBoxCustom.Show("请选择要添加的数据"); return; }
  313. LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.A_AddCommunicateRecords frm = new SuperSmallForm.A_AddCommunicateRecords();
  314. frm.StrClientNumber = StrClientGroupNumber;
  315. frm.StrClientName = StrClientNumber;
  316. frm.StrMemberNumber = StrMemberNumber;
  317. frm.StrHctOddnumber = StrHctOddnumber;
  318. frm.EnumClientServiceTaskItem = EnumbInputType;
  319. frm.ShowDialog();
  320. if (frm.IsSaveed)
  321. { this.PublicFunctionRows(); }
  322. }
  323. /// <summary>
  324. /// 安排客服
  325. /// </summary>
  326. /// <param name="sender"></param>
  327. /// <param name="e"></param>
  328. void btnClientServiceAnPai_Click(object sender, EventArgs e)
  329. {
  330. if (this.dgvData.SelectedRows.Count > 0)
  331. {
  332. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ClientServiceTaskAnPaiSmallForm frm = new DoorCityProcess.SetSmallForm.ClientServiceTaskAnPaiSmallForm();
  333. frm.ShowDialog();
  334. if (frm.IsSaveed)
  335. {
  336. LYFZ.EnumPublic.ClientServiceTaskItem ClientServiceAnPai;
  337. switch (this.tabPanel.SelectedTab.Name.Trim())
  338. {
  339. case "tb_MemorialDay":
  340. ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.结婚纪念日;
  341. break;
  342. case "tb_Birthday":
  343. ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.客户生日;
  344. break;
  345. case "tb_ChildBirthday":
  346. ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.宝贝生日;
  347. break;
  348. case "tb_Referral":
  349. ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.转介绍客户;
  350. break;
  351. case "tb_Points":
  352. ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.会员积分;
  353. break;
  354. case "tb_PregnantCycle":
  355. ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.孕妇周期;
  356. break;
  357. default:
  358. ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.结婚客人;
  359. break;
  360. }
  361. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ClientServiceAnPai(this.dgvData, LYFZ.EnumPublic.ClientServiceTaskType.沟通助手, frm.model, ClientServiceAnPai);
  362. }
  363. }
  364. }
  365. /// <summary>
  366. /// 导出
  367. /// </summary>
  368. /// <param name="sender"></param>
  369. /// <param name="e"></param>
  370. void btnExport_Click(object sender, EventArgs e)
  371. {
  372. this.dgvData.ExportDataTable();
  373. }
  374. /// <summary>
  375. /// 关闭
  376. /// </summary>
  377. /// <param name="sender"></param>
  378. /// <param name="e"></param>
  379. void butnColse_Click(object sender, EventArgs e)
  380. { this.Close(); }
  381. /// <summary>
  382. /// 查询
  383. /// </summary>
  384. /// <param name="sender"></param>
  385. /// <param name="e"></param>
  386. void butnQuery_Click(object sender, EventArgs e)
  387. { this.PublicFunctionRows(); }
  388. /// <summary>
  389. /// 录音回放
  390. /// </summary>
  391. /// <param name="sender"></param>
  392. /// <param name="e"></param>
  393. void butnRecordingsPlay_Click(object sender, EventArgs e)
  394. {
  395. MessageBoxCustom.Show("未找到录音文件!");
  396. //LYFZ.BLL.BLL_ErpCustomersTrackRecord bll = new BLL.BLL_ErpCustomersTrackRecord();
  397. //if (this.dgvMarry.SelectedRows.Count == 0)
  398. //{
  399. // MessageBoxCustom.Show("请选中你要录音回放的数据!");
  400. // return;
  401. //}
  402. //int id = Convert.ToInt32(this.dgvMarry.CurrentRow.Cells["ID"].Value);
  403. //DataTable dt = bll.GetList("id=" + id + "").Tables[0];
  404. //if (dt.Rows.Count > 0)
  405. //{
  406. // string Callw_SoundRecording = dt.Rows[0]["TR_CallRecording"].ToString();
  407. // if (!string.IsNullOrEmpty(Callw_SoundRecording))
  408. // {
  409. // //播放
  410. // LYFZ.Software.MainBusiness.CallerWizard.FrmPlayer set = new CallerWizard.FrmPlayer();
  411. // set.Path = Callw_SoundRecording;
  412. // set.ShowDialog();
  413. // }
  414. // else { MessageBoxCustom.Show("文件未找到!"); }
  415. //}
  416. }
  417. /// <summary>
  418. /// 沟通详情按钮
  419. /// </summary>
  420. /// <param name="sender"></param>
  421. /// <param name="e"></param>
  422. void buttonEx1_Click(object sender, EventArgs e)
  423. {
  424. string StrOrdNumber = "";
  425. string StrClientNumber = "";
  426. string StrHctOddnumber = "";
  427. string StrClientGroupNumber = "";
  428. switch (this.tabPanel.TabPages[this.tabPanel.SelectedIndex].Name.Trim())
  429. {
  430. case "tb_Marry":
  431. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  432. { StrClientGroupNumber = this.dgvData.CurrentRow.Cells["客户组编号"].Value.ToString(); }
  433. break;
  434. case "tb_MemorialDay":
  435. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  436. { StrClientGroupNumber = this.dgvData.CurrentRow.Cells["客户组编号"].Value.ToString(); }
  437. break;
  438. case "tb_Birthday":
  439. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  440. { StrClientNumber = this.dgvData.CurrentRow.Cells["客户编号"].Value.ToString(); }
  441. break;
  442. case "tb_ChildBirthday":
  443. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  444. {
  445. // StrClientNumber = this.dgvData.CurrentRow.Cells["订单号"].Value.ToString();
  446. #region 2017-03-31 刘工修改
  447. StrOrdNumber = this.dgvData.CurrentRow.Cells["订单号"].Value.ToString();
  448. #endregion
  449. }
  450. break;
  451. case "tb_Referral":
  452. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  453. { StrClientNumber = this.dgvData.CurrentRow.Cells["客户编号"].Value.ToString(); }
  454. break;
  455. case "tb_Points":
  456. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  457. { StrClientNumber = this.dgvData.CurrentRow.Cells["客户编号"].Value.ToString(); }
  458. break;
  459. case "tb_PregnantCycle":
  460. if (this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0)
  461. { StrHctOddnumber = this.dgvData.CurrentRow.Cells["来单批号"].Value.ToString(); }
  462. break;
  463. }
  464. //if (string.IsNullOrEmpty(StrOrdNumber) && string.IsNullOrEmpty(StrClientNumber) && string.IsNullOrEmpty(StrHctOddnumber) && string.IsNullOrEmpty(StrClientGroupNumber))
  465. //{ MessageBoxCustom.Show("请选择要查看的数据"); return; }
  466. LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.A_CommunicationDetails frm = new SuperSmallForm.A_CommunicationDetails();
  467. frm.StrNumber = StrOrdNumber;
  468. frm.StrClientNumber = StrClientNumber;
  469. frm.StrHctOddnumber = StrHctOddnumber;
  470. frm.StrClientGroupNumber = StrClientGroupNumber;
  471. frm.ShowDialog();
  472. if (frm.IsSaveed)
  473. { this.PublicFunctionRows(); }
  474. }
  475. /// <summary>
  476. /// 选项卡选择事件
  477. /// </summary>
  478. /// <param name="sender"></param>
  479. /// <param name="e"></param>
  480. void tabPanel_SelectedIndexChanged(object sender, EventArgs e)
  481. {
  482. if (this.tabPanel.SelectedIndex==-1)
  483. {
  484. return;
  485. }
  486. this.lab_ChildBirth.Visible = false;
  487. this.txtQuery.Text = "";
  488. this.txtPointsStart.Text = "";
  489. this.txtPointsEnd.Text = "";
  490. this.butnQuery.Visible = true;
  491. this.btnHighSelect.Visible = true;
  492. this.dtYearStart.Enabled = false;
  493. this.dtYearEnd.Enabled = false;
  494. this.dtYearStart.Value = SDateTime.Now.Year;
  495. this.dtYearEnd.Value = SDateTime.Now.Year;
  496. switch (this.tabPanel.TabPages[this.tabPanel.SelectedIndex].Name.Trim())
  497. {
  498. case "tb_Marry":
  499. case "tb_MemorialDay":
  500. this.txtQuery.WaterText = "客户名";
  501. this.panelClientName.Visible = true;
  502. this.panelPoints.Visible = false;
  503. this.panelMonthDay.Visible = true;
  504. this.panelDateTime.Visible = false;
  505. break;
  506. case "tb_Birthday":
  507. case "tb_ChildBirthday":
  508. this.txtQuery.WaterText = "客户名";
  509. this.panelClientName.Visible = true;
  510. this.panelPoints.Visible = false;
  511. this.panelMonthDay.Visible = true;
  512. this.panelDateTime.Visible = false;
  513. this.lab_ChildBirth.Visible = true;
  514. this.lab_ChildBirth.BackColor = System.Drawing.Color.DodgerBlue;
  515. break;
  516. case "tb_Referral":
  517. this.txtQuery.WaterText = "客户名/介绍人";
  518. this.panelPoints.Visible = false;
  519. this.panelMonthDay.Visible = false;
  520. this.panelClientName.Visible = true;
  521. this.panelDateTime.Visible = true;
  522. break;
  523. case "tb_Points":
  524. this.txtQuery.WaterText = "客户名";
  525. this.panelClientName.Visible = true;
  526. this.panelMonthDay.Visible = false;
  527. this.panelPoints.Visible = true;
  528. this.panelDateTime.Visible = false;
  529. break;
  530. case "tb_PregnantCycle":
  531. this.txtQuery.WaterText = "客户名";
  532. this.panelClientName.Visible = true;
  533. this.panelMonthDay.Visible = false;
  534. this.panelPoints.Visible = false;
  535. this.butnQuery.Visible = false;
  536. this.btnHighSelect.Visible = false;
  537. this.panelDateTime.Visible = false;
  538. break;
  539. }
  540. switch (this.tabPanel.TabPages[this.tabPanel.SelectedIndex].Name.Trim())
  541. {
  542. case "tb_Marry": this.labelEx5.Text = "结婚日期:"; break;
  543. case "tb_MemorialDay": this.labelEx5.Text = "结婚纪念日:"; break;
  544. case "tb_Birthday": this.labelEx5.Text = "客户生日:"; break;
  545. case "tb_ChildBirthday": this.labelEx5.Text = "宝宝生日:"; break;
  546. }
  547. this.PublicFunctionRows();
  548. }
  549. /// <summary>
  550. /// 结婚客人
  551. /// </summary>
  552. /// <param name="sender"></param>
  553. /// <param name="e"></param>
  554. void dgvMarry_MouseDoubleClick(object sender, MouseEventArgs e)
  555. {
  556. if (e.Location.Y > this.dgvData.ColumnHeadersHeight)
  557. {
  558. if (this.dgvData.Rows.Count > 0)
  559. {
  560. if (this.dgvData.CurrentRow.Index >= 0 && this.dgvData.CurrentCell.ColumnIndex >= 0)
  561. { this.butnAddRecord_Click(this, e); }
  562. }
  563. }
  564. }
  565. /// <summary>
  566. /// 可用积分点击
  567. /// </summary>
  568. /// <param name="sender"></param>
  569. /// <param name="e"></param>
  570. void chkAvailablePoints_Click(object sender, EventArgs e)
  571. {
  572. this.chkAvailablePoints.Checked = true;
  573. this.chkTotalPoints.Checked = false;
  574. }
  575. /// <summary>
  576. /// 总积分点击
  577. /// </summary>
  578. /// <param name="sender"></param>
  579. /// <param name="e"></param>
  580. void chkTotalPoints_Click(object sender, EventArgs e)
  581. {
  582. this.chkAvailablePoints.Checked = false;
  583. this.chkTotalPoints.Checked = true;
  584. }
  585. /// <summary>
  586. /// 创建行
  587. /// </summary>
  588. void PublicFunctionRows()
  589. {
  590. string StrWhere = "";
  591. string StrColumns = "";
  592. DataTable newTable = new DataTable();
  593. string StrDateTimeStart = dtYearStart.Value + "-" + Convert.ToInt32(this.dtMonthStart.Value).ToString("d2") + "-" + Convert.ToInt32(this.dtDayStart.Value).ToString("d2");
  594. string StrDateTimeEnd = dtYearEnd.Value + "-" + Convert.ToInt32(this.dtMonthEnd.Value).ToString("d2") + "-" + Convert.ToInt32(this.dtDayEnd.Value).ToString("d2");
  595. switch (this.tabPanel.TabPages[this.tabPanel.SelectedIndex].Name.Trim())
  596. {
  597. case "tb_Marry":
  598. StrWhere = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("dbo.fn_ConvertDate(GregorianCalendar_DayForMarriage)", StrDateTimeStart, StrDateTimeEnd) + this.GetStrWhere();
  599. StrColumns = "客户编号,客户组编号,订单号,客户姓名,客户类型,手机号码,性别,结婚日期,地区,套系类别,套系名称,套系价格,消费总额,订单类别,客户来源,沟通状态,客服人员,沟通日期,沟通时长,沟通备注";
  600. newTable = LYFZ.BLL.BLL_ErpOrderView.GetData_CommunicationAssistantClientMarriage(LYFZ.DAL.DAL_GridViewDisplayIndex.GetdictColumns(StrColumns), StrWhere, " order by dbo.fn_ConvertDate(GregorianCalendar_DayForMarriage)");
  601. this.dgvData.DataSource(newTable, strHideField: "客户编号,客户组编号");
  602. break;
  603. case "tb_MemorialDay":
  604. StrWhere = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTimeNowYear("dbo.fn_ConvertDate(GregorianCalendar_NowYearDayForMarriage)", StrDateTimeStart, StrDateTimeEnd) + this.GetStrWhere();
  605. StrColumns = "客户编号,客户组编号,订单号,客户姓名,客户类型,手机号码,性别,结婚日期,结婚纪念日,地区,套系类别,套系名称,套系价格,消费总额,订单类别,客户来源,沟通状态,客服人员,沟通日期,沟通时长,沟通备注";
  606. newTable = LYFZ.BLL.BLL_ErpOrderView.GetData_CommunicationAssistantClientMarriageMemorial(LYFZ.DAL.DAL_GridViewDisplayIndex.GetdictColumns(StrColumns), StrWhere, " order by dbo.fn_ConvertDate(GregorianCalendar_NowYearDayForMarriage)");
  607. this.dgvData.DataSource(newTable, strHideField: "客户编号,客户组编号");
  608. break;
  609. case "tb_Birthday":
  610. StrColumns = "客户编号,客户组编号,订单号,客户类型,客户姓名,手机号码,性别,客户出生日期,客户今年生日,地区,套系类别,订单类别,套系名称,套系价格,消费总额,客户来源,沟通状态,客服人员,沟通日期,沟通时长,沟通备注";
  611. if (this.lab_ChildBirth.BackColor == System.Drawing.Color.DodgerBlue)
  612. {
  613. StrWhere = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTimeNowYear("dbo.Fun_GetGregorianCalendarNowYearBirthday(Cus_Birthday,Cus_BirthdayLunar)", StrDateTimeStart, StrDateTimeEnd) + this.GetStrWhere();
  614. newTable = LYFZ.BLL.BLL_ErpOrderView.GetData_CommunicationAssistantClientBirthday(LYFZ.DAL.DAL_GridViewDisplayIndex.GetdictColumns(StrColumns), StrWhere, " order by dbo.Fun_GetGregorianCalendarNowYearBirthday(Cus_Birthday,Cus_BirthdayLunar)");
  615. }
  616. else
  617. {
  618. StrWhere = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime(" Cus_Birthday ", StrDateTimeStart, StrDateTimeEnd) + this.GetStrWhere();
  619. newTable = LYFZ.BLL.BLL_ErpOrderView.GetData_CommunicationAssistantClientBirthday(LYFZ.DAL.DAL_GridViewDisplayIndex.GetdictColumns(StrColumns), StrWhere, " order by Cus_Birthday ");
  620. }
  621. this.dgvData.DataSource(newTable, strHideField: "客户编号,客户组编号");
  622. break;
  623. case "tb_ChildBirthday":
  624. #if IGNORE
  625. StrColumns = "客户编号,客户组编号,订单号,客户姓名,客户类型,手机号码,性别,宝宝出生日期,宝宝今年生日,年龄,地区,接单人,套系类别,套系名称,套系价格,消费总额,订单类别,客户来源,沟通状态,客服人员,沟通日期,沟通时长,沟通备注";//,宝宝生日
  626. #else
  627. StrColumns = "客户编号,客户组编号,订单号,客户姓名,客户类型,手机号码,性别,宝宝出生日期,宝宝今年生日,拍摄场景,拍照日期,拍照状态,年龄,地区,接单人,套系类别,套系名称,套系价格,消费总额,订单类别,客户来源,沟通状态,客服人员,沟通日期,沟通时长,沟通备注";//,宝宝生日
  628. #endif
  629. if (this.lab_ChildBirth.BackColor == System.Drawing.Color.DodgerBlue)
  630. {
  631. StrWhere = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTimeNowYear("dbo.fn_ConvertDate(GregorianCalendar_NowYearBirthday)", StrDateTimeStart, StrDateTimeEnd) + this.GetStrWhere();
  632. newTable = LYFZ.BLL.BLL_ErpOrderView.GetData_CommunicationAssistantClientBabyBirthday(LYFZ.DAL.DAL_GridViewDisplayIndex.GetdictColumns(StrColumns), StrWhere, " order by Ord_SinceOrderNumber, dbo.fn_ConvertDate(GregorianCalendar_NowYearBirthday)");
  633. }
  634. else
  635. {
  636. StrWhere = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("Cus_Birthday", StrDateTimeStart, StrDateTimeEnd) + this.GetStrWhere();
  637. newTable = LYFZ.BLL.BLL_ErpOrderView.GetData_CommunicationAssistantClientBabyBirthday(LYFZ.DAL.DAL_GridViewDisplayIndex.GetdictColumns(StrColumns), StrWhere, " order by Ord_SinceOrderNumber, Cus_Birthday ");
  638. }
  639. string ordNumber = "";
  640. foreach(DataRow dr in newTable.Rows)
  641. {
  642. if(dr["订单号"].ToString_s()!= ordNumber)
  643. {
  644. ordNumber = dr["订单号"].ToString_s();
  645. }
  646. else
  647. {
  648. dr["订单号"] = "";
  649. dr["客户姓名"] = "";
  650. dr["客户类型"] = "";
  651. dr["手机号码"] = "";
  652. dr["性别"] = "";
  653. dr["宝宝出生日期"] = "";
  654. dr["宝宝今年生日"] = "";
  655. }
  656. }
  657. this.dgvData.DataSource(newTable, strHideField: "客户编号,客户组编号");
  658. break;
  659. case "tb_Referral":
  660. StrWhere = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTimeNowYear("Ord_CreateDateTime", this.dtpDateStrat.DateValue.Trim(), this.dtDateEnd.DateValue.Trim()) + this.GetStrWhere();
  661. StrColumns = "Ord_Number,客户编号,订单日期,介绍类型,订单号,套系名称,订单客户姓名,介绍人姓名,性别,介绍人电话,成交状态,沟通状态,客服人员,沟通日期,沟通时长,沟通备注";
  662. newTable = LYFZ.BLL.BLL_ErpOrderView.GetData_CommunicationAssistantClientReferral(LYFZ.DAL.DAL_GridViewDisplayIndex.GetdictColumns(StrColumns), StrWhere, " order by Ord_CreateDateTime");
  663. this.dgvData.DataSource(newTable, strHideField: "Ord_Number,客户编号");
  664. this.dgvData.Columns["订单日期"].Width = 110;
  665. this.dgvData.FillLastColumn();
  666. break;
  667. case "tb_Points":
  668. StrWhere = this.GetStrWhere();
  669. StrColumns = "Mc_Number,客户编号,会员卡号,总积分,可用积分,客户姓名,客户电话,沟通状态,客服人员,沟通日期,沟通时长,沟通备注";
  670. newTable = LYFZ.BLL.BLL_ErpOrderView.GetData_CommunicationAssistantClientMemberPoints(LYFZ.DAL.DAL_GridViewDisplayIndex.GetdictColumns(StrColumns), StrWhere, " order by Mc_Number");
  671. this.dgvData.DataSource(newTable, strHideField: "Mc_Number,客户编号");
  672. this.dgvData.FillLastColumn();
  673. break;
  674. case "tb_PregnantCycle":
  675. StrWhere = this.GetStrWhere();
  676. StrColumns = "来单批号,客户姓名,预产期,怀孕天数,怀孕周期,沟通状态,客服人员,沟通日期,沟通时长,沟通备注";
  677. newTable = LYFZ.BLL.BLL_ErpOrderView.GetData_CommunicationAssistantClientPregnancyCycle(LYFZ.DAL.DAL_GridViewDisplayIndex.GetdictColumns(StrColumns), StrWhere, " order by 来单批号");
  678. this.dgvData.DataSource(newTable, strHideField: "");
  679. this.dgvData.FillLastColumn();
  680. break;
  681. }
  682. this.dataGridViewStatisticsCount1.LocationX = this.dgvData.RowHeadersWidth;
  683. this.dataGridViewStatisticsCount1.CurrenQuantity = newTable.Rows.Count;
  684. this.dataGridViewStatisticsCount1.TotalQuantity = newTable.Rows.Count;
  685. }
  686. /// <summary>
  687. /// 获取查询条件
  688. /// </summary>
  689. /// <returns></returns>
  690. string GetStrWhere()
  691. {
  692. //string StrWhere = "";
  693. string StrWhere = DoorCityProcess.PublicCodeClasses.GetGroupQueryWhere(this.cmbtreevStoreName, "Ord_DividedShop");
  694. switch (this.tabPanel.TabPages[this.tabPanel.SelectedIndex].Name.Trim())
  695. {
  696. case "tb_Marry":
  697. StrWhere += " And (Cus_Name like '%" + this.txtQuery.Text.Trim() + "%' or Cus_Name_py like '%" + this.txtQuery.Text.Trim() + "%' ) ";
  698. // StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("结婚日期查询", this.dtpDateStrat.DateValue.Trim(), this.dtDateEnd.DateValue.Trim());
  699. break;
  700. case "tb_MemorialDay":
  701. //StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTimeNowYear("结婚纪念日查询", this.dtpDateStrat.DateValue.Trim(), this.dtDateEnd.DateValue.Trim());
  702. StrWhere += " And (Cus_Name like '%" + this.txtQuery.Text.Trim() + "%' or Cus_Name_py like '%" + this.txtQuery.Text.Trim() + "%' ) And GregorianCalendar_DayForMarriage < '" + (SDateTime.Now.Year + "-01-01") + "'";
  703. break;
  704. case "tb_Birthday":
  705. StrWhere += " And (Cus_Name like '%" + this.txtQuery.Text.Trim() + "%' ) ";
  706. // StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTimeNowYear("客户生日查询", this.dtpDateStrat.DateValue.Trim(), this.dtDateEnd.DateValue.Trim());
  707. break;
  708. case "tb_ChildBirthday":
  709. StrWhere += " And (Cus_Name like '%" + this.txtQuery.Text.Trim() + "%' or Cus_Name_py like '%" + this.txtQuery.Text.Trim() + "%' ) ";
  710. // StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTimeNowYear("宝宝生日查询", this.dtpDateStrat.DateValue.Trim(), this.dtDateEnd.DateValue.Trim());
  711. if (htData.ContainsKey("IsYears"))
  712. {
  713. if (Convert.ToBoolean(htData["IsYears"]))
  714. {
  715. if (Convert.ToInt32(htData["StryearBind"]) > 0 && Convert.ToInt32(htData["StryearEnd"]) > 0)
  716. { StrWhere += " and (Age_Year between " + Convert.ToInt32(htData["StryearBind"]) + " and " + Convert.ToInt32(htData["StryearEnd"]) + ")"; }
  717. }
  718. else
  719. {
  720. if (Convert.ToInt32(htData["StrDayBind"]) > 0 && Convert.ToInt32(htData["StrDayEnd"]) > 0)
  721. { StrWhere += " and (Age_Day between " + Convert.ToInt32(htData["StrDayBind"]) + " and " + Convert.ToInt32(htData["StrDayEnd"]) + ")"; }
  722. }
  723. }
  724. break;
  725. case "tb_Referral":
  726. // StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("订单日期", this.dtpDateStrat.DateValue.Trim(), this.dtDateEnd.DateValue.Trim()) + " and (Cus_NamePinyin like '%" + this.txtQuery.Text.Trim() + "%' or 介绍人姓名 like '%" + this.txtQuery.Text.Trim() + "%')";
  727. if (this.txtQuery.Text.Trim().Length > 0)
  728. { StrWhere += " and (tb_ErpCustomer.Cus_NamePinyin like '%" + this.txtQuery.Text.Trim() + "%' or tb_ErpCustomer.Cus_Name like '%" + this.txtQuery.Text.Trim() + "%' or tempTB_AggregationCustomer.Cus_Name like '%" + this.txtQuery.Text.Trim() + "%' or tempTB_AggregationCustomer.Cus_Name_py like '%" + this.txtQuery.Text.Trim() + "%')"; }
  729. break;
  730. case "tb_Points":
  731. StrWhere += " And (Cus_Name like '%" + this.txtQuery.Text.Trim() + "%' ) ";
  732. if (this.txtPointsStart.Text.Trim() != "" && this.txtPointsEnd.Text.Trim() != "")
  733. { StrWhere += " and (Mcps_AvailablePoints between '" + this.txtPointsStart.Text.Trim() + "' and '" + this.txtPointsEnd.Text.Trim() + "')"; }
  734. else if (this.txtPointsStart.Text.Trim() != "" && this.txtPointsEnd.Text.Trim() == "")
  735. { StrWhere += " and (Mcps_AvailablePoints = '" + this.txtPointsStart.Text.Trim() + "')"; }
  736. else if (this.txtPointsStart.Text.Trim() == "" && this.txtPointsEnd.Text.Trim() != "")
  737. { StrWhere += " and (Mcps_AvailablePoints = '" + this.txtPointsEnd.Text.Trim() + "')"; }
  738. if (this.chkTotalPoints.Checked)
  739. { StrWhere = StrWhere.Replace("Mcps_AvailablePoints", "Mcps_TotalPoints"); }
  740. // StrWhere += " and Mc_Status = '1'";
  741. break;
  742. case "tb_PregnantCycle":
  743. StrWhere += " And (Hct_CustomerName like '%" + this.txtQuery.Text.Trim() + "%' ) ";
  744. break;
  745. }
  746. if (htData.Count > 0)
  747. {
  748. if (htData["StrPackages"].ToString().Trim().Length > 0)
  749. { StrWhere += " and Ord_PhotographyCategory='" + htData["StrPackages"].ToString().Trim() + "'"; }
  750. if (htData["StrOrderCategory"].ToString().Trim().Length > 0)
  751. { StrWhere += " and Ord_Type='" + htData["StrOrderCategory"].ToString().Trim() + "'"; }
  752. if (htData["StrConsumptionBind"].ToString().Trim().Length > 0 && Convert.ToDecimal(htData["StrConsumptionBind"]) > 0 && htData["StrConsumptionEnd"].ToString().Trim().Length > 0 && Convert.ToDecimal(htData["StrConsumptionEnd"]) > 0)
  753. { StrWhere += " and ((isnull(Plu_Amount,0)+isnull(Ord_SeriesPrice,0)) between " + Convert.ToDecimal(htData["StrConsumptionBind"]) + " and " + Convert.ToDecimal(htData["StrConsumptionEnd"]) + ")"; }
  754. //if (htData["StrAppointmentBind"].ToString().Trim().Length > 0 && Convert.ToDecimal(htData["StrAppointmentBind"]) > 0 && htData["StrAppointmentEnd"].ToString().Trim().Length > 0 && Convert.ToDecimal(htData["StrAppointmentEnd"]) > 0)
  755. //{ StrWhere += " and (预约时间 between '" + Convert.ToDecimal(htData["StrAppointmentBind"]) + "' and '" + Convert.ToDecimal(htData["StrAppointmentEnd"]) + "' ) "; }
  756. if (htData["StrCustomerArea"].ToString().Trim().Length > 0)
  757. { StrWhere += " and M_Cus_Region = '" + htData["StrCustomerArea"].ToString().Trim() + "'"; }
  758. if (htData["StrCustomerSource"].ToString().Trim().Length > 0)
  759. { StrWhere += " and GP_CustomerSource = '" + htData["StrCustomerSource"].ToString().Trim() + "'"; }
  760. }
  761. this.htData.Clear();
  762. return StrWhere;
  763. }
  764. }
  765. }