private void CreateNewTab(string title, SuperTask superTask) { TabPage newTabPage = new TabPage(title); var detail = new DetailPanel(); detail.Dock = DockStyle.Fill; detail.Bind(superTask); newTabPage.Controls.Add(detail); taskDetailTabControl.TabPages.Add(newTabPage); taskDetailTabControl.SelectTab(taskDetailTabControl.TabCount - 1); }
internal void Bind(SuperTask superTask) { this.superTask = superTask; this.textBoxTaskID.DataBindings.Add("Text", superTask, nameof(superTask.TaskID)); this.textBoxSubtaskType.DataBindings.Add("Text", superTask, nameof(superTask.SubtaskType)); this.textBoxSummary.DataBindings.Add("Text", superTask, nameof(superTask.Summary)); this.textBoxDescription.DataBindings.Add("Text", superTask, nameof(superTask.Description)); this.textBoxStatus.DataBindings.Add("Text", superTask, nameof(superTask.Status)); this.textBoxPriority.DataBindings.Add("Text", superTask, nameof(superTask.Priority)); this.textBoxProduct.DataBindings.Add("Text", superTask, nameof(superTask.Product)); this.textBoxProject.DataBindings.Add("Text", superTask, nameof(superTask.Project)); this.textBoxCreatedDate.DataBindings.Add("Text", superTask, nameof(superTask.CreatedDate)); this.textBoxCreatedBy.DataBindings.Add("Text", superTask, nameof(superTask.CreatedBy)); this.textBoxEstimation.DataBindings.Add("Text", superTask, nameof(superTask.Estimation)); this.textBoxTargetVersion.DataBindings.Add("Text", superTask, nameof(superTask.TargetVersion)); this.textBoxComments.DataBindings.Add("Text", superTask, nameof(superTask.Comments)); this.textBoxAssigned.DataBindings.Add("Text", superTask, nameof(superTask.Assigned)); }
private static string GetSingleValue(TaskMainDTO[] values) { string singleValue = new SuperTask().multipleValuesMessage; if (ValuesAreTheSame(values)) { singleValue = null; foreach (TaskMainDTO task in values) { if (task != null) { singleValue = task.TaskID; break; } } } return(singleValue); }
private static string GetSingleValue(UserDTO[][] values) { string singleValue = new SuperTask().multipleValuesMessage; if (ValuesAreTheSame(values)) { singleValue = null; foreach (UserDTO[] usersDTO in values) { if (usersDTO.Length > 0) { string[] userLogins = new string[usersDTO.Length]; for (int i = 0; i < usersDTO.Length; i++) { userLogins[i] = usersDTO[i].UserLogin; } singleValue = string.Join(", ", userLogins); break; } } } return(singleValue); }
private static string GetSingleValue(TaskMainDTO[] values) { string singleValue = new SuperTask().multipleValuesMessage; if (ValuesAreTheSame(values)) { singleValue = null; foreach (TaskMainDTO task in values) { if (task != null) { singleValue = task.TaskID; break; } } } return singleValue; }
private static string GetSingleValue(UserDTO[][] values) { string singleValue = new SuperTask().multipleValuesMessage; if (ValuesAreTheSame(values)) { singleValue = null; foreach (UserDTO[] usersDTO in values) { if (usersDTO.Length > 0) { string[] userLogins = new string[usersDTO.Length]; for (int i = 0; i < usersDTO.Length; i++) { userLogins[i] = usersDTO[i].UserLogin; } singleValue = string.Join(", ", userLogins); break; } } } return singleValue; }
private void Board_CellContentClick(object sender, DataGridViewCellEventArgs e) { SuperTask superTask = SuperTask.GetSuperTask(searchControl.Tasks[e.RowIndex]); CreateNewTab(superTask.TaskID, superTask); }