123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688 |
- 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;
- using System.Globalization;
- using LYFZ.ComponentLibrary;
- using System.Web.UI.WebControls;
- using LYFZ.DAL;
- using LYFZ.Software.MainBusiness.Customers.OldCustomer;
- using System.Collections;
- namespace LYFZ.Software.MainBusiness.Customers
- {
- public partial class Interestedbuyers : LYFZ.Software.UI.Customers.Interestedbuyers
- {
- LYFZ.BLL.BLL_ErpOrder orbll = new BLL.BLL_ErpOrder();
- public Interestedbuyers()
- {
- this.Shown += FrmOldCustomer_Shown;
- this.btnAdd.Click += btnAdd_Click;
- this.btnUpdate.Click += btnUpdate_Click;
- this.btnSlect.Click += btnSlect_Click;
- this.btnDelete.Click += btnDelete_Click;
- this.btnExport.Click += btnExport_Click;
- this.btnClose.Click += btnClose_Click;
- this.btnTexting.Click += btnTexting_Click;
- this.chkHs.Click += chkHs_Click;
- this.chkEt.Click += chkEt_Click;
- this.chkXz.Click += chkXz_Click;
- this.chkFw.Click += chkFw_Click;
- this.btnConditionQuery.Click += btnConditionQuery_Click;
- this.btnExcel.Click += btnExcel_Click;
- this.btnClientServiceAnPai.Click += btnClientServiceAnPai_Click;
- this.tabControlEx1.SelectedIndexChanged += tabControlEx1_SelectedIndexChanged;
- this.dgvData.CellDoubleClick += dgv_CellDoubleClick;
- this.cmbtreevClientStatusType.ComboBoxTree_NodeMouseClick += cmbtreevClientStatusType_ComboBoxTree_NodeMouseClick;
- this.Resize += Interestedbuyers_Resize;
- this.btnCommicRecord.Click += BtnCommicRecord_Click;
- this.chkWDKH.Click += ChkWDKH_Click;
- orbll.UpdateNullDataToLunar();
- }
- private void ChkWDKH_Click(object sender, EventArgs e)
- {
- PublicFunctionRows();
- }
- private void BtnCommicRecord_Click(object sender, EventArgs e)
- {
- if(dgvData.SelectedRows.Count>0)
- {
- if (dgvData.SelectedRows.Count == 0)
- {
- MessageBoxCustom.Show("请选择你要编辑的数据!");
- return;
- }
- LYFZ.Software.MainBusiness.Customers.OldCustomer.FrmAddInterestedBuyers frm = new FrmAddInterestedBuyers();
- frm.GMID = dgvData.CurrentRow.Cells["客户组编号"].Value.ToString().Trim();
- frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- frm.EditOnlyRead();
- if (frm.ShowDialog() == DialogResult.OK)
- {
- PublicFunctionRows();
- }
- }
- }
- /// <summary>
- /// 选择的项目
- /// </summary>
- public Hashtable htData = new Hashtable();
- List<LYFZ.Software.MainBusiness.EnumPermissions.BusinessType> Versions = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessTypeList();
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void FrmOldCustomer_Shown( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindGroupStoreName(this.cmbtreevStoreName, StrKeyCode: "qt002");
- this.chkEt.Visible = false;
- this.chkXz.Visible = false;
- this.chkHs.Visible = false;
- for ( int i = 0; i < Versions.Count; i++ )
- {
- LYFZ.Software.MainBusiness.EnumPermissions.BusinessType Version = Versions[i];
- if ( Version.ToString() == EnumPermissions.BusinessType.写真版.ToString() )
- {
- this.chkXz.Visible = true;
- }
- if ( Version.ToString() == EnumPermissions.BusinessType.婚纱版.ToString() )
- {
- this.chkHs.Visible = true;
- }
- if ( Version.ToString() == EnumPermissions.BusinessType.儿童版.ToString() )
- {
- this.chkEt.Visible = true;
- }
- }
- this.PublicFunctionRows();
- this.btnAdd.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.IntentionCustomerCompetence, CustomAttributes.OperatingAuthority.Add );
- this.btnUpdate.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.IntentionCustomerCompetence, CustomAttributes.OperatingAuthority.Update );
- this.btnDelete.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.IntentionCustomerCompetence, CustomAttributes.OperatingAuthority.Delete );
- this.btnExport.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.IntentionCustomerCompetence, CustomAttributes.OperatingAuthority.DataExport );
- this.btnTexting.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.IntentionCustomerCompetence, CustomAttributes.OperatingAuthority.SMSSend );
- this.btnExcel.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.IntentionCustomerCompetence, LYFZ.CustomAttributes.OperatingAuthority.DataImport );
- this.btnCommicRecord.Enabled = LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.IntentionCustomerCompetence, LYFZ.CustomAttributes.OperatingAuthority.AddCommunicateRecord);
- this.lblText();
- this.GetOutflowType();
- bool b = LYFZ.Software.MainBusiness.VersionControl.StaticVersion.UIFunctionVersion( VersionControl.VersionFunctionEnum.客户管理意向客户 );
- if ( !b )
- {
- this.Close();
- }
- }
- string statisMsg = "";
- /// <summary>
- /// 设置 统计处的值
- /// </summary>
- void lblText()
- {
- try
- {
- DataTable dt = orbll.GetView_Custom( "select 客户组类型,客户状态 from view_InterestedBuyers" ).Tables[0];
- DataRow[] Genjin = dt.Select( "客户组类型 = 2 And 客户状态 = '意向'" );
- DataRow[] Chengjiao = dt.Select( "客户组类型 <> 2" );// ("客户状态 = '追回' or 客户状态 = '正常'");
- DataRow[] dtRow = dt.Select( "客户组类型 = 2 And 客户状态 = '流失'" );// ("客户状态 = '流失'");
- double percent = 0;
- if ( dt.Rows.Count != 0 )
- {
- percent = Convert.ToDouble( Chengjiao.Length ) / Convert.ToDouble( dt.Rows.Count );
- }
- statisMsg = "意向客户总人数:" + (Genjin.Length + Chengjiao.Length + dtRow.Length) + "人 跟进中意向客户人数:" + Genjin.Length + "人 意向客户成交人数:" + Chengjiao.Length + "人 流失:" + dtRow.Length + " 成交率:" + percent.ToString( "0%" );
- this.txtStatistics.Text = statisMsg + " (其中当前" + tabControlEx1.SelectedTab.Text + "人数:" + dgvData.Rows.Count+"人) ";
- }
- catch
- {
- }
- }
- /// <summary>
- /// 查询
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnSlect_Click( object sender, EventArgs e )
- {
- PublicFunctionRows();
- }
- /// <summary>
- /// 条件查询
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnConditionQuery_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.Customers.SetSmallForm.ConditionQueryIntentClientSamllForm frm = new SetSmallForm.ConditionQueryIntentClientSamllForm();
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- this.htData = frm.htData;
- this.PublicFunctionRows();
- }
- }
- /// <summary>
- /// 增加
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnAdd_Click( object sender, EventArgs e )
- {
- FrmAddInterestedBuyers frm = new FrmAddInterestedBuyers();
- if ( frm.ShowDialog() == DialogResult.OK )
- {
- PublicFunctionRows();
- lblText();
- }
- }
- /// <summary>
- /// 修改
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgv_CellDoubleClick( object sender, DataGridViewCellEventArgs e )
- {
- if ( e.RowIndex >= 0 && e.ColumnIndex >= 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.IntentionCustomerCompetence, CustomAttributes.OperatingAuthority.Update ) )
- {
- return;
- }
- this.btnUpdate_Click( this, null );
- }
- }
- }
- /// <summary>
- /// 修改按钮
- /// </summary>
- void btnUpdate_Click( object sender, EventArgs e )
- {
- if ( dgvData.SelectedRows.Count == 0 )
- {
- MessageBoxCustom.Show( "请选择你要编辑的数据!" );
- return;
- }
- LYFZ.Software.MainBusiness.Customers.OldCustomer.FrmAddInterestedBuyers frm = new FrmAddInterestedBuyers();
- frm.GMID = dgvData.CurrentRow.Cells["客户组编号"].Value.ToString().Trim();
- frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm.Location = new Point( LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y );
- frm.Size = new Size( LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height );
- if ( frm.ShowDialog() == DialogResult.OK )
- {
- PublicFunctionRows();
- }
- //LYFZ.Software.MainBusiness.Customers.OldCustomer.FrmAddInterestedBuyers frm = new FrmAddInterestedBuyers();
- //frm.GMID = dgv.CurrentRow.Cells["客户组编号"].Value.ToString().Trim();
- //if (frm.ShowDialog() == DialogResult.OK)
- //{ Bind(); }
- }
- /// <summary>
- /// 删除
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnDelete_Click( object sender, EventArgs e )
- {
- try
- {
- if ( this.dgvData.SelectedRows.Count == 0 )
- {
- MessageBoxCustom.Show( "请选中你要删除的数据!" );
- return;
- }
- //批量删除 速度过慢
- if ( MessageBoxCustom.Show( "你确定要删除吗?", "删除提示", MessageBoxButtons.YesNo ) == DialogResult.Yes )
- {
- //批量删除 速度过慢
- List<Helper.CommandInfo> ctlist = new List<Helper.CommandInfo>();
- LYFZ.BLL.BLL_ErpCustomerGroup GPbll = new BLL.BLL_ErpCustomerGroup();
- LYFZ.BLL.BLL_ErpCustomerGroupMembers GMbll = new BLL.BLL_ErpCustomerGroupMembers();
- LYFZ.BLL.BLL_OldOrderHistory oohbll = new BLL.BLL_OldOrderHistory();
- List<string> datelist = new List<string>();
- List<string> namelist = new List<string>();
- foreach ( DataGridViewRow item in dgvData.SelectedRows )
- {
- ctlist.Add( GMbll.GetDeleteCommandInfo( whereStr: "GM_CustomerGroupID='" + item.Cells["客户组编号"].Value.ToString() + "' " ) );
- ctlist.Add( GPbll.GetDeleteCommandInfo( whereStr: "GP_CustomerGroupID='" + item.Cells["客户组编号"].Value.ToString() + "'" ) );
- ctlist.Add( oohbll.GetDeleteCommandInfo( whereStr: "History_ID='" + item.Cells["客户组编号"].Value.ToString() + "'" ) );
- datelist.Add( item.Cells["客户组编号"].Value.ToString() );
- namelist.Add( item.Cells["客户姓名"].Value.ToString() );
- }
- int DeleteCount = 0;
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- DeleteCount = LYFZ.BLL.BaseBllOperate.ExecuteSqlTran( ctlist );
- if ( DeleteCount > 0 )
- {
- foreach ( string item in namelist )
- {
- //日志
- LYFZ.BLL.BLL_ErpSystemLogs.WriteSystemLog( LYFZ.EnumPublic.SystemLogsType.删除客户资料, "删除联系人资料:" + item + ",时间:" + SDateTime.Now, LYFZ.BLL.BLL_ErpUser.UsersModel.User_EmployeeID, LYFZ.BLL.BLL_ErpUser.UsersModel.User_Name );
- }
- foreach ( string item in datelist )
- {
- DAL_ErpCustomer.UpdateAggregationCustomer( item );
- }
- }
- } );
- if ( DeleteCount > 0 )
- {
- PublicFunctionRows();
- MessageBoxCustom.Show( "删除成功!" );
- }
- else
- {
- MessageBoxCustom.Show( "删除失败!" );
- }
- }
- }
- catch ( Exception ex )
- {
- MessageBoxCustom.Show( ex.Message );
- }
- }
- /// <summary>
- /// 安排客服
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnClientServiceAnPai_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ClientServiceTaskAnPaiSmallForm frm = new DoorCityProcess.SetSmallForm.ClientServiceTaskAnPaiSmallForm();
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ClientServiceAnPai( this.dgvData, LYFZ.EnumPublic.ClientServiceTaskType.意向跟踪, frm.model, LYFZ.EnumPublic.ClientServiceTaskItem.意向客户 );
- }
- }
- }
- /// <summary>
- /// 关闭
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnClose_Click( object sender, EventArgs e )
- {
- this.Close();
- }
- /// <summary>
- /// 导出
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnExport_Click( object sender, EventArgs e )
- {
- this.dgvData.ExportDataTable();
- }
- /// <summary>
- /// 发短信
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnTexting_Click( object sender, EventArgs e )
- {
- string Cus_Telephone = "";
- string Sj1 = "";
- LYFZ.Software.MainBusiness.SMSManagement.SmsSend.FrmSendSms set = new SMSManagement.SmsSend.FrmSendSms();
- if ( dgvData.SelectedRows.Count == 0 )
- {
- MessageBoxCustom.Show( "选择你要发送短信的客户!" );
- return;
- }
- for ( int i = 0; i < dgvData.SelectedRows.Count; i++ )
- {
- Cus_Telephone = dgvData.SelectedRows[i].Cells["电话"].Value.ToString();
- //检查手机合法性
- string okPhones = "";
- LYFZ.WinAPI.CustomPublicMethod.ValidationPhones( Cus_Telephone.Replace( '/', ',' ), ref okPhones );
- if ( !string.IsNullOrEmpty( okPhones ) )
- {
- Sj1 += okPhones + ",";
- }
- }
- set.Phone = Sj1.Trim( ',' );
- set.ShowDialog();
- }
- /// <summary>
- /// 选项卡选择事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void tabControlEx1_SelectedIndexChanged( object sender, EventArgs e )
- {
- if ( this.tabControlEx1.SelectedIndex == 1 )
- {
- this.btnClientServiceAnPai.Enabled = false;
- this.btnDelete.Enabled = false;
- this.lblClientStatusType.Visible = false;
- this.cmbtreevClientStatusType.Visible = false;
- }
- else if ( this.tabControlEx1.SelectedIndex == 2 )
- {
- this.btnClientServiceAnPai.Enabled = false;
- this.btnDelete.Enabled = false;
- this.lblClientStatusType.Visible = true;
- this.cmbtreevClientStatusType.Visible = true;
- }
- else
- {
- this.btnClientServiceAnPai.Enabled = true;
- this.btnDelete.Enabled = true;
- this.lblClientStatusType.Visible = false;
- this.cmbtreevClientStatusType.Visible = false;
- }
- this.PublicFunctionRows();
- }
- /// <summary>
- /// 把dgv放入所有选项卡
- /// </summary>
- /// <param name="pge">选项卡</param>
- void ShowDgvBulletinBoard( TabPage pge )
- {
- pge.Margin = new System.Windows.Forms.Padding( 0 );
- pge.Padding = new Padding( 0 );
- this.dgvData.Margin = new System.Windows.Forms.Padding( 0 );
- this.dgvData.Dock = DockStyle.Fill;
- this.dgvData.Location = new Point( 0, 0 );
- pge.Controls.Clear();
- pge.Controls.Add( this.dgvData );
- }
- /// <summary>
- /// 刷新dgv
- /// </summary>
- void PublicFunctionRows()
- {
- if ( dgvData.Rows.Count > 0 )
- {
- dgvData.Rows.Clear();
- }
- StringBuilder str = new StringBuilder();
- string keyword = this.txtkeyword.Text.Trim();
- #region 条件查询
- string StrShowColumnName = "";
- switch ( tabControlEx1.SelectedIndex )
- {
- case 0:
- StrShowColumnName = "客户组编号,客户编号,客户姓名,性别,生日,电话,区域,意向程度,意向类型,意向来源,客户来源,跟进人,录入时间,录入者";
- str.Append( " 客户组类型 = 2 And 客户状态 = '意向'" );
- if ( keyword.Trim() != "" )
- {
- str.Append( " and (客户姓名 like '%" + keyword.Trim() + "%' or 电话 like '%" + keyword.Trim() + "%' or 区域='" + keyword.Trim() + "')" );
- }
- if ( !LYFZ.BLL.BLL_ErpUser.GetRights( LYFZ.BLL.BLL_ErpUser.CurrentUserRights.IntentionCustomerCompetence, CustomAttributes.OperatingAuthority.Client_ShowAllIntentClient ) )
- {
- str.Append( " and Cus_CreateName = '" + LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID + "'" );
- }
- break;
- case 1:
- StrShowColumnName = "客户组编号,客户编号,订单号,客户姓名,性别,生日,电话,区域,意向程度,意向来源,客户来源,录入时间";
- str.Append( " 客户组类型 != 2 " );
- if ( keyword.Trim() != "" )
- {
- str.Append( " and (客户姓名 like '%" + keyword.Trim() + "%' or 电话 like '%" + keyword.Trim() + "%')" );
- }
- break;
- case 2:
- StrShowColumnName = "客户组编号,客户编号,客户姓名,性别,生日,电话,客户状态,流失类型,流失原因,区域,意向程度,意向类型,意向来源,客户来源,跟进人,录入时间";
- str.Append( " 客户组类型 = 2 And 客户状态 = '流失'" );
- if ( keyword.Trim() != "" )
- {
- str.Append( " and (客户姓名 like '%" + keyword.Trim() + "%' or 电话 like '%" + keyword.Trim() + "%')" );
- }
- if ( !string.IsNullOrEmpty( this.cmbtreevClientStatusType.Text.Trim() ) )
- {
- str.Append( " and 流失类型='" + this.cmbtreevClientStatusType.Text.Trim() + "' " );
- }
- break;
- }
- if ( chkEt.Checked )
- {
- str.Append( " and 意向类型='儿童意向'" );
- }
- else if ( chkFw.Checked )
- {
- str.Append( " and 意向类型='服务意向'" );
- }
- else if ( chkHs.Checked )
- {
- str.Append( " and 意向类型='婚纱意向'" );
- }
- else if ( chkXz.Checked )
- {
- str.Append( " and 意向类型='写真意向'" );
- }
- if(chkWDKH.Checked)
- {
- str.Append(" and User_Account='" + BLL.BLL_ErpUser.UsersModel.User_Account + "'");
- }
- if ( this.htData.Count > 0 )
- {
- if ( this.htData.ContainsKey( "PeopleFollow" ) )
- {
- str.Append( " and GP_BelongsPersonID = '" + this.htData["PeopleFollow"].ToString().Trim() + "'" );
- }
- if ( this.htData.ContainsKey( "CreatePerson" ) )
- {
- str.Append( " and Cus_CreateName = '" + this.htData["CreatePerson"].ToString().Trim() + "'" );
- }
- if ( this.htData.ContainsKey( "IntentSource" ) )
- {
- str.Append( " and 意向来源 = '" + this.htData["IntentSource"].ToString().Trim() + "'" );
- }
- if ( this.htData.ContainsKey( "IntentType" ) )
- {
- str.Append( " and 意向类型 = '" + this.htData["IntentType"].ToString().Trim() + "'" );
- }
- if ( this.htData.ContainsKey( "ClientRegion" ) )
- {
- str.Append( " and 区域 = '" + this.htData["ClientRegion"].ToString().Trim() + "'" );
- }
- if ( this.htData.ContainsKey( "IntentExtent" ) )
- {
- str.Append( " and 意向程度 = '" + this.htData["IntentExtent"].ToString().Trim() + "'" );
- }
- if ( this.htData.ContainsKey( "ClientSource" ) )
- {
- str.Append( " and 客户来源 = '" + this.htData["ClientSource"].ToString().Trim() + "'" );
- }
- if ( this.htData.ContainsKey( "DateTimeStart" ) && this.htData.ContainsKey( "DateTimeEnd" ) )
- {
- str.Append( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime( "录入时间", this.htData["DateTimeStart"].ToString().Trim(), this.htData["DateTimeEnd"].ToString().Trim() ) );
- }
- }
- //Ord_DividedShop
- if (!string.IsNullOrEmpty(Convert.ToString(cmbtreevStoreName.Tag)))
- {
- str.Append(" and GP_DividedShop = '" + cmbtreevStoreName.Tag + "'" );
- }
- //else
- //{
- // str.Append(" and ");
- // string treeWhere = "";
- // foreach (System.Windows.Forms.TreeNode treeNode in cmbtreevStoreName.TreeView.Nodes)
- // {
- // if (!string.IsNullOrEmpty(Convert.ToString((treeNode).Tag)))
- // {
- // if (treeWhere != "")
- // {
- // treeWhere += " or ";
- // }
- // treeWhere += " Ord_DividedShop = '" + (treeNode).Tag + "' ";
- // }
- // }
- // str.Append("(" + treeWhere + ")");
- //}
- this.htData.Clear();
- #endregion
- DataTable dt = new DataTable();
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- dt = LYFZ.BLL.BLL_ErpOrderView.GetData_ClientManagementClientIntent( StrShowColumnName, str.ToString() );
- } );
- this.dgvData.DataSource( dt, strHideField: "客户组编号,客户编号" );
- this.txtStatistics.Text = statisMsg + " (其中当前" +tabControlEx1.SelectedTab.Text+"人数:"+ dt.Rows.Count +"人)";
- }
- /// <summary>
- /// 打开Excel 按钮
- /// </summary>
- void btnExcel_Click( object sender, EventArgs e )
- {
- ImportExcel excel = new ImportExcel();
- excel.Type = 2;
- if ( excel.ShowDialog() == DialogResult.OK )
- {
- PublicFunctionRows();
- }
- }
- /// <summary>
- /// 写真
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkXz_Click( object sender, EventArgs e )
- {
- chkHs.Checked = false;
- chkEt.Checked = false;
- chkFw.Checked = false;
- PublicFunctionRows();
- }
- /// <summary>
- /// 儿童
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkEt_Click( object sender, EventArgs e )
- {
- chkHs.Checked = false;
- chkFw.Checked = false;
- chkXz.Checked = false;
- PublicFunctionRows();
- }
- /// <summary>
- /// 婚纱
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkHs_Click( object sender, EventArgs e )
- {
- chkEt.Checked = false;
- chkFw.Checked = false;
- chkXz.Checked = false;
- PublicFunctionRows();
- }
- /// <summary>
- /// 服务
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkFw_Click( object sender, EventArgs e )
- {
- chkHs.Checked = false;
- chkEt.Checked = false;
- chkXz.Checked = false;
- PublicFunctionRows();
- }
- /// <summary>
- /// 获取流失类型
- /// </summary>
- void GetOutflowType()
- {
- DataTable dt = orbll.GetView_Custom( "tb_ErpCustomerGroup", StrWhere: "GP_LossType != ''", ShowColumnName: "GP_LossType", GroupBy: "GP_LossType" ).Tables[0];
- string StrText = "";
- for ( int i = 0; i < dt.Rows.Count; i++ )
- {
- StrText += dt.Rows[i]["GP_LossType"].ToString().Trim() + ",";
- }
- if ( StrText != "," )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindComboxTreeView( this.cmbtreevClientStatusType, StrText.TrimEnd( ',' ), IsFirstNodeNull: true );
- }
- }
- /// <summary>
- /// 选择流失类型
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void cmbtreevClientStatusType_ComboBoxTree_NodeMouseClick( object sender, TreeNodeMouseClickEventArgs e )
- {
- this.PublicFunctionRows();
- }
- /// <summary>
- /// 窗体大小发生变化
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void Interestedbuyers_Resize( object sender, EventArgs e )
- {
- switch ( this.panelFw.Location.Y )
- {
- case 2: this.flowLayoutPanel2.Height = 36; break;
- case 36: this.flowLayoutPanel2.Height = 68; break;
- }
- }
- private void InitializeComponent()
- {
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Interestedbuyers));
- this.plFormMainContent.SuspendLayout();
- this.SuspendLayout();
- //
- // tabControlEx1
- //
- this.tabControlEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(209)))), ((int)(((byte)(205)))), ((int)(((byte)(209)))));
- //
- // txtStatistics
- //
- this.txtStatistics.Lines = new string[0];
- //
- // txtkeyword
- //
- this.txtkeyword.Lines = new string[0];
- //
- // btnAppFormExit
- //
- this.btnAppFormExit.BackImg = null;
- //
- // btnAppFormMinimize
- //
- this.btnAppFormMinimize.BackImg = null;
- //
- // Interestedbuyers
- //
- this.BottomBgImage = ((System.Drawing.Bitmap)(resources.GetObject("$this.BottomBgImage")));
- this.ClientSize = new System.Drawing.Size(1757, 658);
- this.CustomBorderStyles.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(109)))), ((int)(((byte)(139)))));
- this.Name = "Interestedbuyers";
- this.TitleBgImage = ((System.Drawing.Bitmap)(resources.GetObject("$this.TitleBgImage")));
- this.Controls.SetChildIndex(this.btnAppFormMaximize, 0);
- this.Controls.SetChildIndex(this.btnAppFormExit, 0);
- this.Controls.SetChildIndex(this.btnAppFormMinimize, 0);
- this.Controls.SetChildIndex(this.btnAppFormMenu, 0);
- this.Controls.SetChildIndex(this.btnAppFormSkin, 0);
- this.Controls.SetChildIndex(this.plFormMainContent, 0);
- this.plFormMainContent.ResumeLayout(false);
- this.ResumeLayout(false);
- }
- }
- }
|