private void NewPlan() { frmTaskPlan fTaskPlan = new frmTaskPlan(); fTaskPlan.FormState = cGlobalParas.FormState.New; fTaskPlan.ShowDialog(); fTaskPlan.Dispose(); //�ж������ѡ�������ƻ��ڵ㣬�����ˢ�� if (this.treeMenu.SelectedNode.Name == "nodPlanRunning") { LoadTaskPlan(); } }
private void EditPlan() { if (this.dataTask.SelectedRows.Count == 0) return; try { Int64 pid=Int64.Parse (this.dataTask.SelectedCells[1].Value.ToString()); frmTaskPlan fp = new frmTaskPlan(); fp.LoadPlan(pid); fp.FormState = cGlobalParas.FormState.Edit; fp.ShowDialog(); fp.Dispose(); LoadTaskPlan(); } catch (System.Exception ex) { MessageBox.Show(rm.GetString("Info30") + ex.Message, rm.GetString ("MessageboxError"), MessageBoxButtons.OK, MessageBoxIcon.Error); } }