fix
This commit is contained in:
parent
e6867ecc4c
commit
453ed01e98
@ -50,14 +50,14 @@ namespace LawFirmFileImplement.Implements
|
||||
}
|
||||
public DocumentViewModel? Update(DocumentBindingModel model)
|
||||
{
|
||||
var ship = source.Documents.FirstOrDefault(x => x.Id == model.Id);
|
||||
if (ship == null)
|
||||
var document = source.Documents.FirstOrDefault(x => x.Id == model.Id);
|
||||
if (document == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
ship.Update(model);
|
||||
document.Update(model);
|
||||
source.SaveDocuments();
|
||||
return ship.GetViewModel;
|
||||
return document.GetViewModel;
|
||||
}
|
||||
public DocumentViewModel? Delete(DocumentBindingModel model)
|
||||
{
|
||||
|
@ -49,10 +49,10 @@ namespace LawFirmFileImplement.Implements
|
||||
private OrderViewModel GetViewModel(Order order)
|
||||
{
|
||||
var viewModel = order.GetViewModel;
|
||||
var ship = _source.Documents.FirstOrDefault(x => x.Id == order.DocumentId);
|
||||
if (ship != null)
|
||||
var document = _source.Documents.FirstOrDefault(x => x.Id == order.DocumentId);
|
||||
if (document != null)
|
||||
{
|
||||
viewModel.DocumentName = ship.DocumentName;
|
||||
viewModel.DocumentName = document.DocumentName;
|
||||
}
|
||||
return viewModel;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user