using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm { public partial class ConditionQuerySuperSmallForm : LYFZ.Software.UI.CameraControlBook.SuperSmallForm.ConditionQuerySuperSmallForm { public ConditionQuerySuperSmallForm() { } public Dictionary<string, string> DictDataArray = new Dictionary<string, string>(); /// <summary> /// 窗体加载事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void ConditionQuerySuperSmallForm_Load(object sender, EventArgs e) { DataTable tbl = new LYFZ.BLL.BLL_ErpTheScenery().GetAllList().Tables[0]; this.cmbOrdPgSights.Items.Add(""); for (int i = 0; i < tbl.Rows.Count; i++) { this.cmbOrdPgSights.Items.Add(tbl.Rows[i]["Tsc_Name"].ToString().Trim()); } } /// <summary> /// 订单时间 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void chkData1_Click(object sender, EventArgs e) { if (this.chkData1.Checked) { this.dtpDate1_1.Enabled = true; this.dtpDate1_2.Enabled = true; } else { this.dtpDate1_1.Enabled = false; this.dtpDate1_2.Enabled = false; } } /// <summary> /// 取件时间 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void chkData2_Click(object sender, EventArgs e) { if (this.chkData2.Checked) { this.dtpDate2_1.Enabled = true; this.dtpDate2_2.Enabled = true; } else { this.dtpDate2_1.Enabled = false; this.dtpDate2_2.Enabled = false; } } /// <summary> /// 婚期 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void chkData3_Click(object sender, EventArgs e) { if (this.chkData3.Checked) { this.dtpDate3_1.Enabled = true; this.dtpDate3_2.Enabled = true; } else { this.dtpDate3_1.Enabled = false; this.dtpDate3_2.Enabled = false; } } /// <summary> /// 确定 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void btnOK_Click(object sender, EventArgs e) { if (this.cmbOrdPgSights.Text.Trim() != "" || this.chkData1.Checked || this.chkData2.Checked || this.chkData3.Checked) { if (this.cmbOrdPgSights.Text.Trim() != "")//景点 { DictDataArray["Sights"] = this.cmbOrdPgSights.Text.Trim(); } if (this.chkData1.Checked)//订单时间 { DictDataArray["OrderStartTime"] = dtpDate1_1.Value.ToString().Trim(); DictDataArray["OrderEndTime"] = dtpDate1_2.Value.ToString().Trim(); } if (this.chkData2.Checked)//取件时间 { DictDataArray["TakePiecesStartTime"] = dtpDate2_1.Value.ToString().Trim(); DictDataArray["TakePiecesEndTime"] = dtpDate2_2.Value.ToString().Trim(); } if (this.chkData3.Checked)//婚期 { DictDataArray["MarriageStartTime"] = dtpDate3_1.Value.ToString().Trim(); DictDataArray["MarriageEndTime"] = dtpDate3_2.Value.ToString().Trim(); } this.Close(); } } /// <summary> /// 取消 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected override void btnCancel_Click(object sender, EventArgs e) { this.Close(); } } }