public void dataGridTask_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (e.ChangedButton == MouseButton.Left) { DataGridRow dgr = DataGridRow.GetRowContainingElement(e.OriginalSource as FrameworkElement); if (dgr != null) { CO_IA.Data.Task task = dgr.DataContext as CO_IA.Data.Task; if (task != null) { Window wnd; if (task.FormState == AT_BC.Data.FormState.Check) { wnd = new Task.ExecutorTaskConclusionWindow(); wnd.DataContext = task; if (wnd.ShowDialog(this) == true) { this.executedTasks.View.Refresh(); this.executableTasks.View.Refresh(); } } } } } }
public void dataGridTask_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (e.ChangedButton == MouseButton.Left) { DataGridRow dgr = DataGridRow.GetRowContainingElement(e.OriginalSource as FrameworkElement); if (dgr != null) { CO_IA.Data.Task task = dgr.DataContext as CO_IA.Data.Task; if (task != null) { Window wnd; if (task.FormState == AT_BC.Data.FormState.Check) { wnd = new Task.TaskExecutedWindow(); } else { wnd = new Task.TaskEditWindow(); } wnd.DataContext = task; wnd.ShowDialog(this); } } } }
private void UpdateTask(CO_IA.Data.Task task) { if (task == null) { return; } this.comboBoxTaskPalce.SelectedValue = task.TaskPlaceID; foreach (var child in this.wrapPanelUrgency.Children) { var radioButton = child as RadioButton; if (task.Urgency.Equals(radioButton.DataContext)) { radioButton.IsChecked = true; break; } } //this.SetupOrgTree(task.ActivityGuid); //this.UpdateUIState(task); if (task.Executors != null && task.Executors.Length > 0) { foreach (var executor in task.Executors) { foreach (var org in this.orgList) { if (org.GUID == executor.Executor) { org.IsChecked = true; break; } } } } if (task.TaskType == TaskType.Disturb) { TaskDisturbInfo disturbInfo = task.DisturbInfo; this.textBoxOrg.Text = disturbInfo.DisturbedOrg; this.textBoxContact.Text = disturbInfo.Contact; this.textBoxPhone.Text = disturbInfo.Phone; this.textBoxDisturbedMHzFreq.Text = disturbInfo.DisturbedMHzFreq.ToString(); this.textBoxEquipmentModel.Text = disturbInfo.EquipmentModel; this.comboBoxDisturbLevel.SelectedValue = disturbInfo.DisturbLevel; this.comboBoxDisturbMode.SelectedValue = disturbInfo.DisturbType; } PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.MonitorTask.I_CO_IA_MonitorTask>(channel => { this.listBoxTaskStuff.ItemsSource = new ObservableCollection <TaskStuff>(channel.GetTaskStuffs(task.Key, AT_BC.Data.MultipleBoolen.False)); }); }
private void SaveDisturbInfo(CO_IA.Data.Task task) { if (task.TaskType != TaskType.Disturb) { return; } var disturbInfo = task.DisturbInfo; disturbInfo.Contact = this.textBoxContact.Text; disturbInfo.DisturbedOrg = this.textBoxOrg.Text; disturbInfo.Phone = this.textBoxPhone.Text; disturbInfo.EquipmentModel = this.textBoxEquipmentModel.Text; double disturbedFreq; double.TryParse(this.textBoxDisturbedMHzFreq.Text, out disturbedFreq); disturbInfo.DisturbedMHzFreq = disturbedFreq; disturbInfo.DisturbLevel = (DisturbLevel)this.comboBoxDisturbLevel.SelectedValue; disturbInfo.DisturbType = (DisturbType)this.comboBoxDisturbMode.SelectedValue; }