Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void UpdateAzureDiscountGroupReseller(IQueryable<Reseller> model)
- {
- Reseller resellerObj = new Reseller();
- foreach (var item in model)
- {
- resellerObj.AzureDiscountGroupId = null;
- resellerObj.AcceptContractCustomer = item.AcceptContractCustomer;
- resellerObj.Id = item.Id;
- resellerObj.Name = item.Name;
- resellerObj.Alias = item.Alias;
- resellerObj.Enabled = item.Enabled;
- resellerObj.ResellerMpnId = item.ResellerMpnId;
- resellerObj.ServiceApiUser = item.ServiceApiUser;
- resellerObj.ServiceApiPassword = item.ServiceApiPassword;
- resellerObj.HomeTemplateId = item.HomeTemplateId;
- resellerObj.CategoriesIds = item.CategoriesIds;
- resellerObj.AcceptContractCustomerId = item.AcceptContractCustomerId;
- resellerObj.AcceptContractDate = item.AcceptContractDate;
- resellerObj.PathServiceContractAzure = item.PathServiceContractAzure;
- resellerObj.PathPartnershipContractAzure = item.PathPartnershipContractAzure;
- _resellerService.Update(resellerObj);
- }
- public void Update(Reseller reseller)
- {
- var existingResellerWithSameAlias = GetByAlias(reseller.Alias);
- if (existingResellerWithSameAlias != null && existingResellerWithSameAlias.Id != reseller.Id)
- throw new KeyDuplicatedException("There is a reseller with the same ID or Alias on Database");
- _resellerRepository.Update(reseller);
- cache.Update(reseller.Alias, reseller);
- _logTracker.Register(LogTrackType.Update, reseller);
- }
- _logTracker.Register(LogTrackType.Update, reseller);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement