internal static SPPaymentInfoWrapper ConvertEntityToWrapper(SPPaymentInfoEntity entity) { if (entity == null) { return(null); } if (entity.Id == 0) { return(null); } return(new SPPaymentInfoWrapper(entity)); }
public bool InsertPayment(SPPaymentInfoEntity paymentInfo, List <string> uniqueKeyNames, out PaymentInfoInsertErrorType errorType) { errorType = PaymentInfoInsertErrorType.NoError; SPPaymentInfoEntity spPaymentInfoEntity = this.DataObjectsContainerIocID.SPPaymentInfoDataObjectInstance.CheckChannleLinkIDIsExist(paymentInfo.ChannelID, paymentInfo, uniqueKeyNames); if (spPaymentInfoEntity != null) { errorType = PaymentInfoInsertErrorType.RepeatLinkID; return(false); } this.DataObjectsContainerIocID.SPPaymentInfoDataObjectInstance.Save(paymentInfo); return(true); }
internal SPPaymentInfoWrapper(SPPaymentInfoEntity entityObj) { entity = entityObj; }
public SPPaymentInfoEntity CheckChannleLinkIDIsExist(SPChannelEntity spChannelEntity, SPPaymentInfoEntity paymentInfo, List <string> uniqueKeyNames) { var queryBuilder = new NHibernateDynamicQueryGenerator <SPPaymentInfoEntity>(); queryBuilder.AddWhereClause(PROPERTY_CHANNELID.Eq(spChannelEntity)); queryBuilder.AddWhereClause(PROPERTY_LINKID.Eq(paymentInfo.Linkid)); if (uniqueKeyNames.Contains("mobile")) { queryBuilder.AddWhereClause(PROPERTY_MOBILENUMBER.Eq(paymentInfo.MobileNumber)); } return(this.FindSingleEntityByQueryBuilder(queryBuilder)); }
public SPPaymentInfoEntity CheckChannleLinkIDIsExist(SPChannelEntity spChannelEntity, SPPaymentInfoEntity paymentInfo) { var queryBuilder = new NHibernateDynamicQueryGenerator <SPPaymentInfoEntity>(); queryBuilder.AddWhereClause(PROPERTY_CHANNELID.Eq(spChannelEntity)); queryBuilder.AddWhereClause(PROPERTY_LINKID.Eq(paymentInfo.Linkid)); return(this.FindSingleEntityByQueryBuilder(queryBuilder)); }
public bool CheckHasLinkIDAndChannelID(SPPaymentInfoEntity paymentInfo) { SPPaymentInfoEntity spPaymentInfoEntity = this.DataObjectsContainerIocID.SPPaymentInfoDataObjectInstance.CheckChannleLinkIDIsExist(paymentInfo.ChannelID, paymentInfo); return(spPaymentInfoEntity != null); }