/// <summary>
        /// Saves the specified rta edi response.
        /// </summary>
        /// <param name="rtaEdiResponse">The rta edi response.</param>
        /// <returns></returns>
        public long Save(RtaEdiResponse rtaEdiResponse)
        {
            //Checks if input response is not null
            if (rtaEdiResponse != null)
            {
                // Initialize the Stored Procedure
                _databaseCommandObj = _databaseObj.GetStoredProcCommand("RTA_AddResponse");
                _databaseCommandObj.CommandTimeout = 5400;

                // Pass parameters to Stored Procedure(i.e., @ParamName), add values for
                _databaseObj.AddInParameter(_databaseCommandObj, "@EdiRequestID", DbType.Int64,
                                            rtaEdiResponse.EdiRequestId);
                _databaseObj.AddInParameter(_databaseCommandObj, "@EdiResponseOutput", DbType.String,
                                            rtaEdiResponse.ResponseOutput);
                _databaseObj.AddInParameter(_databaseCommandObj, "@RTACodeID", DbType.Int32,
                                            rtaEdiResponse.RtaCodeId);
                _databaseObj.AddInParameter(_databaseCommandObj, "@ResponseType", DbType.String,
                                            rtaEdiResponse.ResponseType);
                _databaseObj.AddInParameter(_databaseCommandObj, "@CalcAllowedAmt", DbType.Double, rtaEdiResponse.CalcAllowedAmt);

                _databaseObj.AddInParameter(_databaseCommandObj, "@PaymentResult", DbType.String, rtaEdiResponse.PaymentResult);

                // Retrieve the results of the Stored Procedure
                long ediResponseId;
                long.TryParse(_databaseObj.ExecuteScalar(_databaseCommandObj).ToString(), out ediResponseId);
                return(ediResponseId);
            }
            //returns response either rtaEdiResponse is null
            return(0);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Saves the specified rta edi response.
 /// </summary>
 /// <param name="rtaEdiResponse">The rta edi response.</param>
 /// <returns></returns>
 public long Save(RtaEdiResponse rtaEdiResponse)
 {
     return(_rtaEdiResponseRepository.Save(rtaEdiResponse));
 }
 public long Save(RtaEdiResponse rtaEdiResponse)
 {
     return(_rtaEdiResponseLogic.Save(rtaEdiResponse));
 }