Пример #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);
     }
 }
Пример #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;
 }
Пример #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);
     }
 }
Пример #4
0
 public static void RegisterPartner(PartnerAccount account, string partnerName, string callbackUrl)
 {
     if (_storage == null)
         return;
     _storage.RegisterPartner(account, partnerName, callbackUrl);
 }
Пример #5
0
 public static void CreatePartnerAccount(PartnerAccount account)
 {
     if (_storage == null)
         return;
     _storage.CreatePartnerAccount(account);
 }
Пример #6
0
 public abstract void RegisterPartner(PartnerAccount account, string partnerName, string callbackUrl);
Пример #7
0
 public abstract void CreatePartnerAccount(PartnerAccount account);
Пример #8
0
 public override void CreatePartnerAccount(PartnerAccount account)
 {
     _partners.Insert(account);
 }
Пример #9
0
 public override void CreatePartnerAccount(PartnerAccount account)
 {
     _partners.Insert(account);
 }
Пример #10
0
 public static void CreatePartnerAccount(PartnerAccount account)
 {
     if (_storage == null)
         return;
     _storage.CreatePartnerAccount(account);
 }
Пример #11
0
 public static void RegisterPartner(PartnerAccount account, string partnerName, string callbackUrl)
 {
     if (_storage == null)
         return;
     _storage.RegisterPartner(account, partnerName, callbackUrl);
 }
Пример #12
0
 public abstract void RegisterPartner(PartnerAccount account, string partnerName, string callbackUrl);
Пример #13
0
 public abstract void CreatePartnerAccount(PartnerAccount account);
Пример #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);
     }
 }
Пример #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);
     }
 }
Пример #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;
 }