123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976 |
- using LYFZ.ComponentLibrary;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace LYFZ.Software.MainBusiness.CameraControlBook
- {
- public partial class ProcessMonitorFormMain : LYFZ.Software.UI.CameraControlBook.ProcessMonitorFormMain
- {
- public ProcessMonitorFormMain()
- {
- this.UcPagerEx1.EventPaging += UcPagerEx1_EventPaging;
- this.flowLayoutPanel1.Height = 34;
- }
- /// <summary>
- /// 是否显示写真版
- /// </summary>
- bool IsPortrait = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.IsEnablePhotoEdition;
- /// <summary>
- /// 是否选择显示按钮上的版本
- /// </summary>
- bool IsChk = false;
- bool IsFirstRun = true;
- LYFZ.BLL.BLL_ErpOrder orbll = new LYFZ.BLL.BLL_ErpOrder();
- LYFZ.BLL.BLL_ErpSystemConfigure sgbll = new BLL.BLL_ErpSystemConfigure();
- LYFZ.BLL.BLL_ErpOrderProcessMonitor ordpmbll = new BLL.BLL_ErpOrderProcessMonitor();
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void ProcessMonitorFormMain_Shown(object sender, EventArgs e)
- {
- #region
- this.chkKidsVersion.Visible = false;
- this.chkDressVersion.Visible = false;
- this.chkPortraitVersion.Visible = false;
- switch (LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- {
- case LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.旗舰版:
- this.chkKidsVersion.Visible = true;
- this.chkDressVersion.Visible = true;
- if (IsPortrait)
- { this.chkPortraitVersion.Visible = true; }
- break;
- case LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.婚纱版:
- if (IsPortrait)
- { this.chkPortraitVersion.Visible = true; this.chkDressVersion.Visible = true; }
- break;
- case LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.儿童版:
- if (IsPortrait)
- { this.chkPortraitVersion.Visible = true; this.chkKidsVersion.Visible = true; }
- break;
- }
- #endregion
- #region 权限
- //if (!LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.ProcessMonitoring, LYFZ.CustomAttributes.OperatingAuthority.Setting))
- //{ this.btnWarningSet.Enabled = false; }
- #endregion
- this.panelEx5.BackColor = Color.LightSteelBlue;
- this.panelEx6.BackColor = Color.Green;
- this.panelEx7.BackColor = Color.Red;
- this.panelEx8.BackColor = Color.Orange;
- PublicFunctionRows();
- this.IsFirstRun = false;
- this.ProcessMonitorFormMain_Resize(this, null);
- }
- /// <summary>
- /// 回车
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override 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>
- protected override void ProcessMonitorFormMain_Load(object sender, EventArgs e)
- {
- if (this.dgvData.Columns.Count <= 0)
- {
- string[] strColumn = ("订单号,订单类型,客户姓名,客户电话,客户性别,接单人,订单日期,开拍日期,拍照日期,选片日期,拍照,选片,看样,件齐,取走").Split(',');
- for (int i = 0; i < strColumn.Length; i++)
- {
- DataGridViewColumn column = null;
- column = new DataGridViewColumn();
- column.ReadOnly = true;
- column.Name = strColumn[i].ToString().Trim();
- column.HeaderText = strColumn[i].ToString().Trim();
- this.dgvData.Columns.Add(column);
- }
- //this.dgvData.DataColumns(strColumn, LYFZ.Software.MainBusiness.CommonLogical.CacheData.StrOrderReportHideField);
- }
- }
- /// <summary>
- /// 创建行
- /// </summary>
- private void PublicFunctionRows()
- {
- this.UcPagerEx1.PageCurrent = 1;
- this.UcPagerEx1.PageSize = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();//3;分页条数
- this.UcPagerEx1.Bind();
- }
- /// <summary>
- /// 分页前数据,便于展开时用来查询订单的子数据
- /// </summary>
- DataTable tbl = new DataTable();
- /// <summary>
- /// 画分页
- /// </summary>
- /// <param name="e"></param>
- /// <returns></returns>
- private int UcPagerEx1_EventPaging(UCPager.EventPagingArg e)
- {
- LYFZ.UCPager.PageData pageData = new LYFZ.UCPager.PageData();
- pageData.TableName = "AView_WarningSet";
- pageData.PageIndex = this.UcPagerEx1.PageCurrent;
- pageData.PageSize = this.UcPagerEx1.PageSize;
- pageData.QueryCondition = GetWhereStr();
- pageData.QueryFieldName = "Ord_Type,Ord_CustomerListID,Ord_Number,Ord_ViceNumber,订单号,订单类型,姓名1,姓名2,电话1,电话2,接单人,订单日期,开拍日期,拍照日期,选片日期,拍照,选片,看样,件齐,取走";
- pageData.OrderStr = "ID";
- pageData.OrderType = 1;
- string strType = GetVersion();//获取版本
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, BackgroundWorker backgroundWorker)
- {
- tbl = pageData.QueryDataTable().Tables[0];
- string StrM = "";
- string StrV = "";
- for (int i = 0; i < tbl.Rows.Count; i++)
- {
- if (i == 0)
- { StrM += "'" + tbl.Rows[i]["Ord_Number"].ToString().Trim() + "'"; StrV += "'" + tbl.Rows[i]["Ord_ViceNumber"].ToString().Trim() + "'"; }
- else
- { StrM += ",'" + tbl.Rows[i]["Ord_Number"].ToString().Trim() + "'"; StrV += ",'" + tbl.Rows[i]["Ord_ViceNumber"].ToString().Trim() + "'"; }
- }
- string ExecuteSql = "select Cus_CustomerNumber, Cus_Name, Cus_Sex, Cus_Telephone FROM dbo.tb_ErpCustomer;";
- ExecuteSql += "select OPlist_ViceNumber, OPlist_CompletedStatus, OPlist_PickupStatus from dbo.tb_ErpOrderProductList where OPlist_Type='2' and OPlist_PickupTime != '' and OPlist_ViceNumber in (" + StrV + ") ;";
- ExecuteSql += "select OPlist_ViceNumber,OPlist_PickupStatus,OPlist_CompletedStatus from dbo.tb_ErpOrderProductList where OPlist_Type = '2' and OPlist_ViceNumber in (" + StrV + ") ;";
- ExecuteSql += "select Ordpg_ViceNumber,Ordpg_Sights,Ordpg_PhotographyStatus,dbo.fn_CheckUserIDGetUserName(Ordpg_Photographer) AS Ordpg_Photographer,Ordpg_PhotographyTime,dbo.fn_CheckUserIDGetUserName(Ordpg_MakeupArtist) AS Ordpg_MakeupArtist FROM tb_ErpOrdersPhotography where Ordpg_ViceNumber in (" + StrV + ");";
- ExecuteSql += "select Ordpm_Number,Ordpm_ViceNumber,Ordpm_ProcessType,Ordpm_ProcessDays,Ordpm_ProcessDate,Ordpm_ProcessRemark,Ordpm_UpdateDateTime,Ordpm_UpdateName from tb_ErpOrderProcessMonitor where Ordpm_Number in (" + StrM + ");";
- DataSet dsData = orbll.GetView_Custom(ExecuteSql);
- DataTable tbl_Client = dsData.Tables["ds"];
- tbl_Client.PrimaryKey = new DataColumn[] { tbl_Client.Columns["Cus_CustomerNumber"] };
- DataTable tbl_PickupTime = dsData.Tables["ds1"];
- DataTable tbl_PickupStatus = dsData.Tables["ds2"];
- DataTable tbl_Sights = dsData.Tables["ds3"];
- DataTable tblP = dsData.Tables["ds4"];
- try
- {
- this.Invoke(new LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.UpdateControl(delegate()
- {
- #region 列标题
- this.dgvData.Columns.Clear();
- this.dgvData.Rows.Clear();
- this.dgvData.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
- this.dgvData.ColumnHeadersHeight = 24;
- DataGridViewColumn dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "strNumber";
- dgvcl.Name = "strNumber";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 120;
- dgvcl.Visible = false;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "strViceNumber";
- dgvcl.Name = "strViceNumber";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 120;
- dgvcl.Visible = false;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "订单号";
- dgvcl.Name = "strNumber";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 120;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "订单类型";
- dgvcl.Name = "strType";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 120;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- switch (strType)
- {
- case "": dgvcl.HeaderText = "男/家姓名"; break;
- case "1": dgvcl.HeaderText = "家长姓名"; break;
- case "0": dgvcl.HeaderText = "男宾姓名"; break;
- case "2": dgvcl.HeaderText = "客户姓名"; break;
- }
- dgvcl.Name = "strName1";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 80;
- this.dgvData.Columns.Add(dgvcl);
- if (strType == "" || strType == "0" || strType == "1")
- {
- dgvcl = new DataGridViewColumn();
- switch (strType)
- {
- case "": dgvcl.HeaderText = "女/宝姓名"; break;
- case "0": dgvcl.HeaderText = "女宾姓名"; break;
- case "1": dgvcl.HeaderText = "宝贝姓名"; break;
- }
- dgvcl.Name = "strName2";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 80;
- this.dgvData.Columns.Add(dgvcl);
- }
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "接单人";
- dgvcl.Name = "strStore";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 120;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "订单日期";
- dgvcl.Name = "strOrdDate";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 70;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "拍照日期";
- dgvcl.Name = "strPhotographDate";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 70;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "选片日期";
- dgvcl.Name = "strSelectionFilmDate";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 70;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "拍照";
- dgvcl.Name = "strPhotograph";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 65;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "拍完";
- dgvcl.Name = "strPhotographOK";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 65;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "选片";
- dgvcl.Name = "strSelectionFilm";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 65;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "看样";
- dgvcl.Name = "strLookSample";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 65;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "件齐";
- dgvcl.Name = "strPieceQi";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 65;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "取走";
- dgvcl.Name = "strTakeAway";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 65;
- this.dgvData.Columns.Add(dgvcl);
- dgvcl = new DataGridViewColumn();
- switch (strType)
- {
- case "": dgvcl.HeaderText = "男/家电话"; break;
- case "0": dgvcl.HeaderText = "男宾电话"; break;
- case "1": dgvcl.HeaderText = "家长电话"; break;
- case "2": dgvcl.HeaderText = "客户电话"; break;
- }
- dgvcl.Name = "strPhone1";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 80;
- this.dgvData.Columns.Add(dgvcl);
- if (strType == "" || strType == "0")
- {
- dgvcl = new DataGridViewColumn();
- dgvcl.HeaderText = "女宾电话";
- dgvcl.Name = "strPhone2";
- dgvcl.ReadOnly = true;
- dgvcl.Width = 80;
- this.dgvData.Columns.Add(dgvcl);
- }
- #endregion
- #region 获取预警设置数据
- string txtA = "";
- string txtB = "";
- string txtC = "";
- string txtD = "";
- string txtE = "";
- string txtF = "";
- DataTable tbl_Scon = sgbll.GetSystemConfigureCustom("Sconfig_Code,Sconfig_Value", "Sconfig_Remark = 'Alert'").Tables[0];
- for (int i = 0; i < tbl_Scon.Rows.Count; i++)
- {
- if (tbl_Scon.Rows[i]["Sconfig_Code"].ToString().Trim() == "ProcessMonitor_OrderLater_NotShot")
- { txtA = tbl_Scon.Rows[i]["Sconfig_Value"].ToString().Trim(); }
- else if (tbl_Scon.Rows[i]["Sconfig_Code"].ToString().Trim() == "ProcessMonitor_photographedLater_NotEnd")
- { txtB = tbl_Scon.Rows[i]["Sconfig_Value"].ToString().Trim(); }
- else if (tbl_Scon.Rows[i]["Sconfig_Code"].ToString().Trim() == "ProcessMonitor_photograpOKLater_NotSelect")
- { txtC = tbl_Scon.Rows[i]["Sconfig_Value"].ToString().Trim(); }
- else if (tbl_Scon.Rows[i]["Sconfig_Code"].ToString().Trim() == "ProcessMonitor_SelectOKLater_NotLook")
- { txtD = tbl_Scon.Rows[i]["Sconfig_Value"].ToString().Trim(); }
- else if (tbl_Scon.Rows[i]["Sconfig_Code"].ToString().Trim() == "ProcessMonitor_SelectOKLater_NotQi")
- { txtE = tbl_Scon.Rows[i]["Sconfig_Value"].ToString().Trim(); }
- else if (tbl_Scon.Rows[i]["Sconfig_Code"].ToString().Trim() == "ProcessMonitor_SelectOKLater_NotTake")
- { txtF = tbl_Scon.Rows[i]["Sconfig_Value"].ToString().Trim(); }
- }
- #endregion
- #region 行
- for (int i = 0; i < tbl.Rows.Count; i++)
- {
- string[] ArrayClient = tbl.Rows[i]["Ord_CustomerListID"].ToString().Trim().Split(',');
- Hashtable htData_Client = LYFZ.Software.MainBusiness.DoorCityProcess.PublicGetTableName.GetClientData(tbl_Client, ArrayClient, tbl.Rows[i]["Ord_Type"].ToString().Trim());
- Hashtable htData_Sights = LYFZ.Software.MainBusiness.DoorCityProcess.PublicGetTableName.GetSightsData(tbl_Sights, tbl.Rows[i]["Ord_ViceNumber"].ToString().Trim(), tbl.Rows[i]["Ord_Type"].ToString().Trim());
- string strPhotographyTimeStart = htData_Sights["Ordpg_PhotographyTimeStart"].ToString();
- string strPhotographyTimeEnd = htData_Sights["Ordpg_PhotographyTimeEnd"].ToString();
- DataGridViewRow dgvl = new DataGridViewRow();
- dgvl.Height = 25;
- DataGridViewCell cell = null;
- cell = new DataGridViewTextBoxCell();
- cell.Value = tbl.Rows[i]["Ord_Number"].ToString().Trim();
- dgvl.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = tbl.Rows[i]["Ord_ViceNumber"].ToString().Trim();
- dgvl.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = tbl.Rows[i]["订单号"].ToString().Trim();
- dgvl.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = tbl.Rows[i]["订单类型"].ToString().Trim();
- dgvl.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = htData_Client["strManName"];// tbl.Rows[i]["姓名1"].ToString().Trim();
- dgvl.Cells.Add(cell);
- if (strType == "" || strType == "0" || strType == "1")
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = htData_Client["strWoManName"];//tbl.Rows[i]["姓名2"].ToString().Trim();
- dgvl.Cells.Add(cell);
- }
- cell = new DataGridViewTextBoxCell();
- cell.Value = tbl.Rows[i]["接单人"].ToString().Trim();
- dgvl.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = tbl.Rows[i]["订单日期"].ToString().Trim();
- dgvl.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = strPhotographyTimeEnd;
- dgvl.Cells.Add(cell);
- cell = new DataGridViewTextBoxCell();
- cell.Value = tbl.Rows[i]["选片日期"].ToString().Trim();
- dgvl.Cells.Add(cell);
- #region 拍照
- cell = new DataGridViewTextBoxCell();
- cell.Style.BackColor = Color.LightSteelBlue;
- string strPz = htData_Sights["Ordpg_PhotographyStatus"].ToString();
- cell.Value = strPz;
- DataRow[] dtRow1 = tblP.Select("Ordpm_Number = '" + tbl.Rows[i]["Ord_Number"].ToString().Trim() + "' and Ordpm_ViceNumber = '" + tbl.Rows[i]["Ord_ViceNumber"].ToString().Trim() + "' and Ordpm_ProcessType = '拍照'");
- if (dtRow1.Length > 0)
- {
- string StrToolTip = "当前为(拍照)延期\r\n延 期:3天\r\n延期至:" + Convert.ToDateTime(dtRow1[0]["Ordpm_ProcessDate"]).ToString("yyyy-MM-dd") + "\r\n原 因:" + dtRow1[0]["Ordpm_ProcessRemark"].ToString().Trim().Replace("\r\n", " ");
- cell.ToolTipText = StrToolTip;
- }
- else { cell.ToolTipText = "无"; }
- if (strPz == "未拍" || strPz == "拍摄中")
- {
- if (dtRow1.Length > 0)
- {
- if (SDateTime.Now <= Convert.ToDateTime(dtRow1[0]["Ordpm_ProcessDate"]))
- { cell.Style.BackColor = Color.Orange; }
- else { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if ((SDateTime.Now - Convert.ToDateTime(tbl.Rows[i]["订单日期"])).Days >= Convert.ToInt32(txtA))
- { cell.Style.BackColor = Color.Red; }
- }
- }
- else { cell.Style.BackColor = Color.Green; }
- dgvl.Cells.Add(cell);
- #endregion
- #region 拍完
- cell = new DataGridViewTextBoxCell();
- cell.Style.BackColor = Color.LightSteelBlue;
- string StrNotPw = "未拍完";
- if (strPz == "OK")
- { StrNotPw = "OK"; }
- cell.Value = StrNotPw;//拍完
- DataRow[] dtRow2 = tblP.Select("Ordpm_Number = '" + tbl.Rows[i]["Ord_Number"].ToString().Trim() + "' and Ordpm_ViceNumber = '" + tbl.Rows[i]["Ord_ViceNumber"].ToString().Trim() + "' and Ordpm_ProcessType = '拍完'");
- if (dtRow2.Length > 0)
- {
- string StrToolTip = "当前为(拍完)延期\r\n延 期:3天\r\n延期至:" + Convert.ToDateTime(dtRow2[0]["Ordpm_ProcessDate"]).ToString("yyyy-MM-dd") + "\r\n原 因:" + dtRow2[0]["Ordpm_ProcessRemark"].ToString().Trim().Replace("\r\n", " ");
- cell.ToolTipText = StrToolTip;
- }
- else { cell.ToolTipText = "无"; }
- if (StrNotPw != "OK")
- {
- if (dtRow2.Length > 0)
- {
- if (SDateTime.Now <= Convert.ToDateTime(dtRow2[0]["Ordpm_ProcessDate"]))
- { cell.Style.BackColor = Color.Orange; }
- else { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- //如果未开拍,则用订单日期,如果已开拍则用开始拍照日期
- if (!String.IsNullOrEmpty(strPhotographyTimeStart))
- {
- if ((SDateTime.Now - Convert.ToDateTime(strPhotographyTimeStart)).Days >= Convert.ToInt32(txtB))
- { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if ((SDateTime.Now - Convert.ToDateTime(tbl.Rows[i]["订单日期"])).Days >= (Convert.ToInt32(txtA) + Convert.ToInt32(txtB)))
- { cell.Style.BackColor = Color.Red; }
- }
- }
- }
- else { cell.Style.BackColor = Color.Green; }
- dgvl.Cells.Add(cell);
- #endregion
- #region 选片
- cell = new DataGridViewTextBoxCell();
- cell.Style.BackColor = Color.LightSteelBlue;
- cell.Value = tbl.Rows[i]["选片"].ToString().Trim();
- DataRow[] dtRow3 = tblP.Select("Ordpm_Number = '" + tbl.Rows[i]["Ord_Number"].ToString().Trim() + "' and Ordpm_ViceNumber = '" + tbl.Rows[i]["Ord_ViceNumber"].ToString().Trim() + "' and Ordpm_ProcessType = '选片'");
- if (dtRow3.Length > 0)
- {
- string StrToolTip = "当前为(选片)延期\r\n延 期:3天\r\n延期至:" + Convert.ToDateTime(dtRow3[0]["Ordpm_ProcessDate"]).ToString("yyyy-MM-dd") + "\r\n原 因:" + dtRow3[0]["Ordpm_ProcessRemark"].ToString().Trim().Replace("\r\n", " ");
- cell.ToolTipText = StrToolTip;
- }
- else { cell.ToolTipText = "无"; }
- if (tbl.Rows[i]["选片"].ToString().Trim() == "未选")
- {
- if (dtRow3.Length > 0)
- {
- if (SDateTime.Now <= Convert.ToDateTime(dtRow3[0]["Ordpm_ProcessDate"]))
- { cell.Style.BackColor = Color.Orange; }
- else { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if (!String.IsNullOrEmpty(strPhotographyTimeEnd))
- {
- if ((SDateTime.Now - Convert.ToDateTime(strPhotographyTimeEnd)).Days >= Convert.ToInt32(txtC))
- { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if ((SDateTime.Now - Convert.ToDateTime(tbl.Rows[i]["订单日期"])).Days >= (Convert.ToInt32(txtA) + Convert.ToInt32(txtB) + Convert.ToInt32(txtC)))
- { cell.Style.BackColor = Color.Red; }
- }
- }
- }
- else { cell.Style.BackColor = Color.Green; }
- dgvl.Cells.Add(cell);
- #endregion
- #region 看样
- cell = new DataGridViewTextBoxCell();
- cell.Style.BackColor = Color.LightSteelBlue;
- cell.Value = tbl.Rows[i]["看样"].ToString().Trim();
- DataRow[] dtRow4 = tblP.Select("Ordpm_Number = '" + tbl.Rows[i]["Ord_Number"].ToString().Trim() + "' and Ordpm_ViceNumber = '" + tbl.Rows[i]["Ord_ViceNumber"].ToString().Trim() + "' and Ordpm_ProcessType = '看样'");
- if (dtRow4.Length > 0)
- {
- string StrToolTip = "当前为(看样)延期\r\n延 期:3天\r\n延期至:" + Convert.ToDateTime(dtRow4[0]["Ordpm_ProcessDate"]).ToString("yyyy-MM-dd") + "\r\n原 因:" + dtRow4[0]["Ordpm_ProcessRemark"].ToString().Trim().Replace("\r\n", " ");
- cell.ToolTipText = StrToolTip;
- }
- else { cell.ToolTipText = "无"; }
- if (tbl.Rows[i]["看样"].ToString().Trim() == "未看")
- {
- if (dtRow4.Length > 0)
- {
- if (SDateTime.Now <= Convert.ToDateTime(dtRow4[0]["Ordpm_ProcessDate"]))
- { cell.Style.BackColor = Color.Orange; }
- else { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if (!String.IsNullOrEmpty(tbl.Rows[i]["选片日期"].ToString()))
- {
- if ((SDateTime.Now - Convert.ToDateTime(tbl.Rows[i]["选片日期"])).Days >= Convert.ToInt32(txtD))
- { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if (!String.IsNullOrEmpty(strPhotographyTimeEnd))
- {
- if ((SDateTime.Now - Convert.ToDateTime(strPhotographyTimeEnd)).Days >= (Convert.ToInt32(txtC) + Convert.ToInt32(txtD)))
- { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if (!String.IsNullOrEmpty(strPhotographyTimeStart))
- {
- if ((SDateTime.Now - Convert.ToDateTime(strPhotographyTimeStart)).Days >= (Convert.ToInt32(txtB) + Convert.ToInt32(txtC) + Convert.ToInt32(txtD)))
- { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if (!String.IsNullOrEmpty(tbl.Rows[i]["订单日期"].ToString()))
- {
- if ((SDateTime.Now - Convert.ToDateTime(tbl.Rows[i]["订单日期"])).Days >= (Convert.ToInt32(txtB) + Convert.ToInt32(txtC) + Convert.ToInt32(txtD)))
- { cell.Style.BackColor = Color.Red; }
- }
- }
- }
- }
- }
- }
- else { cell.Style.BackColor = Color.Green; }
- dgvl.Cells.Add(cell);
- #endregion
- #region 件齐
- cell = new DataGridViewTextBoxCell();
- cell.Style.BackColor = Color.LightSteelBlue;
- cell.Value = tbl.Rows[i]["件齐"].ToString().Trim();
- DataRow[] dtRow5 = tblP.Select("Ordpm_Number = '" + tbl.Rows[i]["Ord_Number"].ToString().Trim() + "' and Ordpm_ViceNumber = '" + tbl.Rows[i]["Ord_ViceNumber"].ToString().Trim() + "' and Ordpm_ProcessType = '件齐'");
- if (dtRow5.Length > 0)
- {
- string StrToolTip = "当前为(件齐)延期\r\n延 期:3天\r\n延期至:" + Convert.ToDateTime(dtRow5[0]["Ordpm_ProcessDate"]).ToString("yyyy-MM-dd") + "\r\n原 因:" + dtRow5[0]["Ordpm_ProcessRemark"].ToString().Trim().Replace("\r\n", " ");
- cell.ToolTipText = StrToolTip;
- }
- else { cell.ToolTipText = "无"; }
- if (tbl.Rows[i]["件齐"].ToString().Trim() == "未齐")
- {
- if (dtRow5.Length > 0)
- {
- if (SDateTime.Now <= Convert.ToDateTime(dtRow5[0]["Ordpm_ProcessDate"]))
- { cell.Style.BackColor = Color.Orange; }
- else { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if (!String.IsNullOrEmpty(tbl.Rows[i]["选片日期"].ToString()))
- {
- if ((SDateTime.Now - Convert.ToDateTime(tbl.Rows[i]["选片日期"])).Days >= Convert.ToInt32(txtD))
- { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if (!String.IsNullOrEmpty(strPhotographyTimeEnd))
- {
- if ((SDateTime.Now - Convert.ToDateTime(strPhotographyTimeEnd)).Days >= (Convert.ToInt32(txtC) + Convert.ToInt32(txtD)))
- { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if (!String.IsNullOrEmpty(strPhotographyTimeStart))
- {
- if ((SDateTime.Now - Convert.ToDateTime(strPhotographyTimeStart)).Days >= (Convert.ToInt32(txtB) + Convert.ToInt32(txtC) + Convert.ToInt32(txtD)))
- { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if (!String.IsNullOrEmpty(tbl.Rows[i]["订单日期"].ToString()))
- {
- if ((SDateTime.Now - Convert.ToDateTime(tbl.Rows[i]["订单日期"])).Days >= (Convert.ToInt32(txtB) + Convert.ToInt32(txtC) + Convert.ToInt32(txtD)))
- { cell.Style.BackColor = Color.Red; }
- }
- }
- }
- }
- }
- }
- else { cell.Style.BackColor = Color.Green; }
- dgvl.Cells.Add(cell);
- #endregion
- #region 取走
- cell = new DataGridViewTextBoxCell();
- cell.Style.BackColor = Color.LightSteelBlue;
- cell.Value = tbl.Rows[i]["取走"].ToString().Trim();
- DataRow[] dtRow = tblP.Select("Ordpm_Number = '" + tbl.Rows[i]["Ord_Number"].ToString().Trim() + "' and Ordpm_ViceNumber = '" + tbl.Rows[i]["Ord_ViceNumber"].ToString().Trim() + "' and Ordpm_ProcessType = '取走'");
- if (dtRow.Length > 0)
- {
- string StrToolTip = "当前为(取走)延期\r\n延 期:3天\r\n延期至:" + Convert.ToDateTime(dtRow[0]["Ordpm_ProcessDate"]).ToString("yyyy-MM-dd") + "\r\n原 因:" + dtRow[0]["Ordpm_ProcessRemark"].ToString().Trim().Replace("\r\n", " ");
- cell.ToolTipText = StrToolTip;
- }
- else { cell.ToolTipText = "无"; }
- if (tbl.Rows[i]["取走"].ToString().Trim() == "未取")
- {
- if (dtRow.Length > 0)
- {
- if (SDateTime.Now <= Convert.ToDateTime(dtRow[0]["Ordpm_ProcessDate"]))
- { cell.Style.BackColor = Color.Orange; }
- else { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if (!String.IsNullOrEmpty(tbl.Rows[i]["选片日期"].ToString()))
- {
- if ((SDateTime.Now - Convert.ToDateTime(tbl.Rows[i]["选片日期"])).Days >= Convert.ToInt32(txtD))
- { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if (!String.IsNullOrEmpty(strPhotographyTimeEnd))
- {
- if ((SDateTime.Now - Convert.ToDateTime(strPhotographyTimeEnd)).Days >= (Convert.ToInt32(txtC) + Convert.ToInt32(txtD)))
- { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if (!String.IsNullOrEmpty(strPhotographyTimeStart))
- {
- if ((SDateTime.Now - Convert.ToDateTime(strPhotographyTimeStart)).Days >= (Convert.ToInt32(txtB) + Convert.ToInt32(txtC) + Convert.ToInt32(txtD)))
- { cell.Style.BackColor = Color.Red; }
- }
- else
- {
- if (!String.IsNullOrEmpty(tbl.Rows[i]["订单日期"].ToString()))
- {
- if ((SDateTime.Now - Convert.ToDateTime(tbl.Rows[i]["订单日期"])).Days >= (Convert.ToInt32(txtB) + Convert.ToInt32(txtC) + Convert.ToInt32(txtD)))
- { cell.Style.BackColor = Color.Red; }
- }
- }
- }
- }
- }
- }
- else { cell.Style.BackColor = Color.Green; }
- dgvl.Cells.Add(cell);
- #endregion
- cell = new DataGridViewTextBoxCell();
- cell.Value = tbl.Rows[i]["电话1"].ToString().Trim();
- dgvl.Cells.Add(cell);
- if (strType == "" || strType == "0")
- {
- cell = new DataGridViewTextBoxCell();
- cell.Value = tbl.Rows[i]["电话2"].ToString().Trim();//14
- dgvl.Cells.Add(cell);
- }
- this.dgvData.Rows.Add(dgvl);
- }
- #endregion
- }));
- }
- catch
- { }
- });
- try
- {
- this.UcPagerEx1.TbDataSource = tbl;
- this.dgvData.Columns["订单号"].Frozen = true;
- }
- catch { }
- this.dgvData.ClearSelection();
- return pageData.TotalCount;
- }
- /// <summary>
- /// 获取版本
- /// </summary>
- /// <returns></returns>
- public string GetVersion()
- {
- string RetValue = "";
- if ((this.chkPortraitVersion.Checked && !this.chkKidsVersion.Checked && !this.chkDressVersion.Checked) || LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.写真版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { RetValue = "2"; }
- else if ((this.chkDressVersion.Checked && !this.chkKidsVersion.Checked && !this.chkPortraitVersion.Checked) || LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.婚纱版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { RetValue = "0"; }
- else if ((this.chkKidsVersion.Checked && !this.chkDressVersion.Checked && !this.chkPortraitVersion.Checked) || LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.儿童版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { RetValue = "1"; }
- else if ((!this.chkKidsVersion.Checked && !this.chkDressVersion.Checked && !this.chkPortraitVersion.Checked) || LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.旗舰版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { RetValue = ""; }
- return RetValue;
- }
- /// <summary>
- /// 返回要操作的条件
- /// </summary>
- /// <returns></returns>
- private string GetWhereStr()
- {
- string StrWhere = " 1=1 ";
- string StrText = this.cmbQueryText.Text.Trim().ToLower();
- if (StrText != "")
- {
- Hashtable htData = new Hashtable();
- htData["订单号"] = "";
- htData["接单人"] = "";
- htData["接单人拼音"] = "";
- htData["姓名1"] = "";
- htData["姓名拼音1"] = "";
- htData["姓名2"] = "";
- htData["姓名拼音2"] = "";
- htData["电话1"] = "";
- htData["电话2"] = "";
- string Atext = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPrefix(LYFZ.EnumPublic.OrderNumberPrefixType.儿童订单).Trim();
- string Ctext = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPrefix(LYFZ.EnumPublic.OrderNumberPrefixType.婚纱订单).Trim();
- string Dtext = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPrefix(LYFZ.EnumPublic.OrderNumberPrefixType.写真订单).Trim();
- bool Isbl = true;
- if (Atext != "" || Ctext != "" || Dtext != "")
- {
- if (LYFZ.Command.Command_Validate.IsOrderNumber(StrText))
- { htData["订单号"] = "1"; Isbl = false; }
- }
- if (LYFZ.Command.Command_Validate.IsNumber(StrText))
- {
- if (Atext == "" || Ctext == "" || Dtext == "")
- { htData["订单号"] = "1"; }
- htData["电话1"] = "1";
- htData["电话2"] = "1";
- }
- else if (LYFZ.Command.Command_Validate.IsEnglish(StrText))
- {
- if (Atext != "" || Ctext != "" || Dtext != "")
- { htData["订单号"] = "1"; }
- htData["姓名拼音1"] = "1";
- htData["姓名拼音2"] = "1";
- htData["接单人拼音"] = "1";
- }
- else if (LYFZ.Command.Command_Validate.IsChinese(StrText))
- {
- htData["姓名1"] = "1";
- htData["姓名2"] = "1";
- htData["接单人"] = "1";
- }
- else if (Isbl)
- {
- htData["订单号"] = "1";
- htData["姓名1"] = "1";
- htData["姓名拼音1"] = "1";
- htData["姓名2"] = "1";
- htData["姓名拼音2"] = "1";
- htData["电话1"] = "1";
- htData["电话2"] = "1";
- htData["接单人"] = "1";
- htData["接单人拼音"] = "1";
- }
- string strV = "";
- int i = 0;
- foreach (DictionaryEntry dic in htData)
- {
- if (dic.Value.ToString().Trim() != "")
- {
- if (i == 0)
- { strV += dic.Key + " like '%" + StrText + "%'"; }
- else
- { strV += " or " + dic.Key + " like '%" + StrText + "%'"; }
- i++;
- }
- }
- if (strV != "")
- { StrWhere += " and (" + strV + ")"; }
- }
- if (!IsChk)
- {
- if (IsPortrait)
- {
- if (LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.婚纱版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { StrWhere += " And Ord_Type in ('" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.婚纱订单) + "','" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.写真订单) + "')"; }
- else if (LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.儿童版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { StrWhere += " And Ord_Type in ('" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.儿童订单) + "','" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.写真订单) + "')"; }
- else if (LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.旗舰版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { StrWhere += " And Ord_Type in ('" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.婚纱订单) + "','" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.儿童订单) + "','" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.写真订单) + "')"; }
- }
- else
- {
- if (LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.婚纱版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { StrWhere += " And Ord_Type = '" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.婚纱订单) + "'"; }
- else if (LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.儿童版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { StrWhere += " And Ord_Type = '" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.儿童订单) + "'"; }
- else if (LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.旗舰版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { StrWhere += " And Ord_Type in ('" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.婚纱订单) + "','" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.儿童订单) + "')"; }
- }
- }
- else
- {
- if (this.chkDressVersion.Checked)
- { StrWhere += " And Ord_Type = '" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.婚纱订单) + "'"; }
- else if (this.chkKidsVersion.Checked)
- { StrWhere += " And Ord_Type = '" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.儿童订单) + "'"; }
- else if (this.chkPortraitVersion.Checked)
- { StrWhere += " And Ord_Type = '" + Convert.ToInt32(LYFZ.EnumPublic.OrderType.写真订单) + "'"; }
- }
- return StrWhere;
- }
- /// <summary>
- /// 查询
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnQuery_Click(object sender, EventArgs e)
- { PublicFunctionRows(); }
- /// <summary>
- /// 预警设置
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnWarningSet_Click(object sender, EventArgs e)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.SetProcessAlertSuperSmallForm frm = new SuperSmallForm.SetProcessAlertSuperSmallForm();
- frm.ShowDialog();
- if (frm.IsSave)
- { PublicFunctionRows(); }
- }
- /// <summary>
- /// 导出
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnExport_Click(object sender, EventArgs e)
- { this.dgvData.ExportDataTable(); }
- /// <summary>
- /// 关闭
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void btnClose_Click(object sender, EventArgs e)
- { this.Close(); }
- /// <summary>
- /// 婚纱版
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void chkDressVersion_Click(object sender, EventArgs e)
- {
- if (this.chkDressVersion.Checked)
- { this.chkPortraitVersion.Checked = false; this.chkKidsVersion.Checked = false; this.chkDressVersion.Checked = true; this.IsChk = true; }
- else { this.IsChk = false; }
- PublicFunctionRows();
- }
- /// <summary>
- /// 儿童版
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void chkKidsVersion_Click(object sender, EventArgs e)
- {
- if (this.chkKidsVersion.Checked)
- { this.chkPortraitVersion.Checked = false; this.chkKidsVersion.Checked = true; this.chkDressVersion.Checked = false; this.IsChk = true; }
- else { this.IsChk = false; }
- PublicFunctionRows();
- }
- /// <summary>
- /// 写真版
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void chkPortraitVersion_Click(object sender, EventArgs e)
- {
- if (this.chkPortraitVersion.Checked)
- { this.chkPortraitVersion.Checked = true; this.chkKidsVersion.Checked = false; this.chkDressVersion.Checked = false; this.IsChk = true; }
- else { this.IsChk = false; }
- PublicFunctionRows();
- }
- /// <summary>
- /// 双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void dgvData_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
- {
- if (this.dgvData.Rows.Count > 0)
- {
- if (e.RowIndex != -1 && e.ColumnIndex != -1)
- {
- #region 权限
- //if (!LYFZ.BLL.BLL_ErpUser.GetRights(LYFZ.BLL.BLL_ErpUser.CurrentUserRights.ProcessMonitoring, LYFZ.CustomAttributes.OperatingAuthority.Monitor_Postpone))
- //{ return; }
- #endregion
- if (this.dgvData.CurrentRow.Cells[e.ColumnIndex].Value.ToString().Trim().ToLower() != "ok")
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.ProcessExtensionSetSuperSmallForm frm = new SuperSmallForm.ProcessExtensionSetSuperSmallForm();
- frm.StrNumber = this.dgvData.CurrentRow.Cells["strNumber"].Value.ToString().Trim();
- frm.StrViceNumber = this.dgvData.CurrentRow.Cells["strViceNumber"].Value.ToString().Trim();
- frm.StrType = this.dgvData.Columns[e.ColumnIndex].HeaderText.Trim();
- frm.ShowDialog();
- if (frm.IsSaveed)
- { this.PublicFunctionRows(); }
- }
- }
- }
- }
- /// <summary>
- /// 窗体大小发生变化事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected override void ProcessMonitorFormMain_Resize(object sender, EventArgs e)
- {
- if (!IsFirstRun)
- {
- int ControlsWidth = 0;
- int ForCount = 0;
- for (int i = 0; i < this.flowLayoutPanel1.Controls.Count; i++)
- {
- if (this.flowLayoutPanel1.Controls[i].Visible)
- {
- ForCount++;
- ControlsWidth += this.flowLayoutPanel1.Controls[i].Width;
- }
- }
- ControlsWidth += ForCount * 6 + this.btnClose.Width / 2;
- int strWidth = this.Width;
- if (strWidth > ControlsWidth)
- {
- this.flowLayoutPanel1.Height = 34;
- //this.flowLayoutPanel1.Size = new Size(this.panelEx2.Width - 10, 34);
- //this.panelEx2.Location = new Point(0, 50);
- //this.dgvData.Location = new Point(this.dgvData.Location.X, 61);
- //this.dgvData.Size = new Size(this.panelEx2.Width - (this.dgvData.Location.X * 2), this.panelEx1.Height - this.dgvData.Location.Y - this.ucPagerEx1.Height - 5);
- }
- else
- {
- this.flowLayoutPanel1.Height = 70;
- //this.flowLayoutPanel1.Size = new Size(this.panelEx2.Width - 10, 70);
- //this.panelEx2.Location = new Point(0, 85);
- //this.dgvData.Location = new Point(this.dgvData.Location.X, 95);
- //this.dgvData.Size = new Size(this.panelEx2.Width - (this.dgvData.Location.X * 2), this.panelEx1.Height - this.dgvData.Location.Y - this.ucPagerEx1.Height - 5);
- }
- }
- }
- }
- }
|