-
-
Save anonymous/a970d54ca9ac05c8ac16625058ff43c3 to your computer and use it in GitHub Desktop.
WTF?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string CreateFileName(string jobReference, string type, string user, string fileType) | |
{ | |
string documentName = string.Empty; | |
string sql = "Select 'tfr_in'||:P_Job_Reference||:P_User_Id ||to_char(Sysdate, 'yyyymmddhh24miss')||'.'||lower(:P_Doc_Type) From Dual"; | |
List<framework.db.IDatabaseParameter> paramList = new List<framework.db.IDatabaseParameter>(); | |
paramList.Add(localClass.NewParameter(":p_job_reference", ParameterDirection.Input, DbType.String, jobReference)); | |
paramList.Add(localClass.NewParameter(":P_User_Id", ParameterDirection.Input, DbType.String, user)); | |
paramList.Add(localClass.NewParameter(":P_Doc_Type", ParameterDirection.Input, DbType.String, type)); | |
using (var connection = framework.db.DatabaseConnectionFactory.createDatabaseConnection(framework.db.DatabaseType.ORACLE)) | |
{ | |
connection.open(); | |
DataTable dt = connection.executeSelect(sql, CommandType.Text, paramList); | |
if (dt != null && dt.Rows.Count > 0) | |
{ | |
documentName = dt.Rows[0][0].ToString(); | |
} | |
} | |
return documentName; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment