You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
835 B
35 lines
835 B
1 year ago
|
using UseRestService.Data;
|
||
|
using UseRestService.ViewModels;
|
||
|
|
||
|
namespace UseRestService.Pages;
|
||
|
|
||
|
[QueryProperty("PartToDisplay", "part")]
|
||
|
public partial class AddPartPage : ContentPage
|
||
|
{
|
||
|
AddPartViewModel viewModel;
|
||
|
public AddPartPage()
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
|
||
|
viewModel = new AddPartViewModel();
|
||
|
BindingContext = viewModel;
|
||
|
}
|
||
|
|
||
|
Part _partToDisplay;
|
||
|
public Part PartToDisplay
|
||
|
{
|
||
|
get => _partToDisplay;
|
||
|
set
|
||
|
{
|
||
|
if (_partToDisplay == value)
|
||
|
return;
|
||
|
|
||
|
_partToDisplay = value;
|
||
|
|
||
|
viewModel.PartID = _partToDisplay.PartID;
|
||
|
viewModel.PartName = _partToDisplay.PartName;
|
||
|
viewModel.Suppliers = _partToDisplay.SupplierString;
|
||
|
viewModel.PartType = _partToDisplay.PartType;
|
||
|
}
|
||
|
}
|
||
|
}
|