FrmTwoSalesOrderConditionsSelect.cs 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. namespace LYFZ.Software.MainBusiness.FinancialManagement.TwoSalesOrder
  10. {
  11. public partial class FrmTwoSalesOrderConditionsSelect : LYFZ.Software.UI.FinancialManagement.TwoSalesOrder.FrmTwoSalesOrderConditionsSelect
  12. {
  13. public FrmTwoSalesOrderConditionsSelect()
  14. {
  15. this.Load += FrmTwoSalesOrderConditionsSelect_Load;
  16. this.chkTime.Click += chkTime_Click;
  17. this.btnOK.Click += btnOK_Click;
  18. this.btnCancel.Click += btnCancel_Click;
  19. }
  20. public bool IsSaveed = false;
  21. public Dictionary<string, string> DictDataArray = new Dictionary<string, string>();
  22. /// <summary>
  23. /// 窗体加载
  24. /// </summary>
  25. /// <param name="sender"></param>
  26. /// <param name="e"></param>
  27. void FrmTwoSalesOrderConditionsSelect_Load(object sender, EventArgs e)
  28. {
  29. if (!LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.OtherConsumerPassportManagement)
  30. {
  31. this.panelIDPhoto.Visible = false;
  32. this.Height -= this.panelIDPhoto.Height / 2;
  33. }
  34. this.txtTimeEnd.DateValue = SDateTime.Now.ToString("yyyy-MM-dd");
  35. this.txtTimeStart.DateValue = SDateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd");
  36. //获取项目名称
  37. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_SystemCategory("BEBACHBBCDBGJAJDF", this.cmbtreevItemName);
  38. // 获取二销类别
  39. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_SystemCategory("BEBACDAJDFDDEACGJ", this.cmbtreevConsumeType, StrWhere: "Sc_ClassCode!='BEBCADBFBCDFBGJHC' and Sc_ClassCode!='BEBCADBFBDDEGGABF' and Sc_ClassCode!='BEBCBFBICGDHCGBEJ'");
  40. // 部门人员绑定
  41. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_DepartmentAndEmployee(this.cmbtreevOpenPerson, IsFirstNodeNull: true, IsShowResign: false, IsShowAdmin: false);
  42. }
  43. /// <summary>
  44. /// 时间段点击
  45. /// </summary>
  46. /// <param name="sender"></param>
  47. /// <param name="e"></param>
  48. void chkTime_Click(object sender, EventArgs e)
  49. {
  50. this.txtTimeStart.Enabled = this.chkTime.Checked;
  51. this.txtTimeEnd.Enabled = this.chkTime.Checked;
  52. }
  53. /// <summary>
  54. /// 确定
  55. /// </summary>
  56. /// <param name="sender"></param>
  57. /// <param name="e"></param>
  58. void btnOK_Click(object sender, EventArgs e)
  59. {
  60. if (this.chkTime.Checked)
  61. {
  62. if (string.IsNullOrEmpty(this.txtTimeStart.DateValue.Trim()) && !string.IsNullOrEmpty(this.txtTimeEnd.DateValue.Trim()))
  63. { MessageBoxCustom.Show("开始日期不能为空!"); return; }
  64. if (!string.IsNullOrEmpty(this.txtTimeStart.DateValue.Trim()) && string.IsNullOrEmpty(this.txtTimeEnd.DateValue.Trim()))
  65. { MessageBoxCustom.Show("结束日期不能为空!"); return; }
  66. this.DictDataArray["strTimeStart"] = this.txtTimeStart.DateValue.Trim();
  67. this.DictDataArray["strTimeEnd"] = this.txtTimeEnd.DateValue.Trim();
  68. }
  69. if (!string.IsNullOrEmpty(this.cmbtreevItemName.Text.Trim()))
  70. { this.DictDataArray["strItemName"] = this.cmbtreevItemName.Text.Trim(); }
  71. if (!string.IsNullOrEmpty(this.cmbtreevOpenPerson.Text.Trim()))
  72. { this.DictDataArray["strOpenPerson"] = this.cmbtreevOpenPerson.Tag.ToString().Trim(); }
  73. if (!string.IsNullOrEmpty(this.cmbtreevConsumeType.Text.Trim()))
  74. { this.DictDataArray["strConsumeType"] = this.cmbtreevConsumeType.Tag.ToString().Trim(); }
  75. if (this.chkIDPhotoPickupNot.Checked)
  76. { this.DictDataArray["strPickup"] = "0"; }
  77. else if (this.chkIDPhotoPickupOK.Checked)
  78. { this.DictDataArray["strPickup"] = "1"; }
  79. if (this.chkchkIDPhotoImportNot.Checked)
  80. { this.DictDataArray["strImport"] = "0"; }
  81. else if (this.chkchkIDPhotoImportOK.Checked)
  82. { this.DictDataArray["strImport"] = "1"; }
  83. this.IsSaveed = true;
  84. this.Close();
  85. }
  86. /// <summary>
  87. /// 取消
  88. /// </summary>
  89. /// <param name="sender"></param>
  90. /// <param name="e"></param>
  91. void btnCancel_Click(object sender, EventArgs e)
  92. {
  93. this.Close();
  94. }
  95. }
  96. }