public CheckinNotification(CheckinNotification c, Checkin.NotificationType type) { CheckInId = c.CheckInId; SpaceId = c.SpaceId; UserId = c.UserId; StartTime = c.StartTime; EndTime = c.EndTime; LastModified = (type == Checkin.NotificationType.Checkout && c.EndTime.HasValue) ? c.EndTime.Value : c.StartTime; RegisteredBy = c.RegisteredBy; RegisteredFrom = c.RegisteredFrom; NotificationType = (int)((type == Checkin.NotificationType.Checkout && c.EndTime.HasValue) ? Checkin.NotificationType.Checkout : Checkin.NotificationType.Checkin); }
public CheckinNotification(CheckinNotification c, Checkin.NotificationType type) { CheckInId = c.CheckInId; SpaceId = c.SpaceId; UserId = c.UserId; StartTime = c.StartTime; EndTime = c.EndTime; LastModified = (type == Checkin.NotificationType.Checkout && c.EndTime.HasValue) ? c.EndTime.Value : c.StartTime; RegisteredBy = c.RegisteredBy; RegisteredFrom = c.RegisteredFrom; NotificationType = (int)((type == Checkin.NotificationType.Checkout && c.EndTime.HasValue) ? Checkin.NotificationType.Checkout : Checkin.NotificationType.Checkin); }