private bool SaveSettings() { try { TableName = txtTableDesc.Text; if (string.IsNullOrEmpty(TableName)) { EnvDteHelper.ShowError("Table name is required"); return(false); } var validation = TableColumn.ValidateColumns(_columns.ToList()); if (!string.IsNullOrEmpty(validation)) { EnvDteHelper.ShowError(validation); return(false); } TableColumns = TableColumn.BuildColumns(_columns.ToList(), TableName); PkScript = TableColumn.BuildPkScript(_columns.ToList(), TableName); PkScript = _dbType == DatabaseType.SQLite ? BuildSqLitePkScript(_columns.ToList(), TableName) : TableColumn.BuildPkScript(_columns.ToList(), TableName); return(true); } catch (Exception ex) { DataConnectionHelper.SendError(ex, DatabaseType.SQLServer); } return(false); }
private bool SaveSettings() { TableName = this.txtTableDesc.Text; if (string.IsNullOrEmpty(TableName)) { MessageBox.Show("Table name is required"); return(false); } var validation = TableColumn.ValidateColumns(columns.ToList()); if (!string.IsNullOrEmpty(validation)) { MessageBox.Show(validation); return(false); } TableColumns = TableColumn.BuildColumns(columns.ToList(), TableName); PkScript = TableColumn.BuildPkScript(columns.ToList(), TableName); return(true); }