// 待签字列表的单机事件 private void ToDoListView_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } if (e.ColumnIndex == 1) { string Id = this.ToDoListView.Rows[e.RowIndex].Cells[0].Value.ToString(); SignConTemp sct = new SignConTemp(_sc, Id, 4); sct.ShowDialog(); if (sct.DialogResult == DialogResult.OK) { sct.Close(); ///[BUG NO.2015-07-05 17:52] BindUnsignData(true); // 用户签字后,待办列表数目减少1,已办列表数目增加1 MainWindow mw = (MainWindow)this.MdiParent; foreach (TreeNode t in mw.treeView1.Nodes) { if (t.Text.Contains("签字管理(")) { int count = Convert.ToInt32(t.Text.Split('(')[1].Split(')')[0]); if (count - 1 == 0) { t.Text = "签字管理"; t.Nodes[0].Text = "待办列表"; } else { t.Text = "签字管理(" + (count - 1) + ")"; t.Nodes[0].Text = "待办列表(" + (count - 1) + ")"; } } } //BindSignedData(true); } } }
// 待签字列表的单机事件 private void ToDoListView_CellContentClick(object sender, DataGridViewCellEventArgs e) { //用于判断是否签单同意 用于刷新列表 bool ifok = false;; if (e.RowIndex < 0) { return; } if (e.ColumnIndex == 1) { string Id = this.ToDoListView.Rows[e.RowIndex].Cells[0].Value.ToString(); //这里也要区分模版类型 string type = Id[1].ToString() + Id[2].ToString(); if (type == "内例" || type == "内专") { //显示内河的模版 SignConTempInside sct = new SignConTempInside(_sc, Id, 4); sct.ShowDialog(); if (sct.DialogResult == DialogResult.OK) { sct.Close(); ifok = true; } } if (type == "界例") { //显示界河例行的模版 SignConTempJHLX sct = new SignConTempJHLX(_sc, Id, 4); sct.ShowDialog(); if (sct.DialogResult == DialogResult.OK) { sct.Close(); ifok = true; } } if (type == "界专") { SignConTemp sct = new SignConTemp(_sc, Id, 4); sct.ShowDialog(); if (sct.DialogResult == DialogResult.OK) { sct.Close(); ifok = true; } } if (ifok == true) { //刷新数据 ///[BUG NO.2015-07-05 17:52] BindUnsignData(true); // 用户签字后,待办列表数目减少1,已办列表数目增加1 MainWindow mw = (MainWindow)this.MdiParent; foreach (TreeNode t in mw.treeView1.Nodes) { if (t.Text.Contains("签字管理(")) { int count = Convert.ToInt32(t.Text.Split('(')[1].Split(')')[0]); if (count - 1 == 0) { t.Text = "签字管理"; t.Nodes[0].Text = "待办列表"; } else { t.Text = "签字管理(" + (count - 1) + ")"; t.Nodes[0].Text = "待办列表(" + (count - 1) + ")"; } } } //BindSignedData(true); } //SignConTemp sct = new SignConTemp(_sc, Id, 4); //sct.ShowDialog(); } }