private void btn_ToDat_Click(object sender, EventArgs e) { ToDATForm datForm = new ToDATForm(); datForm.ShowInTaskbar = false; datForm.ShowDialog(); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tnMenu_ToDAT_Click(object sender, EventArgs e) { TreeNode currentNode = this.tv_TaskList.SelectedNode; //需要上线的任务编号 string taskNo = currentNode.Name; TaskBLL bll = new TaskBLL(); Task currentTask = bll.GetTask(int.Parse(taskNo)); if (currentTask.Phase == Model.Enum.PhaseEnum.DAT) { MessageBox.Show("已经是DAT状态"); return; } //调用用户控件进行处理 ToDATForm toDatForm = new ToDATForm(); toDatForm.CurrentTask = currentTask; toDatForm.InitData(); toDatForm.ShowDialog(); }