private void gridView_DoubleClick(object sender, EventArgs e) { // 判断"双击允许修改"标志 if (!AllowUpdate) { return; } //如果鼠标点击在单元格中,则编辑焦点对象。 Point point = this.gridControl.PointToClient(Control.MousePosition); if (GridHelper.HitCell(this.gridView, point)) { FormAddInfo_TouZiGuSuan tz = new FormAddInfo_TouZiGuSuan(); tz.Isupdate = true; tz.ParentID = "0"; tz.FlagId = flag; tz.Text = "修改项目"; tz.PowerUId = this.FocusedObject.ID; if (tz.ShowDialog() == DialogResult.OK) { try { this.RefreshData(); } catch { } } } }
private void barButtonItem6_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (this.ctrlPSP_Project_List1.FocusedObject == null) { return; } FormAddInfo_TouZiGuSuan tz = new FormAddInfo_TouZiGuSuan(); tz.Isupdate = true; tz.ParentID = "0"; tz.FlagId = typeFlag; tz.Text = "修改项目"; tz.PowerUId = this.ctrlPSP_Project_List1.FocusedObject.ID; if (tz.ShowDialog() == DialogResult.OK) { try { this.ctrlPSP_Project_List1.Flag = typeFlag; this.ctrlPSP_Project_List1.RefreshData(); } catch { } } }
private void barButtonItem5_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { FormAddInfo_TouZiGuSuan tz = new FormAddInfo_TouZiGuSuan(); tz.Isupdate = false; tz.ParentID = "0"; tz.FlagId = typeFlag; tz.Text = "增加项目"; if (tz.ShowDialog() == DialogResult.OK) { try { this.ctrlPSP_Project_List1.Flag = typeFlag; this.ctrlPSP_Project_List1.RefreshData(); } catch { } } }
private void gridView_DoubleClick(object sender, EventArgs e) { // �ж�"˫��������"��־ if (!AllowUpdate) { return; } //���������ڵ�Ԫ���У���༭������� Point point = this.gridControl.PointToClient(Control.MousePosition); if (GridHelper.HitCell(this.gridView, point)) { FormAddInfo_TouZiGuSuan tz = new FormAddInfo_TouZiGuSuan(); tz.Isupdate = true; tz.ParentID = "0"; tz.FlagId = flag; tz.Text = "����Ŀ"; tz.PowerUId = this.FocusedObject.ID; if (tz.ShowDialog() == DialogResult.OK) { try { this.RefreshData(); } catch { } } } }
private void barButtonItem6_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (this.ctrlPSP_Project_List1.FocusedObject == null) return ; FormAddInfo_TouZiGuSuan tz = new FormAddInfo_TouZiGuSuan(); tz.Isupdate = true; tz.ParentID = "0"; tz.FlagId = typeFlag; tz.Text = "����Ŀ"; tz.PowerUId = this.ctrlPSP_Project_List1.FocusedObject.ID; if (tz.ShowDialog() == DialogResult.OK) { try { this.ctrlPSP_Project_List1.Flag = typeFlag; this.ctrlPSP_Project_List1.RefreshData(); } catch { } } }
private void barButtonItem5_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { FormAddInfo_TouZiGuSuan tz = new FormAddInfo_TouZiGuSuan(); tz.Isupdate = false; tz.ParentID = "0"; tz.FlagId = typeFlag; tz.Text = "������Ŀ"; if (tz.ShowDialog() == DialogResult.OK) { try { this.ctrlPSP_Project_List1.Flag = typeFlag; this.ctrlPSP_Project_List1.RefreshData(); } catch { } } }
private void barButtonItem12_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { TreeListNode focusedNode = treeList1.FocusedNode; if (focusedNode == null) { return; } FormAddInfo_TouZiGuSuan frm = new FormAddInfo_TouZiGuSuan(); frm.Text = "增加" + focusedNode.GetValue("L3") + "的子项目"; frm.FlagId = typeFlag2; frm.ParentID = focusedNode.GetValue("ID").ToString(); frm.Isupdate = false; if (frm.ShowDialog() == DialogResult.OK) { obj = frm.OBJ; TreeListColumn column = treeList1.Columns["L10"]; CalculateSum(focusedNode, column, obj.L10, false); //// LoadData(); //// FoucsLocation(psp_Type.ID, treeList1.Nodes); //treeList1.RefreshDataSource(); //dataTable.Rows.Add(Itop.Common.DataConverter.ObjectToRow(psp_Type, dataTable.NewRow())); WaitDialogForm wait = null; try { wait = new WaitDialogForm("", "正在重新统计数据, 请稍候..."); LoadDatadata(); wait.Close(); // MsgBox.Show("计算成功"); } catch { wait.Close(); } //treeList1.FocusedNode.SetValue(treeList1.FocusedColumn.FieldName, lastEditValue); } }