internal static void 专家调度一级动态优化_DoubleClick(Xceed.Grid.Cell srcCell, 专家任务性质? zjrwxz) { if (srcCell == null) return; if (srcCell.ParentColumn.FieldName == "移出") { if (srcCell.ParentRow.Cells["新任务号"].Value != null) { Xceed.Grid.Cell srcCell2 = srcCell.ParentRow.Cells[m_topGridDragFildeName].Tag as Xceed.Grid.Cell; srcCell.ParentGrid.DataRows.Remove(srcCell.ParentRow as Xceed.Grid.DataRow); srcCell2.ParentGrid.DataRows.Remove(srcCell2.ParentRow as Xceed.Grid.DataRow); } } else if (srcCell.ParentColumn.FieldName == "确认") { // Todo if (srcCell.ParentRow.Cells["新任务号"].Value != null) return; Xceed.Grid.Cell destCell = srcCell.ParentRow.Cells[m_topGridDragFildeName].Tag as Xceed.Grid.Cell; if (destCell == null) return; 任务 x = srcCell.ParentRow.Tag as 任务; 任务 y = destCell.ParentRow.Tag as 任务; if (srcCell.ParentRow.Cells["备注"].Value != null) x.专家任务.备注 = (string)srcCell.ParentRow.Cells["备注"].Value; //紧急下达 form = new 紧急下达(x.专家任务, y, zjrwxz); //using (form) //{ // if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) // { // //专家任务 zjrw = m_dao.生成专家任务(x.专家任务, y); // srcCell.ParentRow.Cells["新任务号"].Value = form.专家任务.新任务号; // srcCell.ParentRow.Cells["新任务号"].Tag = form.专家任务; // } //} var zjrw = x.专家任务; zjrw = m_专家任务Dao.生成专家任务(zjrw, y, zjrwxz); srcCell.ParentRow.Cells["新任务号"].Value = zjrw.新任务号; srcCell.ParentRow.Cells["新任务号"].Tag = zjrw; } else if (srcCell.ParentColumn.FieldName == "紧急下达") { // do nothing now } else if (srcCell.ParentColumn.FieldName == "专家任务号") { 任务 x = srcCell.ParentRow.Tag as 任务; var zjrw = x.专家任务; if (zjrw.车辆作业 == null) return; using (var form = new 单个作业监控详情(zjrw.车辆作业)) { form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "车辆位置") { 任务 x = srcCell.ParentRow.Tag as 任务; var zjrw = x.专家任务; if (zjrw.车辆作业 == null) return; if (m_mapForm == null) { m_mapForm = new Feng.Map.MapForm(); m_mapForm.FormClosing += new System.Windows.Forms.FormClosingEventHandler((sender2, e2) => { if (e2.CloseReason == System.Windows.Forms.CloseReason.UserClosing) { e2.Cancel = true; m_mapForm.Visible = false; } }); } m_mapForm.ClearMap(); if (!m_mapForm.Visible) { m_mapForm.WindowState = System.Windows.Forms.FormWindowState.Maximized; m_mapForm.Show(); } if (zjrw.车辆作业.Track.HasValue) { m_mapForm.LoadTrack(zjrw.车辆作业.Track.Value); } } }
public static void OnCellDoubleClick(object sender, EventArgs e) { Xceed.Grid.Cell srcCell = sender as Xceed.Grid.Cell; if (srcCell == null) { return; } System.Windows.Forms.DialogResult ret = System.Windows.Forms.DialogResult.None; var row = srcCell.ParentRow as Xceed.Grid.DataRow; (srcCell.GridControl as IBoundGrid).DisplayManager.SearchManager.ReloadItem(row.Index); (srcCell.GridControl as IBoundGrid).ResetRowData(row); 车辆作业 entity = srcCell.ParentRow.Tag as 车辆作业; if (entity == null) { return; } if (srcCell.ParentColumn.FieldName == "作业号") { using (var form = new 单个作业监控详情(entity)) { form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "箱型编号") { using (var form = new 电子作业单(entity)) { form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "车辆位置") { if (m_mapForm == null) { m_mapForm = new Feng.Map.MapForm(); m_mapForm.FormClosing += new System.Windows.Forms.FormClosingEventHandler((sender2, e2) => { if (e2.CloseReason == System.Windows.Forms.CloseReason.UserClosing) { e2.Cancel = true; m_mapForm.Visible = false; } }); } m_mapForm.ClearMap(); if (!m_mapForm.Visible) { m_mapForm.WindowState = System.Windows.Forms.FormWindowState.Maximized; m_mapForm.Show(); } if (entity.Track.HasValue) { m_mapForm.LoadTrack(entity.Track.Value); } //if (entity.Track.HasValue) //{ // using (WebForm form = new WebForm("车辆轨迹", "http://17haha8.oicp.net/CarTrackService/TrackAnimation.aspx?TrackId=" + entity.Track.Value.ToString())) // { // form.ShowDialog(); // } //} } else if (srcCell.ParentColumn.FieldName == "车牌号") { using (var form = new 车辆详细信息(entity.车辆)) { form.ShowDialog(); } //using (var form = Feng.ServiceProvider.GetService<IWindowFactory>().CreateWindow(ADInfoBll.Instance.GetWindowInfo("实时监控_车辆作业_车辆详细信息")) as System.Windows.Forms.Form) //{ // form.ShowDialog(); //} } else if (srcCell.ParentColumn.FieldName == "承运时间要求") { using (var form = new 承运时间要求详情(entity)) { form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "开始") { if (entity.开始时间.HasValue) { return; } using (var form = new 电子作业单(entity)) { ret = form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "结束") { if (entity.结束时间.HasValue || !entity.开始时间.HasValue) { return; } //if (entity.最新作业状态 != null && entity.最新作业状态.处理状态 == "待处理") //{ // MessageForm.ShowWarning("请先处理异常情况!"); // return; //} if ((string)srcCell.ParentRow.Cells["作业状态"].Value != "已完成") { MessageForm.ShowWarning("还有未完成任务!"); return; } using (var form = new 实时监控结束(entity)) { ret = form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "退回") { if (entity.开始时间.HasValue) { return; } using (var form = new 实时监控作业退回申请(entity)) { form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "处理状态") { if (entity.最新作业状态 != null && entity.最新作业状态.处理状态 == "待处理") { if (entity.最新作业状态.异常情况 == "动态任务追加") { using (var form = new 实时监控异常处理动态任务追加(entity)) { ret = form.ShowDialog(); } } else { using (var form = new 实时监控异常处理(entity)) { ret = form.ShowDialog(); } } } } else if (srcCell.ParentColumn.FieldName == "异常报警") { using (var form = new 实时监控异常报警(entity)) { ret = form.ShowDialog(); } } if (ret == System.Windows.Forms.DialogResult.OK) { //(srcCell.GridControl as IBoundGrid).DisplayManager.SearchManager.ReloadItem(row.Index); (srcCell.GridControl as Feng.Grid.IBoundGrid).ResetRowData(row); } }
public static void OnCellDoubleClick(object sender, EventArgs e) { Xceed.Grid.Cell srcCell = sender as Xceed.Grid.Cell; if (srcCell == null) return; System.Windows.Forms.DialogResult ret = System.Windows.Forms.DialogResult.None; var row = srcCell.ParentRow as Xceed.Grid.DataRow; (srcCell.GridControl as IBoundGrid).DisplayManager.SearchManager.ReloadItem(row.Index); (srcCell.GridControl as IBoundGrid).ResetRowData(row); 车辆作业 entity = srcCell.ParentRow.Tag as 车辆作业; if (entity == null) return; if (srcCell.ParentColumn.FieldName == "作业号") { using (var form = new 单个作业监控详情(entity)) { form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "箱型编号") { using (var form = new 电子作业单(entity)) { form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "车辆位置") { if (m_mapForm == null) { m_mapForm = new Feng.Map.MapForm(); m_mapForm.FormClosing += new System.Windows.Forms.FormClosingEventHandler((sender2, e2) => { if (e2.CloseReason == System.Windows.Forms.CloseReason.UserClosing) { e2.Cancel = true; m_mapForm.Visible = false; } }); } m_mapForm.ClearMap(); if (!m_mapForm.Visible) { m_mapForm.WindowState = System.Windows.Forms.FormWindowState.Maximized; m_mapForm.Show(); } if (entity.Track.HasValue) { m_mapForm.LoadTrack(entity.Track.Value); } //if (entity.Track.HasValue) //{ // using (WebForm form = new WebForm("车辆轨迹", "http://17haha8.oicp.net/CarTrackService/TrackAnimation.aspx?TrackId=" + entity.Track.Value.ToString())) // { // form.ShowDialog(); // } //} } else if (srcCell.ParentColumn.FieldName == "车牌号") { using (var form = new 车辆详细信息(entity.车辆)) { form.ShowDialog(); } //using (var form = Feng.ServiceProvider.GetService<IWindowFactory>().CreateWindow(ADInfoBll.Instance.GetWindowInfo("实时监控_车辆作业_车辆详细信息")) as System.Windows.Forms.Form) //{ // form.ShowDialog(); //} } else if (srcCell.ParentColumn.FieldName == "承运时间要求") { using (var form = new 承运时间要求详情(entity)) { form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "开始") { if (entity.开始时间.HasValue) return; using (var form = new 电子作业单(entity)) { ret = form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "结束") { if (entity.结束时间.HasValue || !entity.开始时间.HasValue) return; //if (entity.最新作业状态 != null && entity.最新作业状态.处理状态 == "待处理") //{ // MessageForm.ShowWarning("请先处理异常情况!"); // return; //} if ((string)srcCell.ParentRow.Cells["作业状态"].Value != "已完成") { MessageForm.ShowWarning("还有未完成任务!"); return; } using (var form = new 实时监控结束(entity)) { ret = form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "退回") { if (entity.开始时间.HasValue) return; using (var form = new 实时监控作业退回申请(entity)) { form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "处理状态") { if (entity.最新作业状态 != null && entity.最新作业状态.处理状态 == "待处理") { if (entity.最新作业状态.异常情况 == "动态任务追加") { using (var form = new 实时监控异常处理动态任务追加(entity)) { ret = form.ShowDialog(); } } else { using (var form = new 实时监控异常处理(entity)) { ret = form.ShowDialog(); } } } } else if (srcCell.ParentColumn.FieldName == "异常报警") { using (var form = new 实时监控异常报警(entity)) { ret = form.ShowDialog(); } } if (ret == System.Windows.Forms.DialogResult.OK) { //(srcCell.GridControl as IBoundGrid).DisplayManager.SearchManager.ReloadItem(row.Index); (srcCell.GridControl as Feng.Grid.IBoundGrid).ResetRowData(row); } }
internal static void 专家调度一级动态优化_DoubleClick(Xceed.Grid.Cell srcCell, 专家任务性质?zjrwxz) { if (srcCell == null) { return; } if (srcCell.ParentColumn.FieldName == "移出") { if (srcCell.ParentRow.Cells["新任务号"].Value != null) { Xceed.Grid.Cell srcCell2 = srcCell.ParentRow.Cells[m_topGridDragFildeName].Tag as Xceed.Grid.Cell; srcCell.ParentGrid.DataRows.Remove(srcCell.ParentRow as Xceed.Grid.DataRow); srcCell2.ParentGrid.DataRows.Remove(srcCell2.ParentRow as Xceed.Grid.DataRow); } } else if (srcCell.ParentColumn.FieldName == "确认") { // Todo if (srcCell.ParentRow.Cells["新任务号"].Value != null) { return; } Xceed.Grid.Cell destCell = srcCell.ParentRow.Cells[m_topGridDragFildeName].Tag as Xceed.Grid.Cell; if (destCell == null) { return; } 任务 x = srcCell.ParentRow.Tag as 任务; 任务 y = destCell.ParentRow.Tag as 任务; if (srcCell.ParentRow.Cells["备注"].Value != null) { x.专家任务.备注 = (string)srcCell.ParentRow.Cells["备注"].Value; } //紧急下达 form = new 紧急下达(x.专家任务, y, zjrwxz); //using (form) //{ // if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) // { // //专家任务 zjrw = m_dao.生成专家任务(x.专家任务, y); // srcCell.ParentRow.Cells["新任务号"].Value = form.专家任务.新任务号; // srcCell.ParentRow.Cells["新任务号"].Tag = form.专家任务; // } //} var zjrw = x.专家任务; zjrw = m_专家任务Dao.生成专家任务(zjrw, y, zjrwxz); srcCell.ParentRow.Cells["新任务号"].Value = zjrw.新任务号; srcCell.ParentRow.Cells["新任务号"].Tag = zjrw; } else if (srcCell.ParentColumn.FieldName == "紧急下达") { // do nothing now } else if (srcCell.ParentColumn.FieldName == "专家任务号") { 任务 x = srcCell.ParentRow.Tag as 任务; var zjrw = x.专家任务; if (zjrw.车辆作业 == null) { return; } using (var form = new 单个作业监控详情(zjrw.车辆作业)) { form.ShowDialog(); } } else if (srcCell.ParentColumn.FieldName == "车辆位置") { 任务 x = srcCell.ParentRow.Tag as 任务; var zjrw = x.专家任务; if (zjrw.车辆作业 == null) { return; } if (m_mapForm == null) { m_mapForm = new Feng.Map.MapForm(); m_mapForm.FormClosing += new System.Windows.Forms.FormClosingEventHandler((sender2, e2) => { if (e2.CloseReason == System.Windows.Forms.CloseReason.UserClosing) { e2.Cancel = true; m_mapForm.Visible = false; } }); } m_mapForm.ClearMap(); if (!m_mapForm.Visible) { m_mapForm.WindowState = System.Windows.Forms.FormWindowState.Maximized; m_mapForm.Show(); } if (zjrw.车辆作业.Track.HasValue) { m_mapForm.LoadTrack(zjrw.车辆作业.Track.Value); } } }