예제 #1
0
        public override int InsertQueryReply(ReplyProperty objReplyProperty, out string errMsg)
        {
            _objDataWrapper = new DbWrapper(Common.CnnString, CommandType.StoredProcedure);
            errMsg          = "";
            try
            {
                _objDataWrapper.AddParameter("@UserId", objReplyProperty.ReplyBy);
                _objDataWrapper.AddParameter("@QueryId", objReplyProperty.QueryId);
                _objDataWrapper.AddParameter("@QueryReply", objReplyProperty.QueryReply);

                var objerrMsg =
                    (SqlParameter)(_objDataWrapper.AddParameter("@ErrMsg", "", SqlDbType.VarChar, ParameterDirection.Output, 128));
                _i = _objDataWrapper.ExecuteNonQuery("Aj_Proc_InsertQueryReply");
                if (objerrMsg != null && objerrMsg.Value != null)
                {
                    errMsg = Convert.ToString(objerrMsg.Value);
                }
            }
            catch (Exception ex)
            {
                var err = ex.Message;
                if (ex.InnerException != null)
                {
                    err = err + " :: Inner Exception :- " + ex.ToString();
                }
                const string addInfo = "Error while executing InsertQueryReply in Query.cs  :: -> ";
                var          objPub  = new ClsExceptionPublisher();
                objPub.Publish(err, addInfo);
            }
            return(_i);
        }
예제 #2
0
 public abstract int InsertQueryReply(ReplyProperty objReplyProperty, out string errMsg);