/// <summary> /// 责任人-单元格点击事件 /// Created:20170531(zhugaunjun) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridManager_CellClick(object sender, DevComponents.DotNetBar.SuperGrid.GridCellClickEventArgs e) { if (e.GridCell.GridColumn.Name == "RowDel") { gridManager.PrimaryGrid.Rows.Remove(e.GridCell.GridRow);//删除行 } }
/// <summary> /// 邮件附件列表单元格点击事件 /// Created:20170411(ChengMengjia) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridPFile_CellClick(object sender, DevComponents.DotNetBar.SuperGrid.GridCellClickEventArgs e) { if (e.GridCell.GridColumn.Name == "Del") { EmailFiles = EmailFiles.Where(t => !(e.GridCell.GridRow.GetCell("ID").Value).ToString().Equals(t.ID)).ToList(); LoadEmailFile(); } }
/// <summary> /// 责任人-单元格点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridManager_CellClick(object sender, DevComponents.DotNetBar.SuperGrid.GridCellClickEventArgs e) { if (e.GridCell.GridColumn.Name == "RowDel") { listWork = listWork.Where(t => t.Manager != e.GridCell.GridRow.GetCell("Manager").Value.ToString()).ToList(); gridManager.PrimaryGrid.DataSource = listWork; } }
/// <summary> /// 日常管理 /// Created:2017.04.01(Xuxb) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridRoutine_CellClick(object sender, DevComponents.DotNetBar.SuperGrid.GridCellClickEventArgs e) { ClearWork(); WorkId = e.GridCell.GridRow.Cells["ID"].Value.ToString(); if (!string.IsNullOrEmpty(WorkId)) { LoadContent(); LoadFileList();//加载日常工作文件列表 } }
/// <summary> /// 附件列表单元格点击事件 /// Created:20170509(ChengMengjia) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridFile_CellClick(object sender, DevComponents.DotNetBar.SuperGrid.GridCellClickEventArgs e) { if (e.GridCell.GridColumn.Name == "Del") { listFile = listFile.Where(t => !e.GridCell.GridRow.GetCell("Path").Value.ToString().Equals(t.Path)).ToList(); for (int i = 0; i < listFile.Count; i++) { listFile[i].RowNo = i + 1; } gridFile.PrimaryGrid.DataSource = listFile; } }
/// <summary> /// 问题列表行点击时 /// Created:2017.04.06(Xuxb) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridTrouble_CellClick(object sender, DevComponents.DotNetBar.SuperGrid.GridCellClickEventArgs e) { TroubleId = e.GridCell.GridRow.Cells["ID"].Value.ToString(); if (!string.IsNullOrEmpty(TroubleId)) { //加载画面内容 LoadPageData(); //加载责任人列表 var list = troubleBLL.GetTroubleWorkList(TroubleId); gridManager.PrimaryGrid.DataSource = list; } }
/// <summary> /// 附件列表的单元格点击触发事件 /// Created:20170330(ChengMengjia) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridFile_CellClick(object sender, DevComponents.DotNetBar.SuperGrid.GridCellClickEventArgs e) { if (e.GridCell.GridColumn.Name == "RowDownload") { string fileName = e.GridCell.GridRow.GetCell("Path").Value.ToString(); if (string.IsNullOrEmpty(fileName)) { MessageHelper.ShowMsg(MessageID.W000000005, MessageType.Alert); return; } //文件下载 FileHelper.DownLoadFile(UploadType.WBS, ProjectId, CurrentNode.ID, fileName); } }
/// <summary> /// 文件行单击事件 /// Created:2017.03.31(Xuxb) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridFile_CellClick(object sender, DevComponents.DotNetBar.SuperGrid.GridCellClickEventArgs e) { if (e.GridCell.GridColumn.Name == "RowDownLoad") { string fileName = e.GridCell.GridRow.Cells["Path"].Value.ToString(); if (string.IsNullOrEmpty(fileName)) { MessageHelper.ShowMsg(MessageID.W000000005, MessageType.Alert); return; } //文件下载 FileHelper.DownLoadFile(UploadType.Routine, ProjectId, _nodeID, fileName); } else { _fileId = e.GridCell.GridRow.Cells["ID"].Value.ToString(); _filePath = e.GridCell.GridRow.Cells["Path"].Value.ToString(); txtFileName.Text = e.GridCell.GridRow.Cells["Name"].Value.ToString(); txtFileDesc.Text = e.GridCell.GridRow.Cells["Desc"].Value.ToString(); } }