исправления ошибок.
This commit is contained in:
parent
0691d3f44f
commit
5a09463d31
@ -9,6 +9,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace ShipyardFileImplement.Implements
|
||||
{
|
||||
@ -75,13 +76,13 @@ namespace ShipyardFileImplement.Implements
|
||||
public ShopViewModel? Delete(ShopBindingModel model)
|
||||
{
|
||||
var shop = source.Shops.FirstOrDefault(x => x.Id == model.Id);
|
||||
if (shop == null)
|
||||
if (shop != null)
|
||||
{
|
||||
return null;
|
||||
source.Shops.Remove(shop);
|
||||
source.SaveShops();
|
||||
return shop.GetViewModel;
|
||||
}
|
||||
shop.Update(model);
|
||||
source.SaveShops();
|
||||
return shop.GetViewModel;
|
||||
return null;
|
||||
}
|
||||
public bool SellShips(IShipModel model, int count)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user