public NotificationDetalPage(string memId, string type, string name = null, string evnt = null) { InitializeComponent(); NavigationPage.SetHasBackButton(this, false); _type = type; _memId = memId; _name = name; _event = evnt; Debug.WriteLine("#######################++++" + _memId); BindingContext = _viewModel = new NotificationDetailViewModel(); if (!_memId.Equals("0")) { GetCircular(); } else { lblName.Text = _event; imgMember.IsVisible = false; imgGreeting.IsVisible = false; } if (_event != "Anniversary" && _event != "Birthday") { imgGreeting.IsVisible = false; } }
public NotificationDetailViewModel ViewModelFromNotification(Notification notification) { NotificationDetailViewModel NDVM = new NotificationDetailViewModel() { AccountID = notification.AccountID, TypeID = notification.TypeID, TimeTillSend = notification.TimeTillSend }; return(NDVM); }
public Notification ViewModelToNotification(NotificationDetailViewModel NDVM) { Notification notification = new Notification() { AccountID = NDVM.AccountID, TypeID = NDVM.TypeID, TimeTillSend = NDVM.TimeTillSend }; return(notification); }
public IActionResult EditNotification() { if (accVeri.CheckIfLoggedIn(HttpContext.Session.GetInt32("AccountID")) == false) { return(RedirectToAction("LogOut", "Account")); } Notification notification = notificationrepo.GetNotificationForUser((int)HttpContext.Session.GetInt32("AccountID")); NotificationDetailViewModel notificationDetailViewModel = new NotificationDetailViewModel(); notificationDetailViewModel = notificationViewModelConverter.ViewModelFromNotification(notification); return(View(notificationDetailViewModel)); }
public NotificationDetailPage() { Title = "Notifications"; BindingContext = new NotificationDetailViewModel(); CreateLayout(); }