public ExceptionTypes UpdateXMLMessage(MQMessagesRecieved objMQMessagesRecieved, out string errorMessage) { try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); errorMessage = string.Empty; List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; sqlParam = new SqlParameter(); sqlParam.ParameterName = "@MQMessagesRecievedId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objMQMessagesRecieved.MQMessagesRecievedId; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@IsProcessed"; sqlParam.SqlDbType = SqlDbType.Bit; sqlParam.Value = objMQMessagesRecieved.IsProcessed; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ProcessedResult"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objMQMessagesRecieved.ProcessedResult; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@SystemId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objMQMessagesRecieved.SystemId; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@MQTRRWorkQueueItemRef"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objMQMessagesRecieved.MQTRRWorkQueueItemRef; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ProcessingFailReason"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objMQMessagesRecieved.ProcessingFailReason; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = 0; executionResult = executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_BGP_UPD_MQMessagesRecieved, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { Console.WriteLine("Error : " + ex.Message); errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
public ExceptionTypes UpdateXMLMessage(MQMessagesRecieved objMQMessagesRecieved, out string errorMessage) { return(_retValue = _objDALMQ.UpdateXMLMessage(objMQMessagesRecieved, out errorMessage)); }