1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633 |
- 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;
- using LYFZ.Helper;
- using LYFZ.Model;
- using System.Diagnostics;
- namespace LYFZ.Software.MainBusiness.DoorCityProcess
- {
- public partial class PhotographedFormMain : LYFZ.Software.UI.DoorCityProcess.PhotographedFormMain
- {
- LYFZ.BLL.BLL_ErpOrder orbll = new BLL.BLL_ErpOrder();
- LYFZ.BLL.BLL_ErpCustomer ctbll = new BLL.BLL_ErpCustomer();
- LYFZ.BLL.BLL_ErpSMSRecord rbll = new LYFZ.BLL.BLL_ErpSMSRecord();
- LYFZ.BLL.BLL_ErpSystemLogs slogbll = new BLL.BLL_ErpSystemLogs();
- LYFZ.BLL.BLL_ErpOrderDigital dbll = new BLL.BLL_ErpOrderDigital();
- LYFZ.BLL.BLL_ErpSystemConfigure sbll = new BLL.BLL_ErpSystemConfigure();
- LYFZ.BLL.BLL_ErpOrdersPhotography pbll = new BLL.BLL_ErpOrdersPhotography();
- #region 2017-03-18 杨云奕 添加 获取门店配置的ftp情况
- BLL.BaseBLL.BaseBLL_FTPServiceUserAccount ftpbll = new BLL.BaseBLL.BaseBLL_FTPServiceUserAccount();
- DataSet ftpData;
- #endregion
- #region OSS云传片
- bool useOss = false;
- List<AliyunOssLibrary.Model.SimplifyBranch> listbranch = null;
- #endregion
- #region 设置版本权隐藏字段
- string versionHideString = "";
- #endregion
- public PhotographedFormMain()
- {
- this.Shown += PhotographedFormMain_Shown;
- this.Load += PhotographedFormMain_Load;
- this.cmbtreevStoreName.ComboBoxTree_NodeMouseClick += cmbtreevStoreName_ComboBoxTree_NodeMouseClick;
- this.cmbQueryText.KeyDown += cmbQueryText_KeyDown;
- this.btnQuery.Click += btnQuery_Click;
- this.btnShootingToday.Click += btnShootingToday_Click;
- this.btnConditionQuery.Click += btnConditionQuery_Click;
- this.btnImportZOOM.Click += btnImportZOOM_Click;
- this.btnReviewPicture.Click += btnReviewPicture_Click;
- this.btnGuestsAnAvatar.Click += btnGuestsAnAvatar_Click;
- this.btnMicroShare.Click += btnMicroShare_Click;
- this.btnRetake.Click += btnRetake_Click;
- this.btnClose.Click += btnClose_Click;
- this.chkDressVersion.Click += chkDressVersion_Click;
- this.chkKidsVersion.Click += chkKidsVersion_Click;
- this.chkPortraitVersion.Click += chkPortraitVersion_Click;
- this.chkCompleteOrder.Click += ChkCompleteOrder_Click;
- this.Resize += PhotographedFormMain_Resize;
- this.dgvData.CellMouseDown += dgvData_CellMouseDown;
- this.dgvData.CellClick += dgvData_CellClick;
- this.dgvData.CellMouseDoubleClick += dgvData_CellMouseDoubleClick;
- this.dgvData.MouseDoubleClick += dgvData_MouseDoubleClick;
- this.dgvData.ColumnHeaderMouseClick += dgvData_ColumnHeaderMouseClick;
- this.flowLayoutPanel1.Height = 34;
- ///获取门店ftp账户
- ftpData = ftpbll.GetList2( "" );
- // 导出xls按钮 ;
- this.btnExport.Click += BtnExport_Click;
- ucPagerEx1.EventPaging += ucPagerEx1_EventPaging;
- this.btn_CusOssUpload.Click += Btn_CusOssUpload_Click;
- this.btn_CusOssUpload.Visible = false;
-
- }
- /// <summary>
- /// 客照云传;
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void Btn_CusOssUpload_Click( object sender, EventArgs e )
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- backgroundWorker.ReportProgress( 0, "正在上传中,请稍等..." );
- // 选中行;
- if ( this.dgvData.SelectedRows.Count == 0 )
- {
- MessageBoxCustom.Show( "请选择要上传的客照" );
- return;
- }
- if ( !OssTask.frmOssTask.IsExistsEnterpriseID() )
- {
- MessageBoxCustom.Show( "未注册企业ID,请联系服务商注册" );
- return;
- }
- // 选择os type;
- /*OssTask.frmChooseOsType dlg = new OssTask.frmChooseOsType();
- if ( DialogResult.OK != dlg.ShowDialog() )
- {
- return;
- }*/
- // 选择第一行;
- DataGridViewRow row = this.dgvData.SelectedRows[0];
- // 订单号;
- string strOrderNumber = row.Cells["Ord_Number"].Value.ToString();
- // 订单类型;
- string strOrderType = row.Cells["订单类型"].Value.ToString();
- // 副订单号;
- string strViceOrderNumber = row.Cells["Ordv_ViceNumber"].Value.ToString();
- // 客户姓名;
- string strCusNames = row.Cells["客户姓名"].Value.ToString();
- // 客户性别;
- string strCusGenders = row.Cells["客户性别"].Value.ToString();
- // 客户电话;
- string strCusPhones = row.Cells["客户电话"].Value.ToString();
- // 相片类型;
- string strPhotosType = "原片";
- // 拍摄名称;
- string strScenery = row.Cells["拍摄名称"].Value.ToString();
- // 上传的相片;
- List<string> listPhotos = null;
- if ( !LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.UseBaiduShareUrl )
- {
- BLL.SelectPhotoHandling photoHandling = new BLL.SelectPhotoHandling( orbll.GetModel( "Ord_Number", strOrderNumber ), dbll.GetModel( "Ordv_ViceNumber", strViceOrderNumber ) );
- listPhotos = photoHandling.GetSpecifyTypePhotoList( Model.Model_ErpOrder.DirectoryType.PrimitivePicture, BLL.SelectPhotoHandling.PhotoType.Original, strScenery );
- // 生成任务;
- if ( listPhotos == null || listPhotos.Count == 0 )
- {
- MessageBoxCustom.Show( "该订单没有相片,不生成任务" );
- return;
- }
- }
- /*if ( LYFZ.Software.MainBusiness.OssTask.frmOssTask.GenerateOssTaskEx(
- dlg.cb_baidu.Checked ? 2 : -1,
- dlg.dtp_expire.Value.ToString( "yyyy-MM-dd 00:00:00" ),
- Convert.ToInt32( dlg.dup_times.SelectedItem ),
- strOrderNumber,
- strOrderType,
- strCusNames,
- strCusGenders,
- strCusPhones,
- strPhotosType, strScenery, listPhotos ) )
- {
- MessageBoxCustom.Show( "任务生成成功!" );
- }*/
- OssTask.JsonOssTask jsonOssTask = LYFZ.Software.MainBusiness.OssTask.frmOssTask.GenerateOssTask(
- //dlg.cb_baidu.Checked ? 2 : -1,
- LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.UseBaiduShareUrl ? 2 : -1,
- //dlg.dtp_expire.Value.ToString( "yyyy-MM-dd 00:00:00" ),
- DateTime.Now.AddMonths( 1 ).ToString( "yyyy-MM-dd 00:00:00" ),
- //Convert.ToInt32( dlg.dup_times.SelectedItem ),
- 1,
- strOrderNumber, "子订单号", strOrderType, strCusNames, strCusGenders, strCusPhones, strPhotosType, strScenery, listPhotos );
- if ( jsonOssTask != null )
- {
- // 如果任务列表空,加载任务;
- //if ( OssTask.frmOssTask.IsTaskListNullOrEmpty() )
- /*{
- // 从服务器加载文件数据;
- List<string> listJson;
- if ( LYFZ.Network.PlatinumClientProcess.GetOssTaskInfoFromSvr( out listJson ) )
- {
- OssTask.frmOssTask.LoadOssTask2( listJson );
- }
- }*/
- // 是否存在;
- //if ( OssTask.frmOssTask.IsTaskExists( jsonOssTask ) )
- string strJson;
- if ( LYFZ.Network.PlatinumClientProcess.IsOssTaskInfoExists( jsonOssTask.TaskID, out strJson ) )
- {// 任务已存在;
- MessageBoxCustom.Show( "任务已存在, 若要重新上传, 请到服务端删除任务再上传!" );
- }
- else
- {// 新增任务;
- if ( LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.UseBaiduShareUrl )
- {
- LYFZ.Software.MainBusiness.OssTask.frmBaiduShareUrl frm = new OssTask.frmBaiduShareUrl();
- frm.ShowDialog();
- if ( frm.DialogResult == DialogResult.OK )
- {
- jsonOssTask.BaiduExtrCode = frm.tx_code.Text;
- jsonOssTask.BaiduShareUrl = frm.tx_url.Text;
- OssTask.frmOssTask.SendBaiduShare2WebSrv( jsonOssTask );
- }
- else
- {
- return;
- }
- }
- else
- {
- if ( OssTask.frmOssTask.SendOssTask2Svr( jsonOssTask ) )
- {
- OssTask.frmOssTask.PushTask( jsonOssTask );
- MessageBoxCustom.Show( "任务生成成功!" );
- }
- else
- {
- MessageBoxCustom.Show( "任务生成失败!" );
- }
- }
- }
- }
- } );
- }
- private void ChkCompleteOrder_Click( object sender, EventArgs e )
- {
- this.ucPagerEx1.PageCurrent = 1;
- 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;
- }
- #region 导出按钮 2017-10-25;
- private void BtnExport_Click( object sender, EventArgs e )
- {
- SaveFileDialog saveFile = new SaveFileDialog();
- saveFile.FileName = "拍照详情";
- saveFile.Title = "导出数据报表文件";
- saveFile.Filter = "EXECL文件(*.xls) |*.xls |文本文件(*.txt) |*.txt |所有文件(*.*) |*.*";
- saveFile.FilterIndex = 1;
- DialogResult drst = saveFile.ShowDialog();
- if ( drst == DialogResult.No || drst == DialogResult.Cancel || drst == DialogResult.No || drst == DialogResult.Abort )
- return;
- bool IsExport = false;
- #region 查询语句
- string strDefaultColumn = "JID,Ord_Number,Ordv_ViceNumber,订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,欠款,拍摄名称,拍摄状态,是否重拍,拍摄日期,摄影师,摄影助理,化妆师,化妆助理,引导师,引导助理,选衣状态,选片状态,取件状态,会员卡号";
- string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0001.ToString().Trim();
- Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns( this.StrUserID,
- StrGuidName, strDefaultColumn );
- string StrQueryCondition = "";
- if ( IsFirstRun && !string.IsNullOrEmpty( LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber ) )
- {
- this.cmbQueryText.Text = LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber;
- DataTable dt = orbll.GetView_Custom( "tb_ErpOrder",
- StrWhere: "Ord_SinceOrderNumber = '" + LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber + "' And Ord_Type in ('0','1','2')",
- ShowColumnName: "ID" ).Tables[0];
- if ( dt.Rows.Count <= 0 )
- {
- this.dgvData.DataColumns( this.dgvData.dgvCurrentColumnOriginalSet, this.dgvData.dgvFixedHideColumn ); return;
- }
- else
- {
- 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" );
- StrQueryCondition = StrWhere +
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupQueryOrderClickWhere( this.cmbtreevStoreName, "Ord_DividedShop" );
- }
- }
- else
- {
- StrQueryCondition = this.GetWhereStr();
- }
- int inTopCount = -1;// LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
- List<string> listColumns = new List<string>( StrSortField.Replace( " DESC", "" ).Replace( " ASC", "" ).Split( ',' ) );
- #endregion
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- // 查询数据;
- DataSet dtSet = new DataSet();
- dtSet = LYFZ.BLL.BLL_ErpOrderView.GetData_OrderPhotographed( dictColumns, listColumns, StrQueryCondition, inTopCount, this.StrSortField, ucPagerEx1.PageCurrent );
- #region 重组DataTable
- DataTable newtable = new DataTable();
- foreach ( var item in dictColumns )
- {
- if ( dtSet.Tables["ds"].Columns.Contains( item.Key.Trim() ) )
- newtable.Columns.Add( item.Key.Trim(), typeof( string ) );
- }
- if ( dtSet.Tables["ds1"] != null )
- {
- DataTable dt = dtSet.Tables["ds"];
- for ( int i = 0; i < dt.Rows.Count; i++ )
- {
- DataRow newRow = newtable.NewRow();
- for ( int j = 0; j < newtable.Columns.Count; j++ )
- {
- string StrRowValue = "";
- switch ( newtable.Columns[j].ColumnName.Trim() )
- {
- case "拍摄日期":
- StrRowValue = dt.Rows[i][newtable.Columns[j].ColumnName.Trim()].ToString().Trim();
- StrRowValue = LYFZ.BLL.OtherCommonModel.DateTimeToString( StrRowValue );
- break;
- case "是否重拍":
- StrRowValue = dt.Rows[i][newtable.Columns[j].ColumnName.Trim()].ToString().Trim() == "" ? "" : "重拍";
- break;
- case "拍摄状态":
- StrRowValue = dt.Rows[i][newtable.Columns[j].ColumnName.Trim()].ToString().Trim();
- if ( !string.IsNullOrEmpty( StrRowValue ) )
- {
- StrRowValue = Enum.ToObject( typeof( LYFZ.EnumPublic.PhotographyStatusEnum ), Convert.ToInt32( StrRowValue ) ).ToString();
- if ( !string.IsNullOrEmpty( dt.Rows[i]["Ordrr_SightsIDNumber"].ToString().Trim() ) )
- {
- StrRowValue += "(重拍)";
- }
- }
- else
- {
- StrRowValue = "";
- }
- break;
- case "选衣状态":
- StrRowValue = dt.Rows[i][newtable.Columns[j].ColumnName.Trim()].ToString().Trim();
- if ( !string.IsNullOrEmpty( StrRowValue ) )
- {
- StrRowValue = Enum.ToObject( typeof( LYFZ.EnumPublic.ClothingStatusEnum ), Convert.ToInt32( StrRowValue ) ).ToString();
- }
- else
- {
- StrRowValue = "";
- }
- break;
- case "选片状态":
- StrRowValue = dt.Rows[i][newtable.Columns[j].ColumnName.Trim()].ToString().Trim();
- if ( !string.IsNullOrEmpty( StrRowValue ) )
- {
- StrRowValue = Enum.ToObject( typeof( LYFZ.EnumPublic.FilmSelectionStatusEnum ), Convert.ToInt32( StrRowValue ) ).ToString();
- }
- else
- {
- StrRowValue = "";
- }
- break;
- case "摄影师":
- case "摄影助理":
- case "化妆师":
- case "化妆助理":
- case "引导师":
- case "引导助理":
- StrRowValue = dt.Rows[i][newtable.Columns[j].ColumnName.Trim()].ToString().Trim();
- if ( !string.IsNullOrEmpty( StrRowValue ) )
- {
- DataRow dtRows = LYFZ.DAL.DAL_ErpUser.SimpleUserDataTable.Rows.Find( StrRowValue );
- if ( dtRows != null )
- {
- StrRowValue = dtRows["User_Name"].ToString().Trim();
- }
- else
- {
- StrRowValue = "";
- }
- }
- break;
- case "订单类型":
- StrRowValue = dt.Rows[i][newtable.Columns[j].ColumnName.Trim()].ToString().Trim();
- if ( !string.IsNullOrEmpty( StrRowValue ) )
- {
- StrRowValue = Enum.ToObject( typeof( LYFZ.EnumPublic.OrderType ), Convert.ToInt32( StrRowValue ) ).ToString();
- }
- else
- {
- StrRowValue = "";
- }
- break;
- default:
- StrRowValue = dt.Rows[i][newtable.Columns[j].ColumnName.Trim()].ToString().Trim();
- break;
- }
- newRow[newtable.Columns[j].ColumnName.Trim()] = StrRowValue;
- }
- newtable.Rows.Add( newRow );
- }
- }
- newtable.Columns.Remove( "JID" );
- newtable.Columns.Remove( "Ord_Number" );
- newtable.Columns.Remove( "Ordv_ViceNumber" );
- #endregion
- if ( newtable.Rows.Count == 0 )
- {
- MessageBoxCustom.Show( "没有数据可导出" );
- return;
- }
- this.Invoke( new LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.UpdateControl( delegate ()
- {
- if ( newtable.Rows.Count > 0 )
- {
- try
- {
- this.Invoke( new LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.UpdateControl( delegate ()
- {
- IsExport = LYFZ.WinAPI.CustomPublicMethod.DataGridViewToExcel( saveFile.FileName.Trim(), newtable, null, backgroundWorker);
- } ) );
- }
- catch
- {
- }
- if ( IsExport )
- {
- MessageBoxCustom.Show( "导出成功!" );
- }
- else
- {
- MessageBoxCustom.Show( "导出失败!" );
- }
- }
- } ) );
- } );
- }
- #endregion
- #region 2017-03-18 杨云奕 添加 如果有定义ftp则将上传功能显示
- /// <summary>
- /// 右键添加上传功能
- /// </summary>
- /// <param name="orNumber"></param>
- void BindContextMenu( DataGridViewRow dataGridViewRow )
- {
- #region 获取OSS信息;
- //if (LYFZ.Network.OssOperation.OssProcess.GetOssBranchList(LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.TcpClient.Client, out this.listbranch, ref this.useOss))
- if ( LYFZ.Network.OssOperation.OssProcess.GetOssStatus( LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.TcpClient.Client, ref this.useOss ) )
- {
- if ( this.useOss )
- {
- Network.OssOperation.OssProcess.GetOssBranchList( out this.listbranch, ref this.useOss );
- }
- }
- #endregion
- #region 2017-0331 刘工添加 清除订单相片密码
- if ( LYFZ.BLL.BLL_ErpUser.IsAdministrator() )
- {
- ToolStripMenuItem itemdelPwd = new ToolStripMenuItem();
- itemdelPwd.Text = "清除订单相片密码";
- itemdelPwd.Name = "UpFtp";
- itemdelPwd.Tag = dataGridViewRow.Cells["Ordv_ViceNumber"].Value.ToString();
- itemdelPwd.Click += itemdelPwd_Click;
- this.dgvData.conMenu.Items.Add( itemdelPwd );
- }
- #endregion
- if ( this.useOss )
- {
- ToolStripMenuItem item = new ToolStripMenuItem();
- item.Text = "上传订单:" + dataGridViewRow.Cells["Ord_Number"].Value.ToString();
- item.Name = "UpFtp";
- item.Tag = dataGridViewRow;
- item.Click += item_Click;
- this.dgvData.conMenu.Items.Add( item );
- }
- else
- {
- #region 杨工的ftp传片
- if ( ftpData.Tables[0].Rows.Count > 0 )
- {
- ToolStripMenuItem item = new ToolStripMenuItem();
- item.Text = "上传订单:" + dataGridViewRow.Cells["Ord_Number"].Value.ToString();
- item.Name = "UpFtp";
- item.Tag = dataGridViewRow;
- item.Click += item_Click;
- // ToolStripMenuItem[] subItem = new ToolStripMenuItem[ftpData.Tables[0].Rows.Count];
- //for (int i = 0; i < ftpData.Tables[0].Rows.Count; i++)
- //{
- // DataRow dr = ftpData.Tables[0].Rows[i];
- // subItem[i] = new ToolStripMenuItem();
- // subItem[i].Text = "至" + dr["Company_Name"].ToString() + "(" + dr["FTP_Name"].ToString() + ")账户";
- // dataGridViewRow.Tag = dr;
- // subItem[i].Tag = dataGridViewRow;
- // subItem[i].Click += ToolStripMenuItem_Click;
- //}
- ////item
- this.dgvData.conMenu.Items.AddRange( new ToolStripItem[] { item } );
- //List<ToolStripItem> dropDownList = new List<ToolStripItem>();
- //for(int i=0;i<subItem.Length;i++)
- //{
- // dropDownList.Add(subItem[i]);
- //}
- //item.DropDownItems.AddRange(dropDownList.ToArray());
- }
- #endregion
- }
- this.dgvData.conMenu.ResumeLayout();
- this.dgvData.conMenu.Update();
- }
- void itemdelPwd_Click( object sender, EventArgs e )
- {
- try
- {
- ToolStripMenuItem item = (ToolStripMenuItem)sender;
- if ( LYFZ.DAL.DAL_ErpOrderDigital.DeletePhotoPwd( item.Tag.ToString() ) )
- {
- MessageBoxCustom.Show( "相片密码已清除" );
- }
- else
- {
- MessageBoxCustom.Show( "相片密码清除失败" );
- }
- }
- catch ( Exception ex )
- {
- MessageBoxCustom.Show( "相片密码清除出错:" + ex.Message );
- }
- }
- void item_Click( object sender, EventArgs e )
- {
- FTPUpFileForm ftpForm = new FTPUpFileForm();
- if ( this.useOss )
- {
- ftpForm.Text = "云传片";
- ftpForm.UseOss = true;
- ftpForm.ListBranch = this.listbranch;
- }
- DataGridViewRow dgvr = (DataGridViewRow)((ToolStripMenuItem)sender).Tag;
- LYFZ.BLL.BLL_ErpOrdersPhotography pbll = new BLL.BLL_ErpOrdersPhotography();
- //拍摄景点
- DataTable tbl = pbll.GetList( "Ordpg_Number='" + dgvr.Cells["Ord_Number"].Value.ToString() + "'" ).Tables[0];
- string _Type = dgvr.Cells["订单类型"].Value == null ? dgvr.Cells["Ord_Type"].Value.ToString() : (dgvr.Cells["订单类型"].Value.ToString() == "儿童订单" ? "1" : "0");
- string LoadType = "原片";
- string signName = "";
- string SightsName = "";
- if ( _Type == "1" )
- {
- if ( tbl.Rows.Count > 0 )
- {
- for ( int i = 0; i < tbl.Rows.Count; i++ )
- {
- SightsName += tbl.Rows[i]["Ordpg_Sights"].ToString() + ",";
- }
- }
- signName = SightsName.TrimEnd( ',' );
- }
- else if ( _Type != "1" )
- {
- if ( tbl.Rows.Count > 0 )
- {
- for ( int i = 0; i < tbl.Rows.Count; i++ )
- {
- SightsName += tbl.Rows[i]["Ordpg_Sights"].ToString() + (LoadType == "原片" ? "," : ",");
- }
- }
- signName = SightsName.TrimEnd( ',' );
- }
- else
- {
- signName = dgvr.Cells["拍摄名称"].Value.ToString();
- }
- string[] str = signName.Split( ',' );
- foreach ( var item in str )
- {
- CheckBoxEx cb = new CheckBoxEx();
- cb.Text = item;
- ftpForm.AddCheckBoxModel( cb );
- cb.Checked = true;
- }
- ftpForm.BindData( dgvr.Cells["Ord_Number"].Value.ToString(), dgvr.Cells["Ordv_ViceNumber"].Value.ToString(),
- _Type, "原片", "" );
- ftpForm.AddCheckBoxByFtpInfo( null );
- if ( ftpForm.ShowDialog() == System.Windows.Forms.DialogResult.OK )
- {
- }
- //throw new NotImplementedException();
- }
- /// <summary>
- /// 上传项点击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void ToolStripMenuItem_Click( object sender, EventArgs e )
- {
- FTPUpFileForm ftpForm = new FTPUpFileForm();
- DataGridViewRow dataRow = (DataGridViewRow)((ToolStripMenuItem)sender).Tag;
- bool findR = false;
- for ( int i = 0; i < this.dgvData.Rows.Count; i++ )
- {
- DataGridViewRow dgvr = this.dgvData.Rows[i];
- if ( this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString() == dataRow.Cells["Ord_Number"].Value.ToString() )
- {
- findR = true;
- }
- else
- {
- if ( findR )
- {
- break;
- }
- }
- if ( findR )
- {
- ftpForm.AddCheckBoxModel( new CheckBoxEx()
- {
- Text = this.dgvData.Rows[i].Cells["拍摄名称"].Value.ToString(),
- Tag = dataRow,
- Checked = (dataRow.Cells["拍摄名称"].Value.ToString() == this.dgvData.Rows[i].Cells["拍摄名称"].Value.ToString())
- } );
- }
- }
- DataRow dr = ((DataRow)dataRow.Tag);
- ftpForm.BindData( dataRow, "原片", dr["Company_Name"].ToString() + "(" + dr["FTP_Name"].ToString() + ")账户" );
- if ( ftpForm.ShowDialog() == System.Windows.Forms.DialogResult.OK )
- {
- }
- }
- /// <summary>
- /// 设置分页数据
- /// </summary>
- /// <param name="pageIndx"></param>
- /// <param name="pageSize"></param>
- /// <param name="totalCount"></param>
- public void BindPageData( int pageIndx, int pageSize, int totalCount )
- {
- ucPagerEx1.NMax = totalCount;
- ucPagerEx1.CurrentPageCount = (pageSize);
- ucPagerEx1.PageCurrent = pageIndx;
- }
- #endregion
- /// <summary>
- /// 订单号(用于开单处跳转过来)
- /// </summary>
- public string StrOrdNumber = "";
- /// <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>
- string StrUserName = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_Name;
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void PhotographedFormMain_Shown( object sender, EventArgs e )
- {
- ///重拍功能的的版本权限
- List<Control> hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add( this.btnRetake );
- bool b = LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- LYFZ.Software.MainBusiness.VersionControl.VersionFunctionEnum.订单拍照重拍标注,
- hideControl, null, null );
- if ( !b )
- {
- versionHideString = ",是否重拍";
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindGroupStoreName( this.cmbtreevStoreName, StrGroupKeyCode: "retailProcess", StrKeyCode: "st006" );
- this.PublicFunctionRights();
- //this.PublicFunctionRows();
- ucPagerEx1.Bind();
- this.IsFirstRun = false;
- this.PhotographedFormMain_Resize( this, null );
- }
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void PhotographedFormMain_Load( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetSystemVersion( this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion );
- if ( this.dgvData.Columns.Count <= 0 )
- {
- string strColumn = "订单号,订单类型,客户姓名,客户电话,客户性别,套系类别,客户来源,套系名称,套系价格,接单人,拍摄名称,拍照状态,摄影师,拍摄时间,化妆师,初修师,初修时间,初修状态,选片师,选片时间,选片状态,设计师,设计时间,设计状态,精修师,精修时间,精修状态,看设计师,看设计时间,看设计状态,看设计要求,取件状态,取件日期,备注,录入员,下单日期";
- this.dgvData.DataColumns( strColumn, LYFZ.Software.MainBusiness.CommonLogical.CacheData.StrOrderReportHideField );
- }
- this.cmbQueryText.Text = this.StrOrdNumber;
- }
- /// <summary>
- /// 选择分店获取权限
- /// </summary>
- void PublicFunctionRights()
- {
- this.btnImportZOOM.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresPhotograph", LYFZ.CustomAttributes.OperatingAuthority.PhotoImport );
- this.btnReviewPicture.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresPhotograph", LYFZ.CustomAttributes.OperatingAuthority.PhotoView );
- this.btnGuestsAnAvatar.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresPhotograph", LYFZ.CustomAttributes.OperatingAuthority.PhotographClientAvatarSeeView );
- this.btnMicroShare.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresPhotograph", LYFZ.CustomAttributes.OperatingAuthority.PhotographMicroShare );
- this.btnRetake.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresPhotograph", LYFZ.CustomAttributes.OperatingAuthority.PhotographRetake );
- }
- /// <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 )
- {
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresPhotograph", LYFZ.CustomAttributes.OperatingAuthority.PhotoView ) )
- {
- this.btnReviewPicture_Click( this, null );
- }
- }
- }
- }
- /// <summary>
- /// 分店选择查询数据
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void cmbtreevStoreName_ComboBoxTree_NodeMouseClick( object sender, TreeNodeMouseClickEventArgs e )
- {
- this.PublicFunctionRights();
- // this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- 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.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- //this.PublicFunctionRows();
- }
- /// <summary>
- /// 今天拍
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnShootingToday_Click( object sender, EventArgs e )
- {
- this.DictData.Clear();
- this.DictData["QueryDateTimeStart"] = SDateTime.Now.ToString( "yyyy-MM-dd" );
- this.DictData["QueryDateTimeEnd"] = SDateTime.Now.ToString( "yyyy-MM-dd" );
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- //this.PublicFunctionRows();
- }
- /// <summary>
- /// 条件查询
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnConditionQuery_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ConditionQuerySamllForm frm = new SetSmallForm.ConditionQuerySamllForm();
- frm.LoadType = "拍照";
- frm.ShowDialog();
- this.DictData = frm.DictDataArray;
- if ( DictData.Count > 0 )
- {
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- //this.PublicFunctionRows();
- }
- }
- /// <summary>
- /// 导入原片
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnImportZOOM_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- #region 抓数据
- if ( this.dgvData.SelectedRows.Count <= 0 )
- {
- MessageBoxCustom.Show( "请选择要导入的景点" ); return;
- }
- if ( this.dgvData.CurrentRow.Cells["JID"].Value.ToString().Trim() == "" )
- {
- MessageBoxCustom.Show( "此单无景点,不能导片!" ); return;
- }
- string MainOrderNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();//主订单号
- string ViceOrderNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();//副订单号
- #endregion
- //选择拍摄相关人员
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.OfficersConfirmSuperSmallForm frm = new SuperSmallForm.OfficersConfirmSuperSmallForm();
- frm.OrdNumber = MainOrderNumber;
- frm.OrdViceNumber = ViceOrderNumber;
- frm.JID = this.dgvData.CurrentRow.Cells["JID"].Value.ToString();
- frm.SightsName = this.dgvData.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim();
- if ( this.dgvData.CurrentRow.Cells["取件状态"].Value.ToString().Trim() == "OK" )
- {
- MessageBoxCustom.Show( "已取件,不能导片!" );
- frm.rdoYes1.Enabled = false;
- frm.rdoNo1.Checked = true;
- }
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- //this.PublicFunctionRows();
- }
- }
- }
- /// <summary>
- /// 查看原片
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnReviewPicture_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- string MainOrderNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();//主订单号
- string ViceOrderNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();//数码编号
- string SightsName = this.dgvData.CurrentRow.Cells["拍摄名称"].Value.ToString();
- int Jid = 0;
- if ( pbll.GetRecordCount( "Ordpg_ViceNumber = '" + this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim() + "'" ) > 1 )
- {
- DialogResult Dialogresult = MessageBoxCustom.Show( "是否查看全部景点?", "信息提示", MessageBoxButtons.YesNoCancel );
- if ( Dialogresult == DialogResult.Yes )
- {
- SightsName = "";
- }
- else if ( Dialogresult == DialogResult.No )
- {
- Jid = Convert.ToInt32( this.dgvData.CurrentRow.Cells["JID"].Value );
- }
- else if ( Dialogresult == DialogResult.Cancel )
- {
- return;
- }
- }
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( ViceOrderNumber ) )
- {
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.CustomerPhotosViewSmallForm frm = new SetSmallForm.CustomerPhotosViewSmallForm();
- frm.LoadType = "原片";
- frm.MainOrderNumber = MainOrderNumber;
- frm.ViceOrderNumber = ViceOrderNumber;
- // 拍摄名称;
- frm.StrSightsName = SightsName;
- frm.JID = Jid;
- frm.DirType = Model.Model_ErpOrder.DirectoryType.PrimitivePicture;
- frm.Show();
- }
- }
- }
- /// <summary>
- /// 客人头像
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnGuestsAnAvatar_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.GuestsAnAvatarSmallForm frm = new SetSmallForm.GuestsAnAvatarSmallForm();
- frm.OrdNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
- frm.OrdViceNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- frm.ShowDialog();
- }
- else { MessageBoxCustom.Show( "请选择要导入的订单" ); return; }
- }
- }
- /// <summary>
- /// 微分享
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnMicroShare_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- string Type = "";
- string MainOrderNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();//主订单号
- string SightsName = this.dgvData.CurrentRow.Cells["拍摄名称"].Value.ToString();
- if ( pbll.GetRecordCount( "Ordpg_ViceNumber = '" + this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim() + "'" ) > 1 )
- {
- DialogResult Dialogresult = MessageBoxCustom.Show( "是否查看全部景点?", "信息提示", MessageBoxButtons.YesNoCancel );
- if ( Dialogresult == DialogResult.No )
- {
- Type = "1";
- }
- else if ( Dialogresult == DialogResult.Yes )
- {
- SightsName = "";
- }
- else if ( Dialogresult == DialogResult.Cancel )
- {
- return;
- }
- }
- LYFZ.Model.Model_ErpOrder ord_model = orbll.GetModel( "Ord_Number", this.dgvData.CurrentRow.Cells["Ord_Number"].Value );
- LYFZ.Model.Model_ErpOrderDigital vmodel = dbll.GetModel( "Ordv_ViceNumber", this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value );
- LYFZ.BLL.SelectPhotoHandling sPh = new BLL.SelectPhotoHandling( ord_model, vmodel );
- List<string> sPhotoList = sPh.GetSpecifyTypePhotoList( Model.Model_ErpOrder.DirectoryType.PrimitivePicture, BLL.SelectPhotoHandling.PhotoType.Small, SightsName );
- if ( sPhotoList.Count == 0 )
- {
- string StrMasee = "";
- try { StrMasee = this.dgvData.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim(); StrMasee = "拍摄名称"; }
- catch { }
- try { StrMasee = this.dgvData.CurrentRow.Cells["景点"].Value.ToString().Trim(); StrMasee = "景点"; }
- catch { }
- MessageBoxCustom.Show( "此" + StrMasee + "未导片" ); return;
- }
- //客户姓名
- // DataTable tbl = rbll.View_ProcessSMS(" and Ord_Number='" + MainOrderNumber + "'", "Id desc").Tables[0];
- //string CustomerName = "";
- //if (tbl.Rows.Count > 0)
- //{ CustomerName = tbl.Rows[0]["男宾姓名"].ToString() + "," + tbl.Rows[0]["女宾姓名"].ToString(); }
- //拍摄景点
- LYFZ.Software.MainBusiness.MicroShare.FrmMicroShare frm = new MicroShare.FrmMicroShare();
- frm.SPhotoList = sPhotoList;
- frm.F_Number = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();//主订单号
- try
- {
- frm.F_CusName = orbll.GetView_Custom( "tempTB_AggregationCustomer", StrWhere: "GP_OrderNumber = '" + MainOrderNumber + "'", ShowColumnName: "Cus_Name" ).Tables[0].Rows[0]["Cus_Name"].ToString();
- }
- catch
- {
- frm.F_CusName = this.dgvData.CurrentRow.Cells["客户姓名"].Value.ToString().Trim();
- }
- if ( Type != "1" )
- {
- DataTable tbl = pbll.GetList( "Ordpg_Number='" + MainOrderNumber + "' and Ordpg_ViceNumber = '" + this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim() + "'" ).Tables[0];
- if ( tbl.Rows.Count > 0 )
- {
- for ( int i = 0; i < tbl.Rows.Count; i++ )
- {
- if ( !SightsName.Contains( tbl.Rows[i]["Ordpg_Sights"].ToString().Trim() ) )
- SightsName += tbl.Rows[i]["Ordpg_Sights"].ToString() + ",";
- }
- }
- frm.F_Attractions = SightsName.TrimEnd( ',' );
- }
- else
- {
- frm.F_Attractions = SightsName;
- }
- frm.F_MakeupArtist = dgvData.CurrentRow.Cells["化妆师"].Value.ToString().Trim();
- frm.Show();
- }
- }
- }
- /// <summary>
- /// 重拍
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnRetake_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count <= 0 )
- {
- MessageBoxCustom.Show( "请选择要重拍的景点" ); return;
- }
- if ( this.dgvData.CurrentRow.Cells["JID"].Value.ToString().Trim() == "" )
- {
- MessageBoxCustom.Show( "此单无景点,不能重拍!" ); return;
- }
- string MainOrderNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();//主订单号
- string ViceOrderNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();//副订单号
- string SightsID = this.dgvData.CurrentRow.Cells["JID"].Value.ToString().Trim();
- DataTable dt = orbll.GetView_Custom( "tb_ErpOrdersPhotography", StrWhere: "ID = '" + SightsID + "'", ShowColumnName: "Ordpg_PhotographyStatus" ).Tables[0];
- if ( dt.Rows.Count == 0 )
- {
- MessageBoxCustom.Show( "此单的拍摄名称不存在!" ); return;
- }
- if ( dt.Rows[0]["Ordpg_PhotographyStatus"].ToString().Trim() == "0" )
- {
- MessageBoxCustom.Show( "拍摄名称:'" + this.dgvData.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim() + "' 未拍,不能重拍" ); return;
- }
- //选择拍摄相关人员
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.OrderSightsRetakeSmallForm frm = new SetSmallForm.OrderSightsRetakeSmallForm();
- frm.StrOrdNumber = MainOrderNumber;
- frm.StrSightsID = SightsID;
- frm.StrRetakeType = EnumPublic.EnumRetakeType.拍照重拍;
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- //this.PublicFunctionRows();
- }
- }
- }
- /// <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.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- //this.PublicFunctionRows();
- }
- /// <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.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- //this.PublicFunctionRows();
- }
- /// <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.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- //this.PublicFunctionRows();
- }
- /// <summary>
- /// 窗体大小发生改变事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void PhotographedFormMain_Resize( object sender, EventArgs e )
- {
- if ( !this.IsFirstRun )
- {
- switch ( this.panelPortraitVersion.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_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.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- //this.PublicFunctionRows();
- }
- }
- }
- /// <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 )
- {
- bool IsFind = false;
- Hashtable htData = null;
- ToolStripMenuItem item = null;
- if ( this.dgvData.Columns[e.ColumnIndex].Name.Trim() == "拍摄状态" )
- {
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresPhotograph", LYFZ.CustomAttributes.OperatingAuthority.ProcessStatusReset ) )
- {
- this.dgvData.conMenu.Items.Clear();
- htData = new Hashtable();
- htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
- htData["StrSightsID"] = this.dgvData.Rows[e.RowIndex].Cells["JID"].Value.ToString().Trim();
- htData["StrStatusName"] = this.dgvData.Columns[e.ColumnIndex].Name.Trim() + ":";
- htData["StrStatusType"] = "0";
- htData["StrViceNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- //弹出操作菜单
- item = new ToolStripMenuItem();
- item.Text = "重置" + this.dgvData.Columns[e.ColumnIndex].Name.Trim();
- item.Tag = htData;
- item.Name = "ResetStatus";
- this.dgvData.conMenu.Items.Add( item );
- IsFind = true;
- }
- }
- else if ( this.dgvData.Columns[e.ColumnIndex].Name.Trim() == "拍摄日期" && this.dgvData.Rows[e.RowIndex].Cells["拍摄日期"].Value.ToString().Trim() != "" )
- {
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresPhotograph", LYFZ.CustomAttributes.OperatingAuthority.ProcessDateReset ) )
- {
- this.dgvData.conMenu.Items.Clear();
- htData = new Hashtable();
- htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
- htData["StrSightsID"] = this.dgvData.Rows[e.RowIndex].Cells["JID"].Value.ToString().Trim();
- htData["StrSightsName"] = this.dgvData.Rows[e.RowIndex].Cells["拍摄名称"].Value.ToString().Trim();
- htData["StrOldDate"] = this.dgvData.Rows[e.RowIndex].Cells["拍摄日期"].Value.ToString().Trim();
- item = new ToolStripMenuItem();
- item.Text = "重置" + this.dgvData.Columns[e.ColumnIndex].Name.Trim();
- item.Tag = htData;
- item.Name = "ResetDate";
- this.dgvData.conMenu.Items.Add( item );
- IsFind = true;
- }
- }
- item = new ToolStripMenuItem();
- 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 );
- IsFind = true;
- DataTable dt = orbll.GetView_Custom( "tb_ErpOrdersPhotography", StrWhere: "ID = '" + this.dgvData.Rows[e.RowIndex].Cells["JID"].Value.ToString().Trim() + "'", ShowColumnName: "Ordpg_IDNumber" ).Tables[0];
- if ( dt.Rows.Count > 0 )
- {
- DataTable odt = orbll.GetView_Custom( "tb_ErpOrderRetakeRecord", StrWhere: "Ordrr_SightsIDNumber = '" + dt.Rows[0]["Ordpg_IDNumber"].ToString().Trim() + "'", ShowColumnName: "Count(ID) AS CountID" ).Tables[0];
- if ( odt.Rows.Count > 0 )
- {
- if ( Convert.ToInt32( odt.Rows[0]["CountID"] ) > 0 )
- {
- item = new ToolStripMenuItem();
- 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();
- htData["StrSightsIDNumber"] = dt.Rows[0]["Ordpg_IDNumber"].ToString().Trim();
- htData["IsCompetence"] = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresPhotograph", LYFZ.CustomAttributes.OperatingAuthority.PhotographRetake );
- item.Text = "重拍记录";
- item.Tag = htData;
- item.Name = "RemakeRecord";
- this.dgvData.conMenu.Items.Add( item );
- }
- }
- }
- if ( htData != null )
- {
- BindContextMenu( this.dgvData.Rows[e.RowIndex] );
- }
- if ( IsFind )
- {
-
- // this.dgvData.conMenu.Show( MousePosition.X, MousePosition.Y );//弹出操作菜单
- this.dgvData.conMenu.ItemClicked -= dgvData_DataGridViewConMenu_ItemClicked;
- this.dgvData.conMenu.ItemClicked += dgvData_DataGridViewConMenu_ItemClicked;
- if (!this.dgvData.conMenu.Visible)
- {
- this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
- }
- }
- this.dgvData.conMenu.Refresh();
- this.dgvData.conMenu.Update();
- }
- 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;
- if (!this.dgvData.conMenu.Visible)
- {
- this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
- }
- // this.dgvData.conMenu.Show();
- }
- }
- }
- /// <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, StrEnabled: "拍摄日期" ) )
- {
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- //this.PublicFunctionRows();
- }
- }
- else if ( item.Name.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();
- }
- else if ( item.Name.Trim() == "ResetStatus" )
- {
- Hashtable htData = (Hashtable)item.Tag;
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.OrderStatusResetSmallForm frm = new SetSmallForm.OrderStatusResetSmallForm();
- frm.StrNumber = htData["StrNumber"].ToString();
- frm.StrSightsID = htData["StrSightsID"].ToString();
- frm.StrStatusName = htData["StrStatusName"].ToString();
- frm.StrStatusType = htData["StrStatusType"].ToString();
- frm.StrViceNumber = htData["StrViceNumber"].ToString();
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- //this.PublicFunctionRows();
- }
- }
- else if ( item.Name.Trim() == "ResetDate" )
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.GetDateSuperSmallForm frm = new CameraControlBook.SuperSmallForm.GetDateSuperSmallForm();
- frm.IsValueNull = false;
- frm.ShowDialog();
- if ( !frm.IsOK )
- {
- return;
- }
- if ( MessageBoxCustom.Show( "您确定要重置拍摄日期吗?", "温馨提示", MessageBoxButtons.YesNo ) == DialogResult.No )
- {
- return;
- }
- DateTime strTime = SDateTime.Now;
- Hashtable htData = (Hashtable)item.Tag;
- List<Helper.CommandInfo> clist = new List<CommandInfo>();
- LYFZ.Model.Model_ErpOrdersPhotography model = pbll.GetModel( Convert.ToInt32( htData["StrSightsID"] ) );
- model.Ordpg_PhotographyTime = Convert.ToDateTime( frm.StrValue );
- model.Ordpg_UpdateDateTime = strTime;
- model.Ordpg_UpdateName = StrUserID;
- clist.Add( pbll.GetUpdateCommandInfo( model ) );
- string StrContent = "[重置拍摄日期] 订单号为:" + htData["StrNumber"] + ",将" + htData["StrSightsName"] + "的拍摄日期由" + htData["StrOldDate"] + "改为" + frm.StrValue;
- clist.Add( slogbll.GetAddCommandInfo( LYFZ.BLL.BLL_ErpSystemLogs.GetWriteLogModel( LYFZ.EnumPublic.SystemLogsType.订单流程重置, StrContent, StrUserID, StrUserName, LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.User_IP ) ) );
- if ( clist.Count > 0 )
- {
- if ( LYFZ.BLL.BaseBllOperate.ExecuteSqlTran( clist ) > 0 )
- {
- new System.Threading.Thread( new System.Threading.ThreadStart( delegate ()
- {
- LYFZ.BLL.BLL_ErpOrderDigitalStatus.UpdateDigitalStatus( htData["StrNumber"].ToString(), EnumPublic.OrderDigitalStatusEnum.开单 );
- } ) ).Start();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- //this.PublicFunctionRows();
- MessageBoxCustom.Show( "重置成功!" );
- }
- else
- {
- MessageBoxCustom.Show( "重置失败!" );
- }
- }
- }
- else if ( item.Name.Trim() == "RemakeRecord" )
- {
- Hashtable htData = (Hashtable)item.Tag;
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.OrderSightsRemakeRecordSmallForm frm = new SetSmallForm.OrderSightsRemakeRecordSmallForm();
- frm.StrRemakeRecordType = EnumPublic.EnumRetakeType.拍照重拍;
- frm.StrOrdNumber = htData["StrNumber"].ToString().Trim();
- frm.StrSightsID = htData["StrSightsIDNumber"].ToString().Trim();
- frm.IsCompetence = Convert.ToBoolean( htData["IsCompetence"] );
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- //this.PublicFunctionRows();
- }
- }
- }
- /// <summary>
- /// 点击列标头排序
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_ColumnHeaderMouseClick( object sender, DataGridViewCellMouseEventArgs e )
- {
- if ( e.Button == MouseButtons.Left )
- {
- string StrColumnName = GetHeaderColumText( 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,tb_ErpOrdersPhotography.ID";
- }
- else
- {
- this.StrSortField = "Ord_CreateDateTime " + this.StrSortOrder + ",Ordv_DigitalNumber,tb_ErpOrdersPhotography.ID";
- }
- this.StrCurrentClickField = StrColumnName;
- this.PublicFunctionRows();
- }
- }
- /// <summary>
- /// 当前点击的字段
- /// </summary>
- string StrCurrentClickField = "";
- /// <summary>
- /// 排序字段
- /// </summary>
- string StrSortField = "Ord_CreateDateTime DESC,Ordv_DigitalNumber,tb_ErpOrdersPhotography.ID";
- /// <summary>
- /// 排序顺序
- /// </summary>
- string StrSortOrder = "DESC";
- /// <summary>
- /// 创建行
- /// </summary>
- void PublicFunctionRows()
- {
- this.dgvData.dgvCurrentColumnOriginalSet = "JID,Ord_Number,Ord_Type,Ordv_ViceNumber,订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,欠款,拍摄名称,拍摄状态,是否重拍,拍摄日期,摄影师,摄影助理,化妆师,化妆助理,引导师,引导助理,选衣状态,选片状态,取件状态,会员卡号";
- string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0001.ToString().Trim();
- if ( (LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.MemberCardShowHide) )
- {
- this.dgvData.dgvFixedHideColumn = "JID,Ord_Number,Ord_Type,Ordv_ViceNumber,会员卡号" + versionHideString;
- }
- else
- {
- this.dgvData.dgvFixedHideColumn = "JID,Ord_Number,Ord_Type,Ordv_ViceNumber" + versionHideString;
- }
- 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 ) )
- {
- this.cmbQueryText.Text = LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber;
- DataTable dt = orbll.GetView_Custom( "tb_ErpOrder", StrWhere: "Ord_SinceOrderNumber = '" + LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber + "' And Ord_Type in ('0','1','2')", ShowColumnName: "ID" ).Tables[0];
- if ( dt.Rows.Count <= 0 )
- {
- this.dgvData.DataColumns( this.dgvData.dgvCurrentColumnOriginalSet, this.dgvData.dgvFixedHideColumn ); return;
- }
- else
- {
- 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" );
- StrQueryCondition = StrWhere + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupQueryOrderClickWhere( this.cmbtreevStoreName, "Ord_DividedShop" );
- }
- }
- else
- {
- StrQueryCondition = this.GetWhereStr();
- }
- int intTopCount = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
- List<string> listColumns = new List<string>( StrSortField.Replace( " DESC", "" ).Replace( " ASC", "" ).Split( ',' ) );
- Hashtable htData = LYFZ.ComponentLibrary.DataGridOrderView.GetData_OrderPhotographed( this.dgvData, dictColumns, listColumns, StrQueryCondition, intTopCount,
- this.StrSortField, this.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"] ) );
- }
- public string GetHeaderColumText( string txt )
- {
- switch ( txt )
- {
- 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 "Ordpg_Sights";
- case "拍照状态":
- return "Ordpg_PhotographyStatus";
- case "拍摄状态":
- return "Ordpg_PhotographyStatus";
- case "是否重拍":
- return "Ordrr_SightsIDNumber";
- case "拍摄日期":
- return "Ordpg_PhotographyTime";
- case "摄影师":
- return "Ordpg_Photographer";
- case "摄影助理":
- return "Ordpg_PhotographyAssistant";
- case "化妆师":
- return "Ordpg_MakeupArtist";
- case "化妆助理":
- return "Ordpg_MakeupAssistant";
- case "引导师":
- return "Ordpg_BootDivision";
- case "引导助理":
- return "Ordpg_BootDivisionAssistant";
- case "选衣状态":
- return "Ordv_ClothingStatus";
- case "选片状态":
- return "Ordv_FilmSelectionStatus";
- case "取件状态":
- return "Ords_ProductPickupIntStatus";
- case "会员卡号":
- return "Mc_CradNumber";
- default:
- return "";
- }
- }
- /// <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( this.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( "OrderArrears" ) && DictData["OrderArrears"].Trim().Length > 0 )
- {
- StrWhere += " and (套系金额 + isnull(加挑金额,0) - isnull(收款金额,0)) > 0 ";
- }
- if ( DictData.ContainsKey( "PhotographStatus" ) && DictData["PhotographStatus"].Trim().Length > 0 )
- {
- StrWhere += " and Ordpg_PhotographyStatus = '" + DictData["PhotographStatus"].Trim() + "'";
- }
- if ( DictData.ContainsKey( "OrdersPerson" ) && DictData["OrdersPerson"].Trim().Length > 0 )
- {
- StrWhere += " and Ord_OrderPersonName like '%" + DictData["OrdersPerson"].Trim() + "%'";
- }
- if ( DictData.ContainsKey( "Photographer" ) && DictData["Photographer"].Trim().Length > 0 )
- {
- StrWhere += " and Ordpg_Photographer = '" + DictData["Photographer"].Trim() + "'";
- }
- if ( DictData.ContainsKey( "MakeupArtistName" ) && DictData["MakeupArtistName"].Trim().Length > 0 )
- {
- StrWhere += " and Ordpg_MakeupArtist = '" + DictData["MakeupArtistName"].Trim() + "'";
- }
- if ( DictData.ContainsKey( "BootDivisionName" ) && DictData["BootDivisionName"].Length > 0 )
- {
- StrWhere += " and Ordpg_BootDivision = '" + DictData["BootDivisionName"].Trim() + "'";
- }
- if ( DictData.ContainsKey( "CustomerSource" ) && DictData["CustomerSource"].Trim().Length > 0 )
- {
- StrWhere += " and Ord_CustomerSource = '" + DictData["CustomerSource"].Trim() + "'";
- }
- if ( DictData.ContainsKey( "PhotographyCategory" ) && DictData["PhotographyCategory"].Trim().Length > 0 )
- {
- StrWhere += " and Ord_PhotographyCategory in (" + DictData["PhotographyCategory"].Trim() + ")";
- }
- if ( DictData.ContainsKey( "SeriesName" ) && DictData["SeriesName"].Length > 0 )
- {
- StrWhere += " and Ord_SeriesName = '" + DictData["SeriesName"].Trim() + "'";
- }
- if ( DictData.ContainsKey( "QueryDateTimeStart" ) && DictData["QueryDateTimeStart"].Trim().Length > 0 && DictData.ContainsKey( "QueryDateTimeEnd" ) && DictData["QueryDateTimeEnd"].Trim().Length > 0 )
- {
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime( "Ordpg_PhotographyTime", DictData["QueryDateTimeStart"].Trim(), DictData["QueryDateTimeEnd"].Trim() );
- }
- if ( DictData.ContainsKey( "RemakeStatus" ) && DictData["RemakeStatus"].Trim().Length > 0 )
- {
- StrWhere += " and (select Count(ID) from tb_ErpOrderRetakeRecord where Ordrr_SightsIDNumber = Ordpg_IDNumber) > 0 ";
- }
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL( this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion, StrOrdType: "0,1,2" );
- return StrWhere;
- }
- }
- }
|