Example #1
0
        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;
            }
        }
Example #2
0
        public NotificationDetailViewModel ViewModelFromNotification(Notification notification)
        {
            NotificationDetailViewModel NDVM = new NotificationDetailViewModel()
            {
                AccountID    = notification.AccountID,
                TypeID       = notification.TypeID,
                TimeTillSend = notification.TimeTillSend
            };

            return(NDVM);
        }
Example #3
0
        public Notification ViewModelToNotification(NotificationDetailViewModel NDVM)
        {
            Notification notification = new Notification()
            {
                AccountID    = NDVM.AccountID,
                TypeID       = NDVM.TypeID,
                TimeTillSend = NDVM.TimeTillSend
            };

            return(notification);
        }
Example #4
0
        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));
        }
Example #5
0
 public NotificationDetailPage()
 {
     Title          = "Notifications";
     BindingContext = new NotificationDetailViewModel();
     CreateLayout();
 }