123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677 |
- 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.Collections;
- using LYFZ.ComponentLibrary;
- namespace LYFZ.Software.MainBusiness.DoorCityProcess
- {
- public partial class KepanFormMain : LYFZ.Software.UI.DoorCityProcess.KepanFormMain
- {
- LYFZ.BLL.BLL_ErpOrder obll = new BLL.BLL_ErpOrder();
- LYFZ.BLL.BLL_ErpKepanLogo kbll = new BLL.BLL_ErpKepanLogo();
- public KepanFormMain()
- {
- this.Shown += KepanFormMain_Shown;
- this.Load += KepanFormMain_Load;
- this.cmbtreevStoreName.ComboBoxTree_NodeMouseClick += cmbtreevStoreName_ComboBoxTree_NodeMouseClick;
- this.cmbQueryText.KeyDown += cmbQueryText_KeyDown;
- this.btnQuery.Click += btnQuery_Click;
- this.btnFilmSelectionOK.Click += btnFilmSelectionOK_Click;
- this.btnCDBurning.Click += btnCDBurning_Click;
- this.btnBurnerRecord.Click += btnBurnerRecord_Click;
- this.btnClose.Click += btnClose_Click;
- this.chkDressVersion.Click += chkDressVersion_Click;
- this.chkKidsVersion.Click += chkKidsVersion_Click;
- this.chkPortraitVersion.Click += chkPortraitVersion_Click;
- this.chkArrears.Click += chkArrears_Click;
- this.Resize += KepanFormMain_Resize;
- this.dgvData.ColumnHeaderMouseClick += dgvData_ColumnHeaderMouseClick;
- this.dgvData.CellMouseDown += dgvData_CellMouseDown;
- this.dgvData.CellClick += dgvData_CellClick;
- this.dgvData.CellMouseDoubleClick += dgvData_CellMouseDoubleClick;
- this.dgvData.MouseDoubleClick += dgvData_MouseDoubleClick;
- this.flowLayoutPanel1.Height = 34;
- this.ucPagerEx1.EventPaging += ucPagerEx1_EventPaging;
- this.chkCompleteOrder.Click += ChkCompleteOrder_Click;
- }
- private void ChkCompleteOrder_Click( object sender, EventArgs e )
- {
- this.ucPagerEx1.PageCurrent = 1;
- this.ucPagerEx1.Bind();
- }
- int ucPagerEx1_EventPaging( UCPager.EventPagingArg e )
- {
- //pageData.PageSize = LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.ReportFormPageSize;
- this.ucPagerEx1.PageSize = LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.ReportFormPageSize;
- PublicFunctionRows();
- return ucPagerEx1.NMax;
- }
- public void BindPageData( int pageIndx, int pageSize, int totalCount )
- {
- ucPagerEx1.NMax = totalCount;
- ucPagerEx1.CurrentPageCount = (pageSize);
- ucPagerEx1.PageCurrent = pageIndx;
- }
- /// <summary>
- /// 是否首次运行
- /// </summary>
- bool IsFirstRun = true;
- /// <summary>
- /// 查询条件
- /// </summary>
- private Dictionary<string, string> DictData = new Dictionary<string, string>();
- /// <summary>
- /// 员工编号
- /// </summary>
- string StrUserID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void KepanFormMain_Shown( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindGroupStoreName( this.cmbtreevStoreName, StrGroupKeyCode: "retailProcess", StrKeyCode: "st011" );
- //this.PublicFunctionRows();
- this.ucPagerEx1.Bind();
- this.IsFirstRun = false;
- this.KepanFormMain_Resize( this, null );
- }
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void KepanFormMain_Load( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetSystemVersion( this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion );
- this.panelDressVersion.Visible = this.chkDressVersion.Visible;
- this.panelKidsVersion.Visible = this.chkKidsVersion.Visible;
- this.panelPortraitVersion.Visible = this.chkPortraitVersion.Visible;
- }
- /// <summary>
- /// 选择分店获取权限
- /// </summary>
- void PublicFunctionRights()
- {
- }
- /// <summary>
- /// 分店选择查询数据
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void cmbtreevStoreName_ComboBoxTree_NodeMouseClick( object sender, TreeNodeMouseClickEventArgs e )
- {
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- this.ucPagerEx1.Bind();
- }
- /// <summary>
- /// 回车
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void cmbQueryText_KeyDown( object sender, KeyEventArgs e )
- {
- if ( e.KeyCode == Keys.Enter )
- {
- this.btnQuery_Click( this, null );
- }
- }
- /// <summary>
- /// 查询
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnQuery_Click( object sender, EventArgs e )
- {
- this.DictData.Clear();
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- this.ucPagerEx1.Bind();
- }
- /// <summary>
- /// 选片OK
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnFilmSelectionOK_Click( object sender, EventArgs e )
- {
- this.DictData.Clear();
- this.cmbQueryText.Text = "";
- this.DictData["FilmSelectionStatus"] = "OK";
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- this.ucPagerEx1.Bind();
- }
- /// <summary>
- /// 光盘刻录
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnCDBurning_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- string StrViceNumber = dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( StrViceNumber ) )
- {
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.EngravedCDSmallForm frm = new SetSmallForm.EngravedCDSmallForm();
- frm.MainOrderNumber = dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
- frm.ViceOrderNumber = StrViceNumber;
- if ( this.dgvData.CurrentRow.Cells["Ord_Type"].Value.ToString().Trim() == Convert.ToInt32( LYFZ.EnumPublic.OrderType.儿童订单 ).ToString().Trim() )
- {
- frm.StrSightsName = this.dgvData.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim();
- }
- else
- {
- frm.StrSightsName = "";
- }
- #region 免刻录字段;
- if ( this.dgvData.CurrentRow.Cells["Ord_Type"].Value.ToString().Trim() == Convert.ToInt32( LYFZ.EnumPublic.OrderType.儿童订单 ).ToString().Trim() )
- {
- object obj;
- int nIndex = this.dgvData.CurrentRow.Index;
- do
- {
- obj = this.dgvData.Rows[nIndex].Cells["订单类型"].Value;
- if ( obj == null )
- --nIndex;
- } while ( obj == null );
- frm.OrderType = this.dgvData.Rows[nIndex].Cells["订单类型"].Value.ToString().Trim();
- frm.CusNames = this.dgvData.Rows[nIndex].Cells["客户姓名"].Value.ToString().Trim();
- frm.CusGenders = this.dgvData.Rows[nIndex].Cells["客户性别"].Value.ToString().Trim();
- frm.CusPhones = this.dgvData.Rows[nIndex].Cells["客户电话"].Value.ToString().Trim();
- }
- else
- {
- frm.OrderType = this.dgvData.CurrentRow.Cells["订单类型"].Value.ToString().Trim();
- frm.CusNames = this.dgvData.CurrentRow.Cells["客户姓名"].Value.ToString().Trim();
- frm.CusGenders = this.dgvData.CurrentRow.Cells["客户性别"].Value.ToString().Trim();
- frm.CusPhones = this.dgvData.CurrentRow.Cells["客户电话"].Value.ToString().Trim();
- }
- if ( this.dgvData.Columns["百度云信息"] != null )
- frm.strBaiduInfo = this.dgvData.CurrentRow.Cells["百度云信息"].Value.ToString().Trim();
- #endregion
- frm.ShowDialog();
- // 更新变更的记录;??没有效果,赋值无效;
- if ( this.dgvData.Columns["百度云信息"] != null )
- this.dgvData.CurrentRow.Cells["百度云信息"].Value = frm.strBaiduInfo;
- if ( this.dgvData.Columns["客片上传状态"] != null )
- this.dgvData.CurrentRow.Cells["客片上传状态"].Value = frm.strUploadStatus;
- }
- }
- }
- /// <summary>
- /// 刻盘数据列表双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_CellMouseDoubleClick( object sender, DataGridViewCellMouseEventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( e.RowIndex >= 0 && e.ColumnIndex >= 0 )
- {
- this.btnBurnerRecord_Click( null, null );
- }
- }
- }
- /// <summary>
- /// 刻录记录
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnBurnerRecord_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- DataTable tbl = kbll.GetList( "kp_OrderNumber='" + dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim() + "'" ).Tables[0];
- if ( tbl.Rows.Count > 0 )
- {
- string message = "";
- for ( int i = 0; i < tbl.Rows.Count; i++ )
- {
- if ( i == 0 )
- {
- message += tbl.Rows[i]["kp_KepanName"].ToString().Trim() + " " + Convert.ToDateTime( tbl.Rows[i]["kp_KepanTime"] ).ToString( "yyyy-MM-dd" ) + " 选中的照片";
- }
- else
- {
- message += "\r\n" + tbl.Rows[i]["kp_KepanName"].ToString().Trim() + " " + Convert.ToDateTime( tbl.Rows[i]["kp_KepanTime"] ).ToString( "yyyy-MM-dd" ) + " 选中的照片";
- }
- }
- MessageBoxCustom.Show( message );
- }
- else
- {
- MessageBoxCustom.Show( "没有相关记录" );
- }
- }
- }
- }
- /// <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 chkKidsVersion_Click( object sender, EventArgs e )
- {
- if ( this.chkKidsVersion.Checked )
- {
- this.chkPortraitVersion.Checked = false; this.chkKidsVersion.Checked = true; this.chkDressVersion.Checked = false;
- }
- this.cmbQueryText.Text = "";
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- this.ucPagerEx1.Bind();
- }
- /// <summary>
- /// 婚纱版
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkDressVersion_Click( object sender, EventArgs e )
- {
- if ( this.chkDressVersion.Checked )
- {
- this.chkPortraitVersion.Checked = false; this.chkDressVersion.Checked = true; this.chkKidsVersion.Checked = false;
- }
- this.cmbQueryText.Text = "";
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- this.ucPagerEx1.Bind();
- }
- /// <summary>
- /// 写真版
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkPortraitVersion_Click( object sender, EventArgs e )
- {
- if ( this.chkPortraitVersion.Checked )
- {
- this.chkPortraitVersion.Checked = true; this.chkDressVersion.Checked = false; this.chkKidsVersion.Checked = false;
- }
- this.cmbQueryText.Text = "";
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- this.ucPagerEx1.Bind();
- }
- /// <summary>
- /// 欠款
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkArrears_Click( object sender, EventArgs e )
- {
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- this.ucPagerEx1.Bind();
- }
- /// <summary>
- /// 窗体大小 发生变化
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void KepanFormMain_Resize( object sender, EventArgs e )
- {
- if ( !this.IsFirstRun )
- {
- switch ( this.panelArrears.Location.Y )
- {
- case 4: this.flowLayoutPanel1.Height = 36; break;
- case 36: this.flowLayoutPanel1.Height = 68; break;
- }
- }
- }
- /// <summary>
- /// 右键菜单
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_CellMouseDown( object sender, DataGridViewCellMouseEventArgs e )
- {
- if ( e.Button == MouseButtons.Right )
- {
- if ( e.RowIndex >= 0 && e.ColumnIndex >= 0 )
- {
- ToolStripMenuItem item = new ToolStripMenuItem();
- Hashtable htData = new Hashtable();
- htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
- htData["StrViceNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- item.Text = "订单备注";
- item.Tag = htData;
- item.Name = "OrderRemark";
- this.dgvData.conMenu.Items.Add( item );
- // this.dgvData.conMenu.Show( MousePosition.X, MousePosition.Y );//弹出操作菜单
- this.dgvData.conMenu.ItemClicked -= dgvData_DataGridViewConMenu_ItemClicked;
- this.dgvData.conMenu.ItemClicked += dgvData_DataGridViewConMenu_ItemClicked;
- // this.dgvData.conMenu.Show();
- if (!this.dgvData.conMenu.Visible)
- {
- this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
- }
- }
- else
- {
- this.dgvData.conMenu.Items.Clear();
- ToolStripMenuItem item = new ToolStripMenuItem();
- item.Text = "设置标题";
- item.Tag = "SetColumnShow";
- item.Name = "SetColumnShow";
- this.dgvData.conMenu.Items.Add( item );
- // this.dgvData.conMenu.Show( MousePosition.X, MousePosition.Y );//弹出操作菜单
- this.dgvData.conMenu.ItemClicked -= dgvData_DataGridViewConMenu_ItemClicked;
- this.dgvData.conMenu.ItemClicked += dgvData_DataGridViewConMenu_ItemClicked;
- // this.dgvData.conMenu.Show();
- if (!this.dgvData.conMenu.Visible)
- {
- this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
- }
- }
- }
- }
- /// <summary>
- /// 列表单击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_CellClick( object sender, DataGridViewCellEventArgs e )
- {
- try
- {
- string StrNumber = this.dgvData.CurrentRow.Cells["订单号"].Value.ToString().Trim();
- if ( string.IsNullOrEmpty( StrNumber ) || StrNumber.Trim() == "(取件OK)" )
- {
- bool IsFind = false;
- int i = this.dgvData.CurrentRow.Index;
- while ( !IsFind )
- {
- i = i - 1;
- if ( !string.IsNullOrEmpty( this.dgvData.Rows[i].Cells["订单号"].Value.ToString().Trim() ) )
- {
- StrNumber = this.dgvData.Rows[i].Cells["订单号"].Value.ToString().Trim(); IsFind = true;
- }
- }
- }
- LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber = StrNumber;
- }
- catch
- {
- }
- }
- /// <summary>
- /// 对列表控件双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_MouseDoubleClick( object sender, MouseEventArgs e )
- {
- Point hit = this.dgvData.PointToClient( Cursor.Position );
- DataGridView.HitTestInfo hitTest = this.dgvData.HitTest( hit.X, hit.Y );
- if ( hitTest.RowIndex < 0 && hitTest.ColumnIndex < 0 )
- {
- if ( !string.IsNullOrEmpty( this.cmbQueryText.Text.Trim() ) )
- {
- LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber = "";
- this.cmbQueryText.Text = "";
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- this.ucPagerEx1.Bind();
- }
- }
- }
- /// <summary>
- /// 右键菜单选择项事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_DataGridViewConMenu_ItemClicked( object sender, ToolStripItemClickedEventArgs e )
- {
- ToolStripItem item = e.ClickedItem;
- if ( item.Name.Trim() == "SetColumnShow" )
- {
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ShowDataGridViewSetColumn( this.dgvData ) )
- {
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- this.ucPagerEx1.Bind();
- }
- }
- else if ( item.Name.ToString().Trim() == "OrderRemark" )
- {
- Hashtable htData = (Hashtable)item.Tag;
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.OrderRemarkRecordAddSuperSmallForm frm = new SuperSmallForm.OrderRemarkRecordAddSuperSmallForm();
- frm.StrOrderNumber = htData["StrNumber"].ToString().Trim();
- frm.StrOrdViceNumber = htData["StrViceNumber"].ToString().Trim();
- frm.StrOrdModuleName = LYFZ.EnumPublic.EnumOrderRemarkModule.相片刻录.ToString().Trim();
- frm.ShowDialog();
- }
- }
- /// <summary>
- /// 点击列标头排序
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_ColumnHeaderMouseClick( object sender, DataGridViewCellMouseEventArgs e )
- {
- if ( e.Button == MouseButtons.Left )
- {
- string StrColumnName = GetOrderByName( this.dgvData.Columns[e.ColumnIndex].Name.Trim() );
- if ( StrColumnName == this.StrCurrentClickField || string.IsNullOrEmpty( this.StrCurrentClickField ) )
- {
- if ( this.StrSortOrder == "ASC" )
- {
- this.StrSortOrder = "DESC";
- }
- else
- {
- this.StrSortOrder = "ASC";
- }
- }
- else
- {
- this.StrSortOrder = "DESC";
- }
- if ( this.dgvData.StrValueNullColumn.Trim().IndexOf( StrColumnName ) == -1 || StrColumnName.Trim() == "欠款" || StrColumnName.Trim() == "套系金额" )
- {
- this.StrSortField = StrColumnName + " " + this.StrSortOrder + ",Ord_CreateDateTime,Ordv_DigitalNumber";
- }
- else
- {
- this.StrSortField = "Ord_CreateDateTime " + this.StrSortOrder + ",Ordv_DigitalNumber";
- }
- this.StrCurrentClickField = StrColumnName;
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- this.ucPagerEx1.Bind();
- }
- }
- string GetOrderByName( string StrColumnName )
- {
- switch ( StrColumnName )
- {
- case "订单号": return "Ord_SinceOrderNumber";
- case "客户姓名": return "Cus_Name";
- case "客户性别": return "Cus_Sex_cs";
- case "客户电话": return "Cus_Telephone";
- case "订单类型": return "Ord_Type";
- case "接单人": return "Ord_OrderPersonName";
- case "套系名称": return "Ord_SeriesName";
- case "套系价格": return "Ord_SeriesPrice";
- case "加急": return "IsExpedited";
- case "加急日期": return "ExpeditedTime";
- case "拍摄名称": return "Ordpg_Sights";
- case "初修师": return "Ordv_EarlyRepairName";
- case "初修日期": return "Ordv_EarlyRepairTime";
- case "初修状态": return "Ordv_EarlyRepairStatus";
- case "选片状态": return "Ordv_FilmSelectionStatus";
- case "精修状态": return "Ordv_RefinementStatus";
- case "精修日期": return "Ordv_RefinementTime";
- case "设计状态": return "Ordv_DesignerStatus";
- case "设计师": return "Ordv_DesignerName";
- case "设计日期": return "Ordv_DesignerTime";
- case "看版师": return "Ordv_LookDesignName";
- case "看版日期": return "Ordv_LookDesignTime";
- case "看版状态": return "Ordv_LookDesignStatus";
- case "看版要求": return "Ordv_LookDesignClaim";
- case "取件状态": return "Ords_ProductPickupIntStatus";
- case "会员卡号": return "Mc_CradNumber";
- default: return "";
- }
- }
- /// <summary>
- /// 当前点击的字段
- /// </summary>
- string StrCurrentClickField = "";
- /// <summary>
- /// 排序字段
- /// </summary>
- string StrSortField = "Ord_CreateDateTime DESC,Ordv_DigitalNumber";
- /// <summary>
- /// 排序顺序
- /// </summary>
- string StrSortOrder = "DESC";
- /// <summary>
- /// 创建行
- /// </summary>
- void PublicFunctionRows()
- {
- this.dgvData.dgvCurrentColumnOriginalSet = "Ord_Number," +
- "Ord_Type," +
- "Ordv_ViceNumber," +
- "订单号," +
- "订单类型," +
- "客户姓名," +
- "客户性别," +
- "客户电话," +
- "接单人," +
- "套系名称," +
- "套系价格," +
- "欠款," +
- "加急," +
- "加急日期," +
- "拍摄名称," +
- "拍照状态," +
- "刻盘次数," +
- "初修状态," +
- "选片状态," +
- "精修状态," +
- "设计状态," +
- "设计日期," +
- "看版状态," +
- "看版日期," +
- "取件状态," +
- "会员卡号," +
- "百度云信息," +
- "客片上传状态";
- string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0006.ToString().Trim();
- if ( (LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.MemberCardShowHide) )
- {
- this.dgvData.dgvFixedHideColumn = "Ord_Number,Ordv_ViceNumber,Ord_Type,会员卡号,百度云信息";
- }
- else
- {
- this.dgvData.dgvFixedHideColumn = "Ord_Number,Ordv_ViceNumber,Ord_Type,百度云信息";
- }
- this.dgvData.dgvGuidName = StrGuidName;
- this.dgvData.dgvUserEmployeeID = this.StrUserID;
- this.dgvData.StrValueNullColumn = "订单号,订单类型,客户姓名,客户性别,客户电话,接单人,套系名称,套系价格,欠款,会员卡号";
- this.dgvData.DataColumns( this.dgvData.dgvCurrentColumnOriginalSet, strHideField: this.dgvData.dgvFixedHideColumn );
- Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns( this.StrUserID, StrGuidName, this.dgvData.dgvCurrentColumnOriginalSet );
- this.dgvData.dictShowColumName = dictColumns;
- string StrQueryCondition = "";
- if ( IsFirstRun && !string.IsNullOrEmpty( LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber ) )
- {
- string StrWhere = " Where Ord_SinceOrderNumber = '" + LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber + "'" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL( this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion, StrOrdType: "0,1,2" );
- this.cmbQueryText.Text = LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber;
- StrQueryCondition = StrWhere + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupQueryOrderClickWhere( this.cmbtreevStoreName, "Ord_DividedShop" );
- }
- else
- {
- StrQueryCondition = this.GetWhereStr();
- }
- int intTopCount = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
- Hashtable htData = LYFZ.ComponentLibrary.DataGridOrderView.GetData_OrderKepan( this.dgvData, dictColumns, StrQueryCondition, intTopCount, this.StrSortField, ucPagerEx1.PageCurrent );
- this.dataGridViewStatisticsCount1.LocationX = this.dgvData.RowHeadersWidth;
- this.dataGridViewStatisticsCount1.CurrenQuantity = Convert.ToInt32( htData["CurrentCount"] );
- this.dataGridViewStatisticsCount1.TotalQuantity = Convert.ToInt32( htData["TotalCount"] );
- BindPageData( ucPagerEx1.PageCurrent, Convert.ToInt32( htData["CurrentCount"] ), Convert.ToInt32( htData["TotalCount"] ) );
- }
- /// <summary>
- /// 返回要操作的条件
- /// </summary>
- /// <returns></returns>
- string GetWhereStr()
- {
- string StrWhere = " Where Ord_Class = '1'" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupQueryWhere( this.cmbtreevStoreName, "Ord_DividedShop" );
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetQueryTextQueryCondition( cmbQueryText.Text.Trim() );
- if ( chkCompleteOrder.Checked )
- {
- StrWhere += " and ( (Ords_ServiceIntStatus = 2 or ServiceCount=0 ) and (Ords_ProductPickupIntStatus = 2 or productCount=0 ) and (ServiceCount>0 or productCount>0) ) ";
- }
- else
- {
- if ( BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.HidePickUpOrder && !this.chkCompleteOrder.Checked && string.IsNullOrEmpty( this.cmbQueryText.Text ) )
- {
- StrWhere += " and (Ords_ProductPickupIntStatus in (0,1) and productCount>0 ) ";
- }
- else
- {
- StrWhere += " and ( (Ords_ServiceIntStatus in (0,1) and ServiceCount>0 ) or (Ords_ProductPickupIntStatus in (0,1) and productCount>0 ) or ( ServiceCount = 0 and productCount = 0 ) ) ";
- }
- }
- if ( DictData.ContainsKey( "FilmSelectionStatus" ) && DictData["FilmSelectionStatus"].Trim().Length > 0 )
- {
- StrWhere += " And Ordv_FilmSelectionStatus = '1'";
- }
- if ( this.chkArrears.Checked )
- {
- StrWhere += " And (套系金额 + isnull(加挑金额,0) - isnull(收款金额,0)) > 0";
- }
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL( this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion, StrOrdType: "0,1,2" );
- return StrWhere;
- }
- }
- }
|