Пример #1
0
 public void UpdateCargoShip(Teretni cargoShip)
 {
     using (var db = new CruiseTrackerDBEntities())
     {
         db.Teretnis.AddOrUpdate(cargoShip);
         db.SaveChanges();
     }
 }
 private void EditSelectedCargoShip()
 {
     if (SelectedCargoShip != null)
     {
         cargoShip = SelectedCargoShip;
         MainViewModel.Instance.OnNav("EditCargoShip");
     }
 }
        public void UpdateCargoShip(Teretni cargoShip)
        {
            _cargoShipService.UpdateCargoShip(cargoShip);

            Brod boat = new Brod
            {
                idBroda = cargoShip.idBroda,
                naziv   = cargoShip.Brod.naziv
            };

            _boatService.UpdateBoat(boat);
        }