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