using System;
using System.Collections;
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.Customers.SetSmallForm
{
public partial class ConditionQueryIntentClientSamllForm : LYFZ.Software.UI.Customers.SetSmallForm.ConditionQueryIntentClientSamllForm
{
public ConditionQueryIntentClientSamllForm()
{
this.Load += ConditionQueryIntentClientSamllForm_Load;
this.Shown += ConditionQueryIntentClientSamllForm_Shown;
this.chkDateTime.Click += chkDateTime_Click;
this.btnSaveed.Click += btnSaveed_Click;
this.btnCancel.Click += btnCancel_Click;
}
///
/// 是否保存
///
public bool IsSaveed = false;
///
/// 选择的项目
///
public Hashtable htData = new Hashtable();
///
/// 窗体加载事件
///
///
///
void ConditionQueryIntentClientSamllForm_Load(object sender, EventArgs e)
{
this.dtpStart.Enabled = false;
this.dtpEnd.Enabled = false;
}
///
/// 窗体加载事件
///
///
///
void ConditionQueryIntentClientSamllForm_Shown(object sender, EventArgs e)
{
LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_DepartmentAndEmployee(this.cmbtreevPeopleFollow, IsFirstNodeNull: true);
LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_DepartmentAndEmployee(this.cmbtreevCreatePerson, IsFirstNodeNull: true);
LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboxTreeView(this.cmbtreevIntentSource, StrBindData: "非意向客户,录入意向客户,订单意向客户", IsFirstNodeNull: true);
LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboxTreeView(this.cmbtreevIntentType, StrBindData: "0:婚纱套系,1:儿童套系,2:写真套系,3:服务套系,4:婚庆套系", IsFirstNodeNull: true, IsSplit: true);
LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_SystemCategory("BEBABEAGFDDAHIHJD", this.cmbtreevIntentExtent, IsFirstNodeNull: true);
LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboBoxTreeView_ClientSourec("AAAAAAF", this.cmbtreevClientSource);//, strHideFiled: "BFACBABGBGBJGDHIE,BFAFBCBADBDCABFDD,AAAAABT");
}
///
/// 选择时间
///
///
///
void chkDateTime_Click(object sender, EventArgs e)
{
if (this.chkDateTime.Checked)
{
this.dtpStart.Enabled = true;
this.dtpEnd.Enabled = true;
}
else
{
this.dtpStart.Enabled = false;
this.dtpEnd.Enabled = false;
}
}
///
/// 保存
///
///
///
void btnSaveed_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.cmbtreevPeopleFollow.Text.ToString().Trim()) && this.cmbtreevPeopleFollow.Tag != null)
{ htData["PeopleFollow"] = this.cmbtreevPeopleFollow.Tag.ToString().Trim(); }
if (!string.IsNullOrEmpty(this.cmbtreevCreatePerson.Text.ToString().Trim()) && this.cmbtreevCreatePerson.Tag!=null)
{ htData["CreatePerson"] = this.cmbtreevCreatePerson.Tag.ToString().Trim(); }
if (!string.IsNullOrEmpty(this.cmbtreevIntentSource.Text.Trim()))
{ htData["IntentSource"] = this.cmbtreevIntentSource.Text.Trim(); }
if (!string.IsNullOrEmpty(this.cmbtreevIntentType.Text.Trim()))
{ htData["IntentType"] = this.cmbtreevIntentType.Text.Trim(); }
if (!string.IsNullOrEmpty(this.txtRegion.Text.Trim()))
{ htData["ClientRegion"] = this.txtRegion.Text.Trim(); }
if (!string.IsNullOrEmpty(this.cmbtreevIntentExtent.Text.Trim()))
{ htData["IntentExtent"] = this.cmbtreevIntentExtent.Text.Trim(); }
if (!string.IsNullOrEmpty(this.cmbtreevClientSource.Text.Trim()))
{ htData["ClientSource"] = this.cmbtreevClientSource.Text.Trim(); }
if(this.chkDateTime.Checked)
{
if (string.IsNullOrEmpty(this.dtpStart.DateValue.Trim()))
{ MessageBoxCustom.Show("开始时间不能为空"); return; }
if (string.IsNullOrEmpty(this.dtpEnd.DateValue.Trim()))
{ MessageBoxCustom.Show("结束时间不能为空"); return; }
if (!string.IsNullOrEmpty(this.dtpStart.DateValue.Trim()))
{ htData["DateTimeStart"] = this.dtpStart.DateValue.Trim(); }
if (!string.IsNullOrEmpty(this.dtpEnd.Text.Trim()))
{ htData["DateTimeEnd"] = this.dtpEnd.Text.Trim(); }
}
this.IsSaveed = true;
this.Close();
}
///
/// 取消
///
///
///
void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
}
}