รวม code จากทุกคน ที่แก้ไข op ล่าสุด
This commit is contained in:
@@ -26,6 +26,7 @@ namespace TodoAPI2.Models
|
||||
public int? position_id { get; set; }
|
||||
|
||||
public int? position_type_id { get; set; }
|
||||
public string position_type_name { get; set; }
|
||||
|
||||
public string user_email { get; set; }
|
||||
|
||||
@@ -40,5 +41,27 @@ namespace TodoAPI2.Models
|
||||
|
||||
public int? position_level_id { get; set; }
|
||||
public string position_level_text { get; set; }
|
||||
|
||||
public DateTime? packing_date { get; set; }
|
||||
|
||||
public int? worked_month // ทำงานมาแล้วกี่เดือน
|
||||
{
|
||||
get
|
||||
{
|
||||
if (packing_date.HasValue)
|
||||
{
|
||||
DateTime startDate = packing_date.Value;
|
||||
DateTime endDate = DateTime.Now;
|
||||
int monthsApart = 12 * (startDate.Year - endDate.Year) + startDate.Month - endDate.Month;
|
||||
return Math.Abs(monthsApart);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user