DB integration added, multiple images for equipment
This commit is contained in:
@@ -7,6 +7,7 @@ namespace GazpromApp.ViewModels;
|
||||
|
||||
public partial class InspectionViewModel : ViewModelBase
|
||||
{
|
||||
private Inspection Inspection { get; }
|
||||
[ObservableProperty]
|
||||
private string _name;
|
||||
[ObservableProperty]
|
||||
@@ -27,6 +28,7 @@ public partial class InspectionViewModel : ViewModelBase
|
||||
InspectionDate = DateTimeOffset.Now;
|
||||
PeriodType = 0;
|
||||
PeriodValue = 1;
|
||||
Inspection = new Inspection();
|
||||
}
|
||||
|
||||
public InspectionViewModel(Inspection inspection)
|
||||
@@ -35,16 +37,15 @@ public partial class InspectionViewModel : ViewModelBase
|
||||
InspectionDate = inspection.InspectionDate;
|
||||
PeriodType = inspection.PeriodType.ToPeriodType();
|
||||
PeriodValue = inspection.PeriodValue;
|
||||
Inspection = inspection;
|
||||
}
|
||||
|
||||
public Inspection GetInspection()
|
||||
{
|
||||
return new Inspection
|
||||
{
|
||||
Name = Name,
|
||||
InspectionDate = InspectionDate,
|
||||
PeriodType = PeriodType.ToDescription(),
|
||||
PeriodValue = PeriodValue
|
||||
};
|
||||
Inspection.Name = Name;
|
||||
Inspection.InspectionDate = InspectionDate;
|
||||
Inspection.PeriodType = PeriodType.ToDescription();
|
||||
Inspection.PeriodValue = PeriodValue;
|
||||
return Inspection;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user