internal static SPRecordExtendInfoWrapper ConvertEntityToWrapper(SPRecordExtendInfoEntity entity)
        {
            if (entity == null)
            {
                return(null);
            }

            if (entity.Id == 0)
            {
                return(null);
            }

            return(new SPRecordExtendInfoWrapper(entity));
        }
        public bool InsertPayment(SPRecordEntity record, SPRecordExtendInfoEntity spRecordExtendInfo, out RequestErrorType requestError, out string errorMessage)
        {
            requestError = RequestErrorType.NoError;

            if (this.CheckHasLinkIDAndChannelID(record.ChannelID, record.LinkID))
            {
                requestError = RequestErrorType.RepeatLinkID;

                errorMessage = "";

                return(false);
            }

            try
            {
                this.DataObjectsContainerIocID.SPRecordDataObjectInstance.Save(record);
                spRecordExtendInfo.RecordID = record;
                this.DataObjectsContainerIocID.SPRecordExtendInfoDataObjectInstance.Save(spRecordExtendInfo);
                errorMessage = "";
                return(true);
            }
            catch (Exception ex)
            {
                Exception innerEx = ex;

                while (innerEx.InnerException != null)
                {
                    innerEx = innerEx.InnerException;
                }

                if (innerEx is SqlException && ((SqlException)innerEx).Number == 2601)
                {
                    requestError = RequestErrorType.RepeatLinkID;
                    errorMessage = "";
                    return(false);
                }

                throw ex;
            }
        }
 internal SPRecordExtendInfoWrapper(SPRecordExtendInfoEntity entityObj)
     : base(entityObj)
 {
 }