26 lines
716 B
C#
26 lines
716 B
C#
using System;
|
|
|
|
namespace AvaloniaApplication14_Inventory_300326.Models.Models;
|
|
|
|
public class Equipment : DBObj
|
|
{
|
|
public string InvNumber { get; set; } = "";
|
|
public string Name { get; set; } = "";
|
|
public DateOnly Date { get; set; } = DateOnly.FromDateTime(DateTime.Now);
|
|
public decimal Cost { get; set; } = 0;
|
|
public bool IsWrittenOff {get; set;} = false;
|
|
public int CurrentEmployeeId { get; set; } = 0;
|
|
|
|
public bool IsNew()
|
|
{
|
|
if (InvNumber == "" && Name == "" && Date == DateOnly.FromDateTime(DateTime.Now) && Cost == 0 && !IsWrittenOff && CurrentEmployeeId == 0)
|
|
{
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
} |