示例#1
0
        private void 作业开始结束_Load(object sender, EventArgs e)
        {
            m_作业开始结束Grid = base.AssociateBoundGrid(pnl监控区, "实时监控_车辆作业_作业开始结束") as DataUnboundGrid;

            m_作业开始结束Grid.ChangeControlPositionAccordColumn(lbl作业开始结束操作区, "驾驶员编号");

            m_作业开始结束Grid.DataRowTemplate.Cells["箱型编号"].DoubleClick += new EventHandler(作业监控区_DoubleClick);
            m_作业开始结束Grid.DataRowTemplate.Cells["车牌号"].DoubleClick += new EventHandler(作业监控区_DoubleClick);
            m_作业开始结束Grid.DataRowTemplate.Cells["起始途径终止地"].DoubleClick += new EventHandler(作业监控区_DoubleClick);
            m_作业开始结束Grid.DataRowTemplate.Cells["开始"].DoubleClick += new EventHandler(作业监控区_DoubleClick);
            m_作业开始结束Grid.DataRowTemplate.Cells["退回"].DoubleClick += new EventHandler(作业监控区_DoubleClick);
            m_作业开始结束Grid.DataRowTemplate.Cells["结束"].DoubleClick += new EventHandler(作业监控区_DoubleClick);

            m_作业开始结束Grid.DataRowTemplate.Cells["作业状态"].DoubleClick += new EventHandler(作业监控区_DoubleClick);
            m_作业开始结束Grid.DataRowTemplate.Cells["作业号"].DoubleClick += new EventHandler(作业监控区_DoubleClick);
            m_作业开始结束Grid.DataRowTemplate.Cells["承运时间要求"].DoubleClick += new EventHandler(作业监控区_DoubleClick);

            m_作业开始结束Grid.DataRowTemplate.Cells["缓急程度"].MouseEnter += new EventHandler(作业实时监控_MouseEnter);

            Helper.SetGridDefault(this, m_作业开始结束Grid);
        }
        //void contextMenuStrip1_Opening(object sender, System.ComponentModel.CancelEventArgs e)
        //{
        //    if (m_待命车辆_单车多任务Grid.GridHelper.ContextCell != null)
        //    {
        //        string fieldName = m_待命车辆_单车多任务Grid.GridHelper.ContextCell.ParentColumn.FieldName;
        //        if (fieldName.StartsWith("中心新任务号"))
        //        {
        //            if (m_待命车辆_单车多任务Grid.GridHelper.ContextCell.Value != null)
        //            {
        //                tsmSetBz.Visible = true;
        //                return;
        //            }
        //        }
        //    }
        //    tsmSetBz.Visible = false;
        //}
        //void tsmSetBz_Click(object sender, EventArgs e)
        //{
        //    if (m_待命车辆_单车多任务Grid.GridHelper.ContextCell != null)
        //    {
        //        string fieldName = m_待命车辆_单车多任务Grid.GridHelper.ContextCell.ParentColumn.FieldName;
        //        if (fieldName.StartsWith("中心新任务号"))
        //        {
        //            if (m_待命车辆_单车多任务Grid.GridHelper.ContextCell.Value != null)
        //            {
        //                string si = fieldName.Substring(fieldName.Length - 1);
        //                string bz = (string)m_待命车辆_单车多任务Grid.GridHelper.ContextCell.ParentRow.Cells["作业备注" + si].Value;
        //                using (var form = new 车队调度设置作业备注(bz))
        //                {
        //                    if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        //                    {
        //                        m_待命车辆_单车多任务Grid.GridHelper.ContextCell.ParentRow.Cells["作业备注" + si].Value = form.备注;
        //                    }
        //                }
        //            }
        //        }
        //    }
        //}
        private void 车队调度静态任务下达_Load(object sender, EventArgs e)
        {
            m_待排任务Grid = base.AssociateBoundGrid(pnl待排任务, "车队级调度_静态任务下达_待排任务") as DataUnboundGrid;
            m_待命车辆_单车多任务Grid = base.AssociateBoundGrid(pnl待命车辆_单车多任务, "车队级调度_静态任务下达_待命车辆_单车多任务") as DataUnboundGrid;

            //m_待命车辆_单车多任务Grid.GridHelper.MergeContenxtMenuStripForCell(this.contextMenuStrip1);
            //m_待命车辆_单车多任务Grid.GridHelper.ContextMenuStripForCell.Opening += new System.ComponentModel.CancelEventHandler(contextMenuStrip1_Opening);
            //tsmSetBz.Click += new EventHandler(tsmSetBz_Click);

            m_待命车辆_单车多任务Grid.DataRowTemplate.Cells["撤销"].DoubleClick += new EventHandler(车队调度静态任务下达_DoubleClick);
            m_待命车辆_单车多任务Grid.DataRowTemplate.Cells["确认"].DoubleClick += new EventHandler(车队调度静态任务下达_DoubleClick);
            m_待命车辆_单车多任务Grid.DataRowTemplate.Cells["后续作业计划"].DoubleClick += new EventHandler(车队调度静态任务下达_DoubleClick);
            m_待命车辆_单车多任务Grid.DataRowTemplate.Cells["车牌号"].DoubleClick += new EventHandler(车队调度静态任务下达_DoubleClick);

            m_待命车辆_单车多任务Grid.EnableDragDrop = true;
            m_待排任务Grid.EnableDragDrop = true;

            m_待命车辆_单车多任务Grid.GridDragStart += new EventHandler<GridDataGragEventArgs>(车队调度静态任务下达_GridDragStart);
            m_待排任务Grid.GridDragStart += new EventHandler<GridDataGragEventArgs>(车队调度静态任务下达_GridDragStart);

            m_待命车辆_单车多任务Grid.GridDragDrop += new DragEventHandler(车队调度静态任务下达_GridDragDrop);
            m_待排任务Grid.GridDragDrop += new DragEventHandler(车队调度静态任务下达_GridDragDrop);

            m_待命车辆_单车多任务Grid.GridDragOver += new DragEventHandler(车队调度静态任务下达_GridDragOver);
            m_待排任务Grid.GridDragOver += new DragEventHandler(车队调度静态任务下达_GridDragOver);

            m_待命车辆_单车多任务Grid.GotFocus += new EventHandler(m_待命车辆_单车单任务Grid_GotFocus);
            m_待排任务Grid.GotFocus += new EventHandler(m_待命车辆_单车单任务Grid_GotFocus);

            Helper.SetGridDefault(this, m_待命车辆_单车多任务Grid);
            Helper.SetGridDefault(this, m_待排任务Grid);
            Helper.SetCellButton(m_待命车辆_单车多任务Grid, "确认", btn批量确认);
            m_待命车辆_单车多任务Grid.ChangeControlPositionAccordColumn(label1, "中心新任务号1");
        }
        private void 专家调度静态任务下达_Load(object sender, EventArgs e)
        {
            m_已优化过的任务集合Grid = base.AssociateBoundGrid(pnl已优化过的任务集合, "专家级调度_静态任务下达_已优化过的任务集合") as DataUnboundGrid;
            m_未优化过的任务集合Grid = base.AssociateBoundGrid(pnl未优化过的任务集合, "专家级调度_静态任务下达_未优化过的任务集合") as DataUnboundGrid;

            //m_已优化过的任务集合Grid.Columns["选定"].ReadOnly = false;
            //m_已优化过的任务集合Grid.DataRowTemplate.Cells["选定"].ReadOnly = false;
            //m_未优化过的任务集合Grid.Columns["选定"].ReadOnly = false;
            //m_未优化过的任务集合Grid.DataRowTemplate.Cells["选定"].ReadOnly = false;
            //m_已优化过的任务集合Grid.ReadOnly = false;
            //m_未优化过的任务集合Grid.ReadOnly = false;

            //m_已优化过的任务集合Grid.DataRowTemplate.Cells["调整"].DoubleClick += new EventHandler(已优化任务_DoubleClick);
            m_已优化过的任务集合Grid.DataRowTemplate.Cells["确认"].DoubleClick += new EventHandler(已优化任务_DoubleClick);
            m_已优化过的任务集合Grid.DataRowTemplate.Cells["移出"].DoubleClick += new EventHandler(已优化任务_DoubleClick);
            //m_未优化过的任务集合Grid.DataRowTemplate.Cells["调整"].DoubleClick += new EventHandler(未优化任务_DoubleClick);
            m_未优化过的任务集合Grid.DataRowTemplate.Cells["确认"].DoubleClick += new EventHandler(未优化任务_DoubleClick);
            m_未优化过的任务集合Grid.DataRowTemplate.Cells["移出"].DoubleClick += new EventHandler(未优化任务_DoubleClick);

            Helper.SetGridDefault(this, m_已优化过的任务集合Grid);
            Helper.SetGridDefault(this, m_未优化过的任务集合Grid);
            Helper.SetCellButton(m_已优化过的任务集合Grid, "确认", btn批量确认);
            Helper.SetCellButton(m_未优化过的任务集合Grid, "确认", btn批量确认2);
            Helper.SetCellButton(m_已优化过的任务集合Grid, "区域名称", btn区域自动分拣);
            Helper.SetCellButton(m_未优化过的任务集合Grid, "区域名称", btn区域自动分拣2);
            m_已优化过的任务集合Grid.ChangeControlPositionAccordColumn(label1, "区域名称");
            m_未优化过的任务集合Grid.ChangeControlPositionAccordColumn(label2, "区域名称");
        }
        private void 专家调度一级静态优化_Load(object sender, EventArgs e)
        {
            m_topGrid = base.AssociateBoundGrid(pnl任务集合top, "专家级调度_一级静态优化_静态套箱_任务集合top") as DataUnboundGrid;
            m_bottomGrid = base.AssociateBoundGrid(pnl任务集合bottom, "专家级调度_一级静态优化_静态套箱_任务集合bottom") as DataUnboundGrid;

            m_topGrid.DataRowTemplate.Cells["确认"].DoubleClick += new EventHandler(专家调度一级静态优化_DoubleClick);
            //m_静态套箱_任务集合topGrid.DataRowTemplate.Cells["取消"].DoubleClick += new EventHandler(专家调度一级静态优化_DoubleClick);
            //m_套箱_任务集合topGrid.DataRowTemplate.Cells["移出"].DoubleClick += new EventHandler(专家调度一级静态优化_DoubleClick);
            m_topGrid.DataRowTemplate.Cells["紧急下达"].DoubleClick += new EventHandler(专家调度一级静态优化_DoubleClick);

            m_topGrid.EnableDragDrop = true;
            m_bottomGrid.EnableDragDrop = true;

            m_bottomGrid.GridDragStart += new EventHandler<GridDataGragEventArgs>(专家调度一级静态优化.专家调度一级静态优化_GridDragStart);
            m_topGrid.GridDragStart += new EventHandler<GridDataGragEventArgs>(专家调度一级静态优化.专家调度一级静态优化_GridDragStart);

            m_topGrid.GridDragDrop += new DragEventHandler(专家调度一级静态优化.专家调度一级静态优化_GridDragDrop);
            m_bottomGrid.GridDragDrop += new DragEventHandler(专家调度一级静态优化.专家调度一级静态优化_GridDragDrop);

            m_topGrid.GridDragOver += new DragEventHandler(专家调度一级静态优化.专家调度一级静态优化_GridDragOver);
            m_bottomGrid.GridDragOver += new DragEventHandler(专家调度一级静态优化.专家调度一级静态优化_GridDragOver);

            m_topGrid.GotFocus += new EventHandler(m_静态套箱_任务集合Grid_GotFocus);
            m_bottomGrid.GotFocus += new EventHandler(m_静态套箱_任务集合Grid_GotFocus);

            Helper.SetGridDefault(this, m_topGrid);
            Helper.SetGridDefault(this, m_bottomGrid);
            Helper.SetCellButton(m_topGrid, "确认", btn批量确认);
            m_topGrid.ChangeControlPositionAccordColumn(lbl预配集合, "配对任务号");
            m_topGrid.ChangeControlPositionAccordColumn(lbl新任务, "新任务号");
        }
        private void 车队调度静态任务下达_Load(object sender, EventArgs e)
        {
            m_待命车辆_单车单任务Grid = base.AssociateBoundGrid(pnl待命车辆_单车单任务, "车队级调度_静态任务下达_待命车辆_单车单任务") as DataUnboundGrid;
            m_待排任务Grid = base.AssociateBoundGrid(pnl待排任务, "车队级调度_静态任务下达_待排任务") as DataUnboundGrid;

            //m_待命车辆_单车单任务Grid.DataRowTemplate.Cells["撤销"].DoubleClick += new EventHandler(车队调度静态任务下达_DoubleClick);
            m_待命车辆_单车单任务Grid.DataRowTemplate.Cells["确认"].DoubleClick += new EventHandler(车队调度静态任务下达_DoubleClick);
            //m_待命车辆_单车单任务Grid.DataRowTemplate.Cells["任务下达"].DoubleClick += new EventHandler(车队调度静态任务下达_DoubleClick);
            m_待命车辆_单车单任务Grid.DataRowTemplate.Cells["移出"].DoubleClick += new EventHandler(车队调度静态任务下达_DoubleClick);
            m_待命车辆_单车单任务Grid.DataRowTemplate.Cells["后续作业计划"].DoubleClick += new EventHandler(车队调度静态任务下达_DoubleClick);
            m_待命车辆_单车单任务Grid.DataRowTemplate.Cells["车牌号"].DoubleClick += new EventHandler(车队调度静态任务下达_DoubleClick);

            m_待命车辆_单车单任务Grid.EnableDragDrop = true;
            m_待排任务Grid.EnableDragDrop = true;
            m_待命车辆_单车单任务Grid.GridDragStart += new EventHandler<GridDataGragEventArgs>(车队调度静态任务下达_GridDragStart);

            m_待排任务Grid.GridDragStart += new EventHandler<GridDataGragEventArgs>(车队调度静态任务下达_GridDragStart);
            m_待命车辆_单车单任务Grid.GridDragDrop += new DragEventHandler(车队调度静态任务下达_GridDragDrop);

            m_待排任务Grid.GridDragDrop += new DragEventHandler(车队调度静态任务下达_GridDragDrop);
            m_待命车辆_单车单任务Grid.GridDragOver += new DragEventHandler(车队调度静态任务下达_GridDragOver);

            m_待排任务Grid.GridDragOver += new DragEventHandler(车队调度静态任务下达_GridDragOver);

            m_待命车辆_单车单任务Grid.GotFocus += new EventHandler(m_待命车辆_单车单任务Grid_GotFocus);
            m_待排任务Grid.GotFocus += new EventHandler(m_待命车辆_单车单任务Grid_GotFocus);

            Helper.SetGridDefault(this, m_待命车辆_单车单任务Grid);
            Helper.SetGridDefault(this, m_待排任务Grid);
            Helper.SetCellButton(m_待命车辆_单车单任务Grid, "确认", btn批量确认);
            m_待命车辆_单车单任务Grid.ChangeControlPositionAccordColumn(label1, "中心新任务号");
        }
