internal static void 择组合(DataUnboundGrid gridX, DataUnboundGrid gridY, List <专家任务性质> zjrwxz) { Clear组合(gridX, gridY); if (gridX.CurrentRow == null) { return; } 任务 x = gridX.CurrentRow.Tag as 任务; foreach (Xceed.Grid.DataRow row in gridY.DataRows) { if (row.ForeColor == 专家调度一级静态优化.优化DisableColor) { continue; } 任务 y = row.Tag as 任务; foreach (var i in zjrwxz) { if (m_dao.是否能组合(x, y, i)) { row.Font = new Font(row.Font, FontStyle.Bold); break; } } } }
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.EnableDragDrop = true; m_bottomGrid.EnableDragDrop = true; m_topGrid.GridDragStart += new EventHandler <GridDataGragEventArgs>(专家调度一级动态优化.专家调度一级动态优化_GridDragStart); m_bottomGrid.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 = 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); }
//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.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, "中心新任务号"); }
private void 监控级调度主界面_Load(object sender, EventArgs e) { m_未开始作业集合 = base.AssociateBoundGrid(pnl未开始, "实时监控_车辆作业_监控级调度主界面_未开始") as DataUnboundGrid; m_运行中作业集合 = base.AssociateBoundGrid(pnl运行中, "实时监控_车辆作业_监控级调度主界面_运行中") as DataUnboundGrid; Helper.SetGridDefault(this, m_未开始作业集合); Helper.SetGridDefault(this, m_运行中作业集合); }
private void 虚拟手机终端_Load(object sender, EventArgs e) { m_车载ID当前使用情况集合 = base.AssociateBoundGrid(pnl车载ID, "实时监控_车辆作业_车载ID当前使用情况") as DataUnboundGrid; m_车载ID当前使用情况集合.DataRowTemplate.Cells["车辆位置"].DoubleClick += new EventHandler(作业监控区_DoubleClick); Helper.SetGridDefault(this, m_车载ID当前使用情况集合); m_车载ID当前使用情况集合.CurrentRowChanged += new EventHandler(m_车载ID当前使用情况集合_CurrentRowChanged); }
public static void ResetRowData(ArchiveOperationForm masterForm) { DataUnboundGrid m_grid = masterForm.MasterGrid as DataUnboundGrid; if (m_grid != null) { m_grid.ResetRowData(m_grid.CurrentDataRow); } }
private void 专家任务管理_Load(object sender, EventArgs e) { m_专家任务集合 = base.AssociateBoundGrid(pnl专家任务集合, "管理_专家任务管理") as DataUnboundGrid; m_专家任务集合.DataRowTemplate.Cells["撤销监控"].DoubleClick += new EventHandler(专家任务管理_DoubleClick); m_专家任务集合.DataRowTemplate.Cells["撤销车辆作业"].DoubleClick += new EventHandler(专家任务管理_DoubleClick); m_专家任务集合.DataRowTemplate.Cells["撤销任务下达"].DoubleClick += new EventHandler(专家任务管理_DoubleClick); btn刷新_Click(btn刷新, EventArgs.Empty); }
private void 任务管理_Load(object sender, EventArgs e) { m_任务集合 = base.AssociateBoundGrid(pnl任务集合, "管理_任务管理") as DataUnboundGrid; m_任务集合.DataRowTemplate.Cells["撤销预发送"].DoubleClick += new EventHandler(任务管理_DoubleClick); m_任务集合.DataRowTemplate.Cells["撤销备案确认"].DoubleClick += new EventHandler(任务管理_DoubleClick); m_任务集合.DataRowTemplate.Cells["撤销专家任务"].DoubleClick += new EventHandler(任务管理_DoubleClick); btn刷新_Click(btn刷新, EventArgs.Empty); }
private void 专家级主界面_Load(object sender, EventArgs e) { m_原始 = base.AssociateBoundGrid(pnl原始, "专家级调度主界面_原始") as DataUnboundGrid; m_运行中 = base.AssociateBoundGrid(pnl运行中, "专家级调度主界面_运行中") as DataUnboundGrid; m_未分派 = base.AssociateBoundGrid(pnl未分派, "专家级调度主界面_未分派") as DataUnboundGrid; m_已下达 = base.AssociateBoundGrid(pnl已下达, "专家级调度主界面_已下达") as DataUnboundGrid; Helper.SetGridDefault(this, m_原始); Helper.SetGridDefault(this, m_运行中); Helper.SetGridDefault(this, m_未分派); Helper.SetGridDefault(this, m_已下达); }
/// <summary> /// 按照WindowTabInfo配置Grid /// </summary> /// <param name="masterGrid"></param> /// <param name="masterTabInfo"></param> public static void SetupDataUnboundGrid(DataUnboundGrid masterGrid, WindowTabInfo masterTabInfo) { ISearchManager sm = ServiceProvider.GetService <IManagerFactory>().GenerateSearchManager(masterTabInfo, null); masterGrid.SetDisplayManager(ServiceProvider.GetService <IManagerFactory>().GenerateDisplayManager(masterTabInfo, sm), masterTabInfo.GridName); if (masterTabInfo.ChildTabs.Count > 0) { GenerateDetailGrids(masterGrid, masterTabInfo); } }
private void 任务承运状况_Load(object sender, EventArgs e) { 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.DataRowTemplate.Cells["缓急程度"].MouseEnter += new EventHandler(作业实时监控_MouseEnter); Helper.SetGridDefault(this, m_任务监控区Grid); }
/// <summary> /// 按照WindowTabInfo生成Grid /// </summary> /// <param name="masterTabInfo"></param> /// <returns></returns> public static DataUnboundGrid GenerateDataUnboundGrid(WindowTabInfo masterTabInfo) { DataUnboundGrid ret; if (masterTabInfo.ChildTabs.Count == 0) { ret = new DataUnboundGrid(); } else { ret = new DataUnboundWithDetailGridLoadOnDemand(); } SetupDataUnboundGrid(ret, masterTabInfo); return(ret); }
internal static void Clear组合(DataUnboundGrid gridX, DataUnboundGrid gridY) { foreach (Xceed.Grid.DataRow row in gridX.DataRows) { if (row.Font.Bold) { row.ResetFont(); } } foreach (Xceed.Grid.DataRow row in gridY.DataRows) { if (row.Font.Bold) { row.ResetFont(); } } }
internal static void 自动优化(DataUnboundGrid gridX, DataUnboundGrid gridY, List <专家任务性质> zjrwxz) { foreach (Xceed.Grid.DataRow rowX in gridY.DataRows) { foreach (Xceed.Grid.DataRow rowY in gridY.DataRows) { 任务 x = rowX.Tag as 任务; 任务 y = rowY.Tag as 任务; foreach (var i in zjrwxz) { if (m_dao.是否能组合(x, y, i)) { } } } } }
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); }
private void 择组合(DataUnboundGrid gridX, DataUnboundGrid gridY) { 专家调度一级静态优化.Clear组合(gridX, gridY); if (gridX.CurrentRow == null) { return; } if (gridX == m_待排任务Grid) { 专家任务 x = gridX.CurrentRow.Tag as 专家任务;; foreach (Xceed.Grid.DataRow row in gridY.DataRows) { string s = (string)row.Cells["后续作业计划"].Value; // 1/2 int v1 = 0, v2 = 0; int idx = s.IndexOf('/'); if (idx != -1) { int?v = ConvertHelper.ToInt(s.Substring(0, idx)); if (v.HasValue) { v1 = v.Value; } v = ConvertHelper.ToInt(s.Substring(idx + 1)); if (v.HasValue) { v2 = v.Value; } } if (是否能组合(x, row.Tag as 车辆, v1 + v2)) { row.Font = new Font(row.Font, FontStyle.Bold); } } } else if (gridX == m_待命车辆_单车单任务Grid) { string s = (string)gridX.CurrentDataRow.Cells["后续作业计划"].Value; // 1/2 int v1 = 0, v2 = 0; int idx = s.IndexOf('/'); if (idx != -1) { int?v = ConvertHelper.ToInt(s.Substring(0, idx)); if (v.HasValue) { v1 = v.Value; } v = ConvertHelper.ToInt(s.Substring(idx + 1)); if (v.HasValue) { v2 = v.Value; } } foreach (Xceed.Grid.DataRow row in gridY.DataRows) { 专家任务 x = row.Tag as 专家任务; if (是否能组合(x, row.Tag as 车辆, v1 + v2)) { row.Font = new Font(row.Font, FontStyle.Bold); } } } }
internal static void 自动优化(DataUnboundGrid gridX, DataUnboundGrid gridY, 专家任务性质 zjrwxz) { 自动优化(gridX, gridY, new List <专家任务性质> { zjrwxz }); }