private NotificationDetailModel CreateNotificationDetailModel(MCommunication_Notification from) { var to = new NotificationDetailModel(); CopyNotificationDetailModel(to, from); return(to); }
public static ANotification_Notification ANotification_Notification(MCommunication_Notification mNotification, MUser_User mUser) { return(new ANotification_Notification() { MNotification = mNotification, MUser = mUser }); }
private void CopyNotificationDetailModel(NotificationDetailModel to, MCommunication_Notification from) { to.NotificationId = from.NotificationId; to.Text = from.Text; to.SentDateTime = Locale.GetLocalTimeFromUtc(from.CreateDateTimeUtc); to.OrderId = from.Fields.Where(r => r.FieldCode == "OrderId").SingleOrDefault()?.FieldValue; to.OrderNumber = from.Fields.Where(r => r.FieldCode == "OrderNumber").SingleOrDefault()?.FieldValue; to.AcknowledgementDateTime = Locale.GetLocalTimeFromUtc(from.AcknowledgementDateTimeUtc); to.New = from.AcknowledgementDateTimeUtc == null; }