public bool AOX_InsertFAXBOX(SendRequestMasterInfo p_mstr) { string strProcedureName = "PKG_PRC_COMMON.USP_FAXSEND_SET_FAXBOX"; //decimal faxID = -1; try { using (OracleCommand command = new OracleCommand()) { command.Connection = m_connection; command.CommandText = strProcedureName; command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("P_REQ_USER_ID ".Trim(), p_mstr.REQ_USER_ID); command.Parameters.AddWithValue("P_FAX_ID ".Trim(), p_mstr.OUT_FAX_ID); OracleParameter resultParam = new OracleParameter("P_RESULT", OracleType.VarChar, 1); resultParam.Direction = ParameterDirection.Output; command.Parameters.Add(resultParam); int cnt = command.ExecuteNonQuery(); if (cnt > 0) { //faxID = Convert.ToDecimal(resultParam.Value); } } } catch (Exception ex) { ExceptionMsg(ex, "PROCEDURE : " + strProcedureName); //return -1; throw ex; } return(true); }
/// <summary> /// Name : AOX_InsertSendMaster /// Parameters : /// Content : BTF_FAX_SEND_MSTR 테이블에 INSERT /// Return : true / false /// Writer : 장동훈 /// Date : 2012.09.06 /// </summary> public decimal AOX_InsertSendMaster(SendRequestMasterInfo p_mstr) { string strProcedureName = "PKG_PRC_AOX.USP_INSERT_SEND_MSTR"; decimal faxID = -1; try { using (OracleCommand command = new OracleCommand()) { command.Connection = m_connection; command.CommandText = strProcedureName; command.CommandType = CommandType.StoredProcedure; //AddInParam("P_INDEX_NO ", OracleType.VarChar, p_mstr.INDEX_NO); //command.Parameters.AddWithValue("P_INDEX_NO ".Trim(), p_mstr.INDEX_NO); command.Parameters.AddWithValue("P_TR_NO ".Trim(), p_mstr.TR_NO); command.Parameters.AddWithValue("P_STATE ".Trim(), p_mstr.STATE); command.Parameters.AddWithValue("P_PRIORITY ".Trim(), p_mstr.PRIORITY); command.Parameters.AddWithValue("P_TITLE ".Trim(), p_mstr.TITLE); command.Parameters.AddWithValue("P_MEMO ".Trim(), p_mstr.MEMO); command.Parameters.AddWithValue("P_PRE_PROCESS_REQ ".Trim(), p_mstr.PRE_PROCESS_REQ); command.Parameters.AddWithValue("P_REQ_TYPE ".Trim(), p_mstr.REQ_TYPE); command.Parameters.AddWithValue("P_REQUESTER_TYPE ".Trim(), p_mstr.REQUESTER_TYPE); command.Parameters.AddWithValue("P_REQ_USER_ID ".Trim(), p_mstr.REQ_USER_ID); command.Parameters.AddWithValue("P_REQ_USER_NAME ".Trim(), p_mstr.REQ_USER_NAME); command.Parameters.AddWithValue("P_REQ_USER_TELNO ".Trim(), p_mstr.REQ_USER_TELNO); command.Parameters.AddWithValue("P_REQ_DATE ".Trim(), p_mstr.REQ_DATE); command.Parameters.AddWithValue("P_PREVIEW_REQ ".Trim(), p_mstr.PREVIEW_REQ); //command.Parameters.AddWithValue("P_PREVIEWED_ID ".Trim(), p_mstr.PREVIEWED_ID); //command.Parameters.AddWithValue("P_PREVIEWED_DATE ".Trim(), p_mstr.PREVIEWED_DATE); command.Parameters.AddWithValue("P_APPROVE_REQ ".Trim(), p_mstr.APPROVE_REQ); //command.Parameters.AddWithValue("P_APPROVED_YN ".Trim(), p_mstr.APPROVED_YN); //command.Parameters.AddWithValue("P_APPROVED_ID ".Trim(), p_mstr.APPROVED_ID); //command.Parameters.AddWithValue("P_APPROVED_DATE ".Trim(), p_mstr.APPROVED_DATE); //command.Parameters.AddWithValue("P_APPROVED_COMMENT".Trim(), p_mstr.APPROVED_COMMENT); command.Parameters.AddWithValue("P_RESERVED_YN ".Trim(), p_mstr.RESERVED_YN); //command.Parameters.AddWithValue("P_RESERVED_DATE ".Trim(), p_mstr.RESERVED_DATE); //command.Parameters.AddWithValue("P_PROCESS_FETCH ".Trim(), p_mstr.PROCESS_FETCH); //command.Parameters.AddWithValue("P_SMS_CONTENTS ".Trim(), p_mstr.SMS_CONTENTS); command.Parameters.AddWithValue("P_SMS_SEND_YN ".Trim(), p_mstr.SMS_SEND_YN); //command.Parameters.AddWithValue("P_RESULT_FORWARD ".Trim(), p_mstr.RESULT_FORWARD); command.Parameters.AddWithValue("P_TEST_TYPE ".Trim(), p_mstr.TEST_TYPE); command.Parameters.AddWithValue("P_BROADCAST_YN ".Trim(), p_mstr.BROADCAST_YN); OracleParameter faxIdParam = new OracleParameter("P_OUT_FAX_ID", OracleType.Number); faxIdParam.Direction = ParameterDirection.Output; command.Parameters.Add(faxIdParam); int cnt = command.ExecuteNonQuery(); if (cnt > 0) { faxID = Convert.ToDecimal(faxIdParam.Value); } } } catch (Exception ex) { ExceptionMsg(ex, "PROCEDURE : " + strProcedureName); //return -1; throw ex; } return(faxID); }