/// <summary> /// 生成任务 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CreateTask_Click(object sender, RoutedEventArgs e) { try { if (string.IsNullOrEmpty(wcsNO)) { return; } W_TaskData_Task _task = new W_TaskData_Task(wcsNO, "", 0); _task.ShowDialog(); GetDGitemInfo(); } catch (Exception ex) { Notice.Show("生成失败: " + ex.ToString(), "错误", 3, MessageBoxIcon.Error); } }
/// <summary> /// 更新任务 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void UpdateTask_Click(object sender, RoutedEventArgs e) { try { if (DGitem.SelectedItem == null) { return; } string id = (DGitem.SelectedItem as DataRowView)["ID"].ToString(); W_TaskData_Task _task = new W_TaskData_Task(wcsNO, id, 1); _task.ShowDialog(); GetDGitemInfo(); } catch (Exception ex) { Notice.Show("更新失败: " + ex.ToString(), "错误", 3, MessageBoxIcon.Error); } }