private ParentModel MapParentModel(Parent parent, ParentProfile profile, ParentAlert parentAlert) { var parentModel = new ParentModel(); parentModel.ParentUniqueId = parent.ParentUniqueId; if (profile != null) { SetParentContactInfo(parentModel, profile); } if (profile == null || parentModel.Email == null) { SetParentContactInfo(parentModel, parent); } if (parentAlert == null) { return(parentModel); } parentModel.ParentAlert.PreferredMethodOfContactTypeId = profile?.PreferredMethodOfContactTypeId; parentModel.ParentAlert.AlertTypeIds = parentAlert.AlertTypes.Select(x => x.AlertTypeId).ToList(); parentModel.LanguageCode = profile.LanguageCode; return(parentModel); }
private ParentAlert createParentAlert(string uniqueId) { var newParentAlert = new ParentAlert(); newParentAlert.ParentUniqueId = uniqueId; return(newParentAlert); }
/// <summary> /// Handles the item onclick event. /// </summary> /// <returns>A task that represents the asynchronous operation.</returns> protected Task ClickHandler() { // We must have priority over what get's closed once we click on close button. // For example, there can be Alert placed inside of Modal, and Close Button inside of Alert. // And we don't want to close both Alert and Modal in that case. if (IsAutoClose) { if (ParentAlert != null) { ParentAlert.Hide(); } else if (ParentModal != null) { ParentModal.Hide(); } } return(Clicked.InvokeAsync(null)); }
protected override void OnInitialized() { ParentAlert?.NotifyHasMessage(); base.OnInitialized(); }
protected override void OnInitialized() { ParentAlert?.NotifyHasDescription(); base.OnInitialized(); }