private void CreateOutput(string ProcedureName, bool WriteFiles, bool WriteSP, string CommandText, string outputType = "", string outputFile = "") { if (WriteSP) { if (this.OverwriteExistingSps) { this.DropProcedure(ProcedureName); } int num = 1; DataAccessSql.ExecuteNonQuery(CommandText, (CommandType)num); } if (WriteFiles) { if (outputFile != "") { SaveToFile(CommandText, ProcedureName, outputType, outputFile); } else if (outputFile != "controller") { SaveToFile(CommandText, ProcedureName, outputType, outputFile); } else { SaveToFile(CommandText, ProcedureName, "sql"); } } }
private void DropProcedure(string Name) { try { DataAccessSql.ExecuteNonQuery("DROP PROCEDURE " + Name, CommandType.Text); } catch (Exception ex) { throw ex; } }