CameraControlQuerySmallForm.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  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 LYFZ.ComponentLibrary;
  11. using LYFZ.Helper;
  12. namespace LYFZ.Software.MainBusiness.CameraControlBook.SmallForm
  13. {
  14. public partial class CameraControlQuerySmallForm : LYFZ.Software.UI.CameraControlBook.SmallForm.CameraControlQuerySmallForm
  15. {
  16. LYFZ.BLL.BLL_ErpOrdersPhotography opbll = new BLL.BLL_ErpOrdersPhotography();
  17. public CameraControlQuerySmallForm()
  18. {
  19. this.Shown += CameraControlQuerySmallForm_Shown;
  20. this.Load += CameraControlQuerySmallForm_Load;
  21. this.btnQuery.Click += btnQuery_Click;
  22. this.btnConditionQuery.Click += btnConditionQuery_Click;
  23. this.rdoShotAll.Click += rdoShotAll_Click;
  24. this.rdoShotNo.Click += rdoShotNo_Click;
  25. this.rdoShotIn.Click += rdoShotIn_Click;
  26. this.rdoShotOK.Click += rdoShotOK_Click;
  27. this.chkWedding.Click += chkWedding_Click;
  28. this.chkKids.Click += chkKids_Click;
  29. this.chkPortrait.Click += chkPortrait_Click;
  30. this.btnReservation.Click += btnReservation_Click;
  31. this.btnSameDate.Click += btnSameDate_Click;
  32. this.btnClose.Click += btnClose_Click;
  33. this.dgvData.CellDoubleClick += dgvData_CellDoubleClick;
  34. this.dgvData.ColumnHeaderMouseClick += dgvData_ColumnHeaderMouseClick;
  35. this.dgvData.CellMouseDown += dgvData_CellMouseDown;
  36. this.cmbtreevTextQuery.ComboBoxTree_NodeMouseClick += cmbtreevTextQuery_ComboBoxTree_NodeMouseClick;
  37. this.Resize += CameraControlQuerySmallForm_Resize;
  38. }
  39. /// <summary>
  40. /// 是否保存
  41. /// </summary>
  42. public bool IsSaveed = false;
  43. /// <summary>
  44. ///
  45. /// </summary>
  46. private Dictionary<string, string> DictData = new Dictionary<string, string>();
  47. /// <summary>
  48. /// 员工编号
  49. /// </summary>
  50. string StrUserID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
  51. /// <summary>
  52. /// 窗体加载事件
  53. /// </summary>
  54. /// <param name="sender"></param>
  55. /// <param name="e"></param>
  56. void CameraControlQuerySmallForm_Shown(object sender, EventArgs e)
  57. {
  58. this.PublicFunctionRows();
  59. if (!LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.CameraControlBook, LYFZ.CustomAttributes.OperatingAuthority.CameraControlBook_PhotographClientAnPai))
  60. { this.btnSameDate.Enabled = false; }
  61. }
  62. /// <summary>
  63. /// 窗体加载事件
  64. /// </summary>
  65. /// <param name="sender"></param>
  66. /// <param name="e"></param>
  67. void CameraControlQuerySmallForm_Load(object sender, EventArgs e)
  68. {
  69. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetSystemVersion(this.chkPortrait, this.chkWedding, this.chkKids);
  70. if (this.dgvData.Columns.Count <= 0)
  71. {
  72. string strColumn = "订单号,订单类型,客户姓名,客户电话,客户性别,套系类别,客户来源,套系名称,套系价格,婚期,接单人,套系名称,套系价格,订单日期,拍摄名称,拍摄状态,摄影时间,摄影师,摄影助理,化妆师,化妆助理,引导师,备注";
  73. this.dgvData.DataColumns(strColumn, LYFZ.Software.MainBusiness.CommonLogical.CacheData.StrOrderReportHideField);
  74. }
  75. DataTable tbl = new LYFZ.BLL.BLL_ErpTheScenery().GetAllList().Tables[0];
  76. TreeNode root = null;
  77. for (int i = 0; i < tbl.Rows.Count; i++)
  78. {
  79. if (i == 0)
  80. {
  81. root = new TreeNode();
  82. root.Text = "";
  83. root.Tag = "";
  84. root.Name = "";
  85. this.cmbtreevTextQuery.Nodes.Add(root);
  86. }
  87. root = new TreeNode();
  88. root.Text = tbl.Rows[i]["Tsc_Name"].ToString().Trim();
  89. root.Tag = tbl.Rows[i]["Tsc_Name"].ToString().Trim();
  90. root.Name = tbl.Rows[i]["Tsc_Name"].ToString().Trim();
  91. this.cmbtreevTextQuery.Nodes.Add(root);
  92. }
  93. }
  94. /// <summary>
  95. /// 查询条件选择
  96. /// </summary>
  97. /// <param name="sender"></param>
  98. /// <param name="e"></param>
  99. void cmbtreevTextQuery_ComboBoxTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
  100. { this.PublicFunctionRows(); }
  101. /// <summary>
  102. /// 查询
  103. /// </summary>
  104. /// <param name="sender"></param>
  105. /// <param name="e"></param>
  106. void btnQuery_Click(object sender, EventArgs e)
  107. { this.PublicFunctionRows(); }
  108. /// <summary>
  109. /// 条件查询
  110. /// </summary>
  111. /// <param name="sender"></param>
  112. /// <param name="e"></param>
  113. void btnConditionQuery_Click(object sender, EventArgs e)
  114. {
  115. LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.ConditionQuerySuperSmallForm frm = new SuperSmallForm.ConditionQuerySuperSmallForm();
  116. frm.ShowDialog();
  117. if (frm.DictDataArray.Count > 0)
  118. {
  119. this.DictData = frm.DictDataArray;
  120. this.PublicFunctionRows();
  121. }
  122. }
  123. /// <summary>
  124. /// 全部
  125. /// </summary>
  126. /// <param name="sender"></param>
  127. /// <param name="e"></param>
  128. void rdoShotAll_Click(object sender, EventArgs e)
  129. {
  130. this.rdoShotIn.Checked = false;
  131. this.rdoShotNo.Checked = false;
  132. this.rdoShotOK.Checked = false;
  133. this.PublicFunctionRows();
  134. }
  135. /// <summary>
  136. /// 未拍
  137. /// </summary>
  138. /// <param name="sender"></param>
  139. /// <param name="e"></param>
  140. void rdoShotNo_Click(object sender, EventArgs e)
  141. {
  142. this.rdoShotIn.Checked = false;
  143. this.rdoShotAll.Checked = false;
  144. this.rdoShotOK.Checked = false;
  145. this.PublicFunctionRows();
  146. }
  147. /// <summary>
  148. /// 拍照中
  149. /// </summary>
  150. /// <param name="sender"></param>
  151. /// <param name="e"></param>
  152. void rdoShotIn_Click(object sender, EventArgs e)
  153. {
  154. this.rdoShotNo.Checked = false;
  155. this.rdoShotAll.Checked = false;
  156. this.rdoShotOK.Checked = false;
  157. this.PublicFunctionRows();
  158. }
  159. /// <summary>
  160. /// 已拍
  161. /// </summary>
  162. /// <param name="sender"></param>
  163. /// <param name="e"></param>
  164. void rdoShotOK_Click(object sender, EventArgs e)
  165. {
  166. this.rdoShotNo.Checked = false;
  167. this.rdoShotAll.Checked = false;
  168. this.rdoShotIn.Checked = false;
  169. this.PublicFunctionRows();
  170. }
  171. /// <summary>
  172. /// 婚纱版
  173. /// </summary>
  174. /// <param name="sender"></param>
  175. /// <param name="e"></param>
  176. void chkWedding_Click(object sender, EventArgs e)
  177. {
  178. if (this.chkWedding.Checked)
  179. { this.chkPortrait.Checked = false; this.chkWedding.Checked = true; this.chkKids.Checked = false; }
  180. this.PublicFunctionRows();
  181. }
  182. /// <summary>
  183. /// 儿童版
  184. /// </summary>
  185. /// <param name="sender"></param>
  186. /// <param name="e"></param>
  187. void chkKids_Click(object sender, EventArgs e)
  188. {
  189. if (this.chkKids.Checked)
  190. { this.chkPortrait.Checked = false; this.chkWedding.Checked = false; this.chkKids.Checked = true; }
  191. this.PublicFunctionRows();
  192. }
  193. /// <summary>
  194. /// 写真版
  195. /// </summary>
  196. /// <param name="sender"></param>
  197. /// <param name="e"></param>
  198. void chkPortrait_Click(object sender, EventArgs e)
  199. {
  200. if (this.chkPortrait.Checked)
  201. { this.chkPortrait.Checked = true; this.chkWedding.Checked = false; this.chkKids.Checked = false; }
  202. this.PublicFunctionRows();
  203. }
  204. /// <summary>
  205. /// 预约
  206. /// </summary>
  207. /// <param name="sender"></param>
  208. /// <param name="e"></param>
  209. void btnReservation_Click(object sender, EventArgs e)
  210. {
  211. if (this.dgvData.Rows.Count > 0)
  212. {
  213. if (this.dgvData.CurrentRow != null)
  214. {
  215. if (this.dgvData.CurrentRow.Index >= 0)
  216. {
  217. LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.PhotographedReservationSmallForm frm = new PhotographedReservationSmallForm();
  218. frm.OrdNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
  219. frm.ShowDialog();
  220. if (frm.IsSave)
  221. { this.IsSaveed = frm.IsSave; this.PublicFunctionRows(); }
  222. }
  223. else { MessageBoxCustom.Show("请选择你要安排的客人"); return; }
  224. }
  225. else { MessageBoxCustom.Show("请选择你要安排的客人"); return; }
  226. }
  227. }
  228. /// <summary>
  229. /// 同一日期
  230. /// </summary>
  231. /// <param name="sender"></param>
  232. /// <param name="e"></param>
  233. void btnSameDate_Click(object sender, EventArgs e)
  234. {
  235. if (this.dgvData.Rows.Count > 0)
  236. {
  237. if (this.dgvData.SelectedRows.Count > 1)
  238. {
  239. List<LYFZ.Model.Model_ErpOrdersPhotography> mlist = new List<Model.Model_ErpOrdersPhotography>();
  240. bool isFurn = false;
  241. string StrWhere = " ID in (";
  242. for (int i = 0; i < this.dgvData.SelectedRows.Count; i++)
  243. {
  244. if (this.dgvData.SelectedRows[i].Visible)
  245. {
  246. StrWhere += "'" + this.dgvData.SelectedRows[i].Cells["PID"].Value.ToString().Trim() + "',";
  247. isFurn = true;
  248. }
  249. }
  250. StrWhere = StrWhere.TrimEnd(',') + ")";
  251. System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(delegate()
  252. {
  253. mlist = opbll.GetModelList(strWhere: StrWhere);
  254. }));
  255. t.Start();
  256. LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.UnityArrangeWorkSuperSmallForm frm = new SuperSmallForm.UnityArrangeWorkSuperSmallForm();
  257. frm.UnityArrangeWorkType = LYFZ.EnumPublic.EnumUnityArrangeWorkType.拍照客人;
  258. frm.ShowDialog();
  259. if (frm.IsSaveed)
  260. {
  261. string strName = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
  262. DateTime StrTime = SDateTime.Now;
  263. List<CommandInfo> clist = new List<CommandInfo>();
  264. if (MessageBoxCustom.Show("您确定要保存安排吗?", "温馨提示", MessageBoxButtons.YesNo) == DialogResult.No)
  265. { return; }
  266. while (isFurn)
  267. {
  268. if (mlist.Count > 0)
  269. { isFurn = false; }
  270. }
  271. for (int i = 0; i < this.dgvData.SelectedRows.Count; i++)
  272. {
  273. if (this.dgvData.SelectedRows[i].Visible)
  274. {
  275. for (int j = 0; j < mlist.Count; j++)
  276. {
  277. if (mlist[j].ID == Convert.ToInt32(this.dgvData.SelectedRows[i].Cells["PID"].Value))
  278. {
  279. //LYFZ.Model.Model_ErpOrdersPhotography model = opbll.GetModel(Convert.ToInt32(this.dgvData.SelectedRows[i].Cells["PID"].Value));
  280. LYFZ.Model.Model_ErpOrdersPhotography model = mlist[j];
  281. if (frm.UnityArrangeWorkModel.IsDateTime)
  282. {
  283. this.dgvData.SelectedRows[i].Cells["摄影时间"].Value = frm.UnityArrangeWorkModel.StrDateTime;
  284. model.Ordpg_ReservationPhotographyTime = Convert.ToDateTime(frm.UnityArrangeWorkModel.StrDateTime);
  285. }
  286. if (frm.UnityArrangeWorkModel.IsPhotographerName)
  287. {
  288. this.dgvData.SelectedRows[i].Cells["摄影师"].Value = frm.UnityArrangeWorkModel.PhotographerName;
  289. model.Ordpg_ReservationPhotographyName = frm.UnityArrangeWorkModel.PhotographerTag;
  290. }
  291. if (frm.UnityArrangeWorkModel.IsPhotographyAssistantName)
  292. {
  293. this.dgvData.SelectedRows[i].Cells["摄影助理"].Value = frm.UnityArrangeWorkModel.PhotographyAssistantName;
  294. model.Ordpg_ReservationPhotographyAssistant = frm.UnityArrangeWorkModel.PhotographyAssistantTag;
  295. }
  296. if (frm.UnityArrangeWorkModel.IsMakeupArtistName)
  297. {
  298. this.dgvData.SelectedRows[i].Cells["化妆师"].Value = frm.UnityArrangeWorkModel.MakeupArtistName;
  299. model.Ordpg_ReservationMakeupArtist = frm.UnityArrangeWorkModel.MakeupArtistTag;
  300. }
  301. if (frm.UnityArrangeWorkModel.IsMakeupAssistantName)
  302. {
  303. this.dgvData.SelectedRows[i].Cells["化妆助理"].Value = frm.UnityArrangeWorkModel.MakeupAssistantName;
  304. model.Ordpg_ReservationMakeupAssistant = frm.UnityArrangeWorkModel.MakeupAssistantTag;
  305. }
  306. if (frm.UnityArrangeWorkModel.IsBootDivisionName)
  307. {
  308. this.dgvData.SelectedRows[i].Cells["引导师"].Value = frm.UnityArrangeWorkModel.BootDivisionName;
  309. model.Ordpg_ReservationBootDivision = frm.UnityArrangeWorkModel.BootDivisionTag;
  310. }
  311. if (frm.UnityArrangeWorkModel.IsBootDivisionAssistantName)
  312. {
  313. this.dgvData.SelectedRows[i].Cells["引导助理"].Value = frm.UnityArrangeWorkModel.BootDivisionAssistantName;
  314. model.Ordpg_ReservationBootDivisionAssistant = frm.UnityArrangeWorkModel.BootDivisionAssistantTag;
  315. }
  316. model.Ordpg_DispatchTime = StrTime;
  317. model.Ordpg_Dispatcher = strName;
  318. model.Ordpg_UpdateDateTime = StrTime;
  319. model.Ordpg_UpdateName = strName;
  320. clist.Add(opbll.GetUpdateCommandInfo(model));
  321. mlist.RemoveAt(j);
  322. break;
  323. }
  324. }
  325. }
  326. }
  327. if (clist.Count > 0)
  328. {
  329. if (LYFZ.BLL.BaseBllOperate.ExecuteSqlTran(clist) > 0)
  330. { MessageBoxCustom.Show("保存成功"); IsSaveed = true; }
  331. else
  332. { MessageBoxCustom.Show("保存失败"); }
  333. }
  334. }
  335. }
  336. else
  337. { MessageBoxCustom.Show("请选择多条数据进行安排"); return; }
  338. }
  339. }
  340. /// <summary>
  341. /// 关闭
  342. /// </summary>
  343. /// <param name="sender"></param>
  344. /// <param name="e"></param>
  345. void btnClose_Click(object sender, EventArgs e)
  346. { this.Close(); }
  347. /// <summary>
  348. /// 窗体大小发生变化
  349. /// </summary>
  350. /// <param name="sender"></param>
  351. /// <param name="e"></param>
  352. void CameraControlQuerySmallForm_Resize(object sender, EventArgs e)
  353. {
  354. switch (this.panelPortrait.Location.Y)
  355. {
  356. case 3: this.flowLayoutPanel2.Height = 36; break;
  357. case 37: this.flowLayoutPanel2.Height = 70; break;
  358. }
  359. }
  360. /// <summary>
  361. /// 数据列表双击事件
  362. /// </summary>
  363. /// <param name="sender"></param>
  364. /// <param name="e"></param>
  365. void dgvData_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
  366. {
  367. if (this.dgvData.Rows.Count > 0)
  368. {
  369. if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
  370. { this.btnReservation_Click(this, null); }
  371. }
  372. }
  373. /// <summary>
  374. /// 右键菜单
  375. /// </summary>
  376. /// <param name="sender"></param>
  377. /// <param name="e"></param>
  378. void dgvData_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
  379. {
  380. if (e.Button == MouseButtons.Right)
  381. {
  382. if (e.RowIndex == -1)
  383. {
  384. this.dgvData.conMenu.Items.Clear();
  385. ToolStripMenuItem item = new ToolStripMenuItem();
  386. item.Text = "设置标题";
  387. item.Tag = "SetColumnShow";
  388. item.Name = "SetColumnShow";
  389. this.dgvData.conMenu.Items.Add(item);
  390. //this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
  391. this.dgvData.conMenu.ItemClicked -= dgvData_DataGridViewConMenu_ItemClicked;
  392. this.dgvData.conMenu.ItemClicked += dgvData_DataGridViewConMenu_ItemClicked;
  393. //this.dgvData.conMenu.Show();
  394. if (!this.dgvData.conMenu.Visible)
  395. {
  396. this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
  397. }
  398. }
  399. }
  400. }
  401. /// <summary>
  402. /// 右键菜单选择项事件
  403. /// </summary>
  404. /// <param name="sender"></param>
  405. /// <param name="e"></param>
  406. void dgvData_DataGridViewConMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
  407. {
  408. ToolStripItem item = e.ClickedItem;
  409. if (item.Name.Trim() == "SetColumnShow")
  410. {
  411. if (LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ShowDataGridViewSetColumn(this.dgvData, StrEnabled: "摄影时间,摄影师,摄影助理,化妆师,化妆助理,引导师,引导助理"))
  412. { this.PublicFunctionRows(); }
  413. }
  414. }
  415. /// <summary>
  416. /// 点击列标头排序
  417. /// </summary>
  418. /// <param name="sender"></param>
  419. /// <param name="e"></param>
  420. void dgvData_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
  421. {
  422. if (e.Button == MouseButtons.Left)
  423. {
  424. string StrColumnName = this.dgvData.Columns[e.ColumnIndex].Name.Trim();
  425. if (StrColumnName == this.StrCurrentClickField || string.IsNullOrEmpty(this.StrCurrentClickField))
  426. {
  427. if (this.StrSortOrder == "ASC")
  428. { this.StrSortOrder = "DESC"; }
  429. else
  430. { this.StrSortOrder = "ASC"; }
  431. }
  432. else
  433. { this.StrSortOrder = "DESC"; }
  434. if (!StrColumnName.Equals("订单号"))//this.dgvData.StrValueNullColumn.Trim().IndexOf(StrColumnName) == -1)
  435. { this.StrSortField = StrColumnName + " " + this.StrSortOrder + ",Ord_CreateDateTime,Ordv_DigitalNumber"; }
  436. else
  437. { this.StrSortField = "Ord_CreateDateTime " + this.StrSortOrder + ",Ordv_DigitalNumber"; }
  438. this.StrCurrentClickField = StrColumnName;
  439. this.PublicFunctionRows();
  440. }
  441. }
  442. /// <summary>
  443. /// 当前点击的字段
  444. /// </summary>
  445. string StrCurrentClickField = "";
  446. /// <summary>
  447. /// 排序字段
  448. /// </summary>
  449. string StrSortField = "Ord_CreateDateTime ASC,Ordv_DigitalNumber";
  450. /// <summary>
  451. /// 排序顺序
  452. /// </summary>
  453. string StrSortOrder = "ASC";
  454. /// <summary>
  455. /// 创建行
  456. /// </summary>
  457. void PublicFunctionRows()
  458. {
  459. this.dgvData.dgvCurrentColumnOriginalSet = "PID,Ord_Number,Ordv_ViceNumber,订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,婚期,订单日期,拍摄名称,拍摄状态,摄影时间,摄影师,摄影助理,化妆师,化妆助理,引导师,引导助理,备注";
  460. string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0026.ToString().Trim();
  461. this.dgvData.dgvFixedHideColumn = "PID,Ord_Number,Ordv_ViceNumber";
  462. this.dgvData.dgvGuidName = StrGuidName;
  463. this.dgvData.dgvUserEmployeeID = this.StrUserID;
  464. this.dgvData.StrValueNullColumn = "订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,婚期,订单日期";
  465. Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns(this.StrUserID, StrGuidName, this.dgvData.dgvCurrentColumnOriginalSet);
  466. this.dgvData.dictShowColumName = dictColumns;
  467. string StrQueryCondition = this.GetWhereStr();
  468. int intTopCount = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
  469. Hashtable htData = LYFZ.ComponentLibrary.DataGridOrderView.GetData_CameraControlBookPhotographedNot(this.dgvData, dictColumns, StrQueryCondition, intTopCount, this.StrSortField);
  470. this.dataGridViewStatisticsCount1.CurrenQuantity = Convert.ToInt32(htData["CurrentCount"]);
  471. this.dataGridViewStatisticsCount1.TotalQuantity = Convert.ToInt32(htData["TotalCount"]);
  472. }
  473. /// <summary>
  474. /// 返回要操作的条件
  475. /// </summary>
  476. /// <returns></returns>
  477. string GetWhereStr()
  478. {
  479. string StrWhere = "";
  480. if (this.rdoShotNo.Checked)
  481. { StrWhere += " and Ordpg_PhotographyStatus = '0'"; }
  482. else if (this.rdoShotOK.Checked)
  483. { StrWhere += " and Ordpg_PhotographyStatus = '1'"; }
  484. else if (this.rdoShotIn.Checked)
  485. { StrWhere += " and Ordpg_PhotographyStatus = '2'"; }
  486. if (this.DictData.Count > 0)
  487. {
  488. if (this.DictData.ContainsKey("Sights") && this.DictData["Sights"].Length > 0)//景点
  489. { this.cmbtreevTextQuery.Text = DictData["Sights"].Trim(); }
  490. if (this.DictData.ContainsKey("OrderStartTime") && this.DictData["OrderStartTime"].Length > 0)//订单时间
  491. { StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("Ord_CreateDateTime", DictData["OrderStartTime"].Trim(), DictData["OrderEndTime"].Trim()); }
  492. if (this.DictData.ContainsKey("MarriageStartTime") && this.DictData["MarriageStartTime"].Length > 0)//婚期
  493. { StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("GregorianCalendar_DayForMarriage", DictData["MarriageStartTime"].Trim(), DictData["MarriageEndTime"].Trim()); }
  494. }
  495. if (this.cmbtreevTextQuery.Text.Trim() != "")
  496. { StrWhere += " and Ordpg_Sights = '" + this.cmbtreevTextQuery.Text.Trim() + "'"; }
  497. StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL(this.chkPortrait, this.chkWedding, this.chkKids);
  498. this.DictData.Clear();
  499. return StrWhere;
  500. }
  501. }
  502. }