示例#6
0
        private void 转关箱预排车_Load(object sender, EventArgs e)
        {
            m_全部监管车辆及作业现状Grid = base.AssociateBoundGrid(pnl全部监管车辆及作业现状, "车队级调度_转关箱预排车_监管车辆及作业状况") as DataUnboundGrid;
            m_待排转关箱任务区Grid = base.AssociateBoundGrid(pnl待排转关箱任务区, "车队级调度_转关箱预排车_待排转关箱任务") as DataUnboundGrid;
            m_暂存计划区Grid = base.AssociateArchiveGrid(pnl暂存计划区, "车队级调度_转关箱预排车_暂存计划区") as ArchiveUnboundGrid;

            m_全部监管车辆及作业现状Grid.ChangeControlPositionAccordColumn(label1, "第1天");

            m_全部监管车辆及作业现状Grid.DataRowTemplate.Cells["后续作业计划"].DoubleClick += new EventHandler(转关箱预排车_DoubleClick);
            m_待排转关箱任务区Grid.DataRowTemplate.Cells["提单号"].DoubleClick += new EventHandler(转关箱预排车_DoubleClick);

            m_全部监管车辆及作业现状Grid.EnableDragDrop = true;
            m_待排转关箱任务区Grid.EnableDragDrop = true;
            m_全部监管车辆及作业现状Grid.GridDragOver += new System.Windows.Forms.DragEventHandler(m_全部监管车辆及作业现状Grid_GridDragOver);
            m_全部监管车辆及作业现状Grid.GridDragDrop += new System.Windows.Forms.DragEventHandler(m_全部监管车辆及作业现状Grid_GridDragDrop);
            m_全部监管车辆及作业现状Grid.GridDragStart += new EventHandler<GridDataGragEventArgs>(m_待排转关箱任务区Grid_GridDragStart);
            m_待排转关箱任务区Grid.GridDragOver += new System.Windows.Forms.DragEventHandler(m_全部监管车辆及作业现状Grid_GridDragOver);
            m_待排转关箱任务区Grid.GridDragDrop += new System.Windows.Forms.DragEventHandler(m_全部监管车辆及作业现状Grid_GridDragDrop);
            m_待排转关箱任务区Grid.GridDragStart += new EventHandler<GridDataGragEventArgs>(m_待排转关箱任务区Grid_GridDragStart);

            m_暂存计划区Grid.DisplayManager.PositionChanged += new EventHandler(DisplayManager_PositionChanged);

            Helper.SetGridDefault(this, m_暂存计划区Grid);
            Helper.SetGridDefault(this, m_全部监管车辆及作业现状Grid);
        }