private void 新建任务toolStripMenuItem3_Click(object sender, EventArgs e) { try { FrmTaskNew frmTaskNew = new FrmTaskNew(); frmTaskNew.StartPosition = FormStartPosition.CenterScreen; frmTaskNew.ClsTask.ProjectID = projectID; if (frmTaskNew.ShowDialog() == DialogResult.OK) { refreshProjectTree(); } } catch (Exception) { } }
private void 修改任务toolStripMenuItem4_Click(object sender, EventArgs e) { try { FrmTaskNew frmTaskNew = new FrmTaskNew(); frmTaskNew.StartPosition = FormStartPosition.CenterScreen; frmTaskNew.ClsTask.ProjectID = projectID; frmTaskNew.ClsTask.strTaskName = strTaskName; frmTaskNew.ClsTask.Disk = strDisk; frmTaskNew.ClsTask.StartPosition = strStartPosition; frmTaskNew.ClsTask.Description = description; frmTaskNew.ClsTask.TaskID = taskID; if (frmTaskNew.ShowDialog() == DialogResult.OK) { refreshProjectTree(); } } catch (Exception) { } }
private void toolStripMenuItem2_Click(object sender, EventArgs e) { try { FrmTaskNew frmTaskNew = new FrmTaskNew(); frmTaskNew.StartPosition = FormStartPosition.CenterScreen; frmTaskNew.ClsTask.ProjectID = projectID; frmTaskNew.ClsTask.strTaskName = strTaskName; frmTaskNew.ClsTask.Disk = strDisk; frmTaskNew.ClsTask.StartPosition = strStartPosition; frmTaskNew.ClsTask.Description = strDescription; //frmTaskNew.ShowDialog(); frmTaskNew.ClsTask.TaskID = sqlMethod.ModifyTask(frmTaskNew.ClsTask); frmTaskNew.ShowDialog(); //if (frmTaskNew.ShowDialog() == DialogResult.OK) //{ // refreshProjectTree(); //} } catch (Exception) { } }