/// <summary> /// 点击近期工作和问题一览时 /// Created:2017.03.29(Xuxb) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void superGridLastWork_CellClick(object sender, DevComponents.DotNetBar.SuperGrid.GridCellClickEventArgs e) { if (e.GridCell.GridColumn.Name == "Operate") { string WorkType = e.GridCell.GridRow.Cells["WorkType"].Value.ToString(); MainFrame mainForm = (MainFrame)this.Parent.TopLevelControl; if (WorkType == "日常工作") { Forms.Others.Routine form = new Forms.Others.Routine(""); form.WorkId = e.GridCell.GridRow.Cells["Id"].Value.ToString(); mainForm.ShowChildForm(form); } else { Forms.Others.Trouble form = new Forms.Others.Trouble(""); form.TroubleId = e.GridCell.GridRow.Cells["Id"].Value.ToString(); mainForm.ShowChildForm(form); } } }
/// <summary> /// 预警一览 行双击 /// Created:20170609(ChengMengjia) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void superGridWarning_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { SuperGridControl obj = (SuperGridControl)sender; string WorkType = e.GridRow.SuperGrid.GetCell(e.GridRow.RowIndex, 1).Value.ToString(); MainFrame mainForm = (MainFrame)this.Parent.TopLevelControl; switch (WorkType) { case "项目交付物预警": CurrentNode = new WBSBLL().GetNode(e.GridRow.SuperGrid.GetCell(e.GridRow.RowIndex, 4).Value.ToString()); mainForm.RelaodTree(); mainForm.OpenNormalOperation(); break; case "项目问题预警": Forms.Others.Trouble form = new Forms.Others.Trouble(""); form.TroubleId = e.GridRow.SuperGrid.GetCell(e.GridRow.RowIndex, 4).Value.ToString(); mainForm.ShowChildForm(form); break; } }
/// <summary> /// 预警一览 单元格单击 /// Created:20170609(ChengMengjia) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void superGridWarning_CellClick(object sender, GridCellClickEventArgs e) { if (e.GridCell.GridColumn.Name == "Operate") { string WorkType = e.GridCell.GridRow.Cells["WarnningName"].Value.ToString(); MainFrame mainForm = (MainFrame)this.Parent.TopLevelControl; switch (WorkType) { case "项目交付物预警": CurrentNode = new WBSBLL().GetNode(e.GridCell.GridRow.Cells["Id"].Value.ToString()); mainForm.RelaodTree(); mainForm.OpenNormalOperation(); break; case "项目问题预警": Forms.Others.Trouble form = new Forms.Others.Trouble(""); form.TroubleId = e.GridCell.GridRow.Cells["Id"].Value.ToString(); mainForm.ShowChildForm(form); break; } } }
/// <summary> /// 双击近期工作和问题一览时 /// Created:20170609(ChengMengjia) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void superGridLastWork_RowDoubleClick(object sender, GridRowDoubleClickEventArgs e) { GridCell cell = e.GridRow.SuperGrid.GetCell(e.GridRow.RowIndex, 5); if (cell != null) { string WorkType = e.GridRow.SuperGrid.GetCell(e.GridRow.RowIndex, 1).Value.ToString(); MainFrame mainForm = (MainFrame)this.Parent.TopLevelControl; if (WorkType == "日常工作") { Forms.Others.Routine form = new Forms.Others.Routine(""); form.WorkId = cell.Value.ToString(); mainForm.ShowChildForm(form); } else { Forms.Others.Trouble form = new Forms.Others.Trouble(""); form.TroubleId = cell.Value.ToString(); mainForm.ShowChildForm(form); } } }