public override string GetDeleteRowsConfirmation() { if (ProjectUtilities.ProjectHasResults(this.Project)) { return(MessageStrings.PROMPT_TST_TYPE_CHANGE); } else { return(null); } }
private void OnCellValidating(object sender, DataGridViewCellValidatingEventArgs e) { if (e.Cancel == true) { return; } if (!this.m_Grid.IsCurrentCellDirty) { return; } DataGridViewColumn c = this.m_Grid.Columns[e.ColumnIndex]; if (c.Name != Strings.DATASHEET_TST_GROUP_MAXIMUM_COLUMN_NAME) { return; } if (!ProjectUtilities.ProjectHasResults(this.Project)) { return; } if (!ChartingUtilities.HasTSTClassUpdateTag(this.Project)) { if (MessageBox.Show( MessageStrings.PROMPT_TST_GROUP_CHANGE, "TST Group", MessageBoxButtons.YesNo) != DialogResult.Yes) { this.m_Grid.CancelEdit(); this.ActiveControl = this.m_Grid; e.Cancel = true; } } }
protected override bool OnBoundTextBoxValidating(TextBox textBox, string columnName, string proposedValue) { if (!base.OnBoundTextBoxValidating(textBox, columnName, proposedValue)) { return(false); } if (!ProjectUtilities.ProjectHasResults(this.Project)) { return(true); } if (!ChartingUtilities.HasAgeClassUpdateTag(this.Project)) { if (MessageBox.Show( MessageStrings.PROMPT_AGE_TYPE_CHANGE, "Age Type", MessageBoxButtons.YesNo) != DialogResult.Yes) { return(false); } } return(true); }