using System; namespace BuddyFinance.Integration.Models { public class EmploymentDetail { public int ProfileId { get; set; } = 0; public int? EmploymentStatusId { get; set; } public EmploymentStatus EmploymentStatus { get; set; } public string EmployerName { get; set; } = ""; //public string EmployerContactNumber { get; set; } = ""; public System.DateTime? EmploymentStartDate { get; set; } = null; public System.DateTime? EmploymentEndDate { get; set; } = null; public double? GrossMonthlyIncome { get; set; } public double? NetMonthlyIncome { get; set; } = null; public string EmployerNumber { get; set; } public int? EmploymentTypeId { get; set; } = null; public EmploymentType EmploymentType { get; set; } public int? SalaryDay { get; set; } = null; public int? BillingDay { get; set; } = null; public string BillingDayDescription { get { var desc = ""; if (SalaryDay != null) { switch (SalaryDay) { case 15: desc = "15th"; break; case 20: desc = "20th"; break; case 25: desc = "25th"; break; case 27: desc = "27th"; break; default: desc = "'Last day of the month"; break; } } return desc; } } //public DateTime? BillingDate { get; set; } = null; //public DateTime? BillingDate => GetBillingDate(); //private DateTime? GetBillingDate() //{ // if (BillingDay == null) // return null; // if (BillingDay == 30) // return new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month)); // return new DateTime(DateTime.Now.Year, DateTime.Now.Month, BillingDay.Value); //} } }