public void Update(long applicationId, ApplicationClientModel application, TransitEditModel transit) { var data = _applications.Get(applicationId); _transits.Update(data.TransitId, transit, null, applicationId); var forwarderId = _forwarders.GetByCityOrAny(transit.CityId, data.ForwarderId); Map(application, data, forwarderId); _updater.Update(applicationId, data); }
public void Update(long applicationId, ApplicationAdminModel model, TransitEditModel transit) { var data = _applications.Get(applicationId); _transitService.Update(data.TransitId, transit, model.CarrierId, applicationId); data.Invoice = model.Invoice; data.Characteristic = model.Characteristic; data.AddressLoad = model.AddressLoad; data.WarehouseWorkingTime = model.WarehouseWorkingTime; data.Weight = model.Weight; data.Count = model.Count; data.Volume = model.Volume; data.TermsOfDelivery = model.TermsOfDelivery; data.Value = model.Currency.Value; data.CurrencyId = model.Currency.CurrencyId; data.CountryId = model.CountryId; data.FactoryName = model.FactoryName; data.FactoryPhone = model.FactoryPhone; data.FactoryEmail = model.FactoryEmail; data.FactoryContact = model.FactoryContact; data.MarkName = model.MarkName; data.IsPickup = model.IsPickup; data.MethodOfDelivery = model.MethodOfDelivery; data.FactureCost = model.FactureCost; data.FactureCostEx = model.FactureCostEx; data.TransitCost = model.TransitCost; data.PickupCost = model.PickupCost; data.TariffPerKg = model.TariffPerKg; data.FactureCostEdited = model.FactureCostEdited; data.FactureCostExEdited = model.FactureCostExEdited; data.TransitCostEdited = model.TransitCostEdited; data.PickupCostEdited = model.PickupCostEdited; data.ScotchCostEdited = model.ScotchCostEdited; data.SenderId = model.SenderId; data.ForwarderId = GetForwarderId(model.ForwarderId, transit.CityId, data.ForwarderId); data.InsuranceRate = model.InsuranceRate / 100; data.CountInInvoce = model.CountInInvoce; data.DocumentWeight = model.DocumentWeight; data.MRN = model.MRN; data.Comments = model.Comments; _editor.Update(applicationId, data); }
private void Update( long clientId, ClientEditData clientEditData, long transitId, TransitEditModel transit, long userId, AuthenticationModel authentication) { using (var ts = new TransactionScope()) { _transits.Update(transitId, transit, null, null); _clients.Update(clientId, clientEditData); _users.SetLogin(userId, authentication.Login); if (!string.IsNullOrWhiteSpace(authentication.NewPassword)) { _users.SetPassword(userId, authentication.NewPassword); } ts.Complete(); } }