// 添加新任务,打开添加新任务form private void button4_Click(object sender, EventArgs e) { this.add_task = new task_entity(); this.add_task.clear(); this.todayTime = this.monthCalendar1.SelectionStart.ToString("yyyyMMdd"); // 获取当天的任务数量,并生成下一个taskid int Count = getTaskId(this.todayTime); string taskid = (Count + 1).ToString(); this.addForm = new Add_Form(this, taskid); this.addForm.ShowUpdate += new Add_Form.DisplayUpdateDelegate(addNewTask); }
// 修改任务记录 private void button6_Click(object sender, EventArgs e) { this.modify_task = new task_entity(); this.modify_task.clear(); string taskid = this.select_task.Task_id; string time = this.select_task.Time; string topic = this.select_task.Topic; string people = this.select_task.People; string result = this.select_task.Result; string reason = this.select_task.Resaon; string dependence = this.select_task.Dependence; string isdelete = "0"; this.addForm = new Add_Form(taskid, time, topic, people, dependence, result, reason); this.addForm.ShowUpdate += new Add_Form.DisplayUpdateDelegate(modifyTask); }