Exemple #1
0
 public override void CreatePartnerAccount(PartnerAccount account)
 {
     using (var db = dbFactory.Open())
     {
         var acc = db.Select<PartnerAccount>(x => x.ClientId == account.ClientId);
         if (acc.Count == 0)
             db.Insert(account);
     }
 }
Exemple #2
0
 public override void RegisterPartner(PartnerAccount account, string partnerName, string callbackUrl)
 {
     var query = Query<PartnerAccount>.EQ(e => e.ClientId, account.ClientId);
     var entity = _partners.FindOne(query);
     if(entity == null)
         return;
     var update = Update<PartnerAccount>.Set(e => e.PartnerName, partnerName);
     _partners.Update(query, update);
     update = Update<PartnerAccount>.Set(e => e.CallbackUrl, callbackUrl);
     _partners.Update(query, update);
     entity.CallbackUrl = callbackUrl;
 }
Exemple #3
0
 public override void RegisterPartner(PartnerAccount account, string partnerName, string callbackUrl)
 {
     using (var db = dbFactory.Open())
     {
         var acc = db.Select<PartnerAccount>(x => x.ClientId == account.ClientId);
         if (acc.Count == 0)
             return;
         var existingAccount = acc.First();
         existingAccount.PartnerName = partnerName;
         existingAccount.CallbackUrl = callbackUrl;
         db.Update(existingAccount);
     }
 }
Exemple #4
0
 public static void RegisterPartner(PartnerAccount account, string partnerName, string callbackUrl)
 {
     if (_storage == null)
         return;
     _storage.RegisterPartner(account, partnerName, callbackUrl);
 }
Exemple #5
0
 public static void CreatePartnerAccount(PartnerAccount account)
 {
     if (_storage == null)
         return;
     _storage.CreatePartnerAccount(account);
 }
Exemple #6
0
 public abstract void RegisterPartner(PartnerAccount account, string partnerName, string callbackUrl);
Exemple #7
0
 public abstract void CreatePartnerAccount(PartnerAccount account);
Exemple #8
0
 public override void CreatePartnerAccount(PartnerAccount account)
 {
     _partners.Insert(account);
 }
Exemple #9
0
 public override void CreatePartnerAccount(PartnerAccount account)
 {
     _partners.Insert(account);
 }
Exemple #10
0
 public static void CreatePartnerAccount(PartnerAccount account)
 {
     if (_storage == null)
         return;
     _storage.CreatePartnerAccount(account);
 }
Exemple #11
0
 public static void RegisterPartner(PartnerAccount account, string partnerName, string callbackUrl)
 {
     if (_storage == null)
         return;
     _storage.RegisterPartner(account, partnerName, callbackUrl);
 }
Exemple #12
0
 public abstract void RegisterPartner(PartnerAccount account, string partnerName, string callbackUrl);
Exemple #13
0
 public abstract void CreatePartnerAccount(PartnerAccount account);
Exemple #14
0
 public override void RegisterPartner(PartnerAccount account, string partnerName, string callbackUrl)
 {
     using (var db = dbFactory.Open())
     {
         var acc = db.Select<PartnerAccount>(x => x.ClientId == account.ClientId);
         if (acc.Count == 0)
             return;
         var existingAccount = acc.First();
         existingAccount.PartnerName = partnerName;
         existingAccount.CallbackUrl = callbackUrl;
         db.Update(existingAccount);
     }
 }
Exemple #15
0
 public override void CreatePartnerAccount(PartnerAccount account)
 {
     using (var db = dbFactory.Open())
     {
         var acc = db.Select<PartnerAccount>(x => x.ClientId == account.ClientId);
         if (acc.Count == 0)
             db.Insert(account);
     }
 }
Exemple #16
0
 public override void RegisterPartner(PartnerAccount account, string partnerName, string callbackUrl)
 {
     var query = Query<PartnerAccount>.EQ(e => e.ClientId, account.ClientId);
     var entity = _partners.FindOne(query);
     if(entity == null)
         return;
     var update = Update<PartnerAccount>.Set(e => e.PartnerName, partnerName);
     _partners.Update(query, update);
     update = Update<PartnerAccount>.Set(e => e.CallbackUrl, callbackUrl);
     _partners.Update(query, update);
     entity.CallbackUrl = callbackUrl;
 }