Ejemplo n.º 1
0
        public List <MatchBXNotification> GetNotificationsForReceiver(int id)
        {
            MatchBXNotification _obj = new MatchBXNotification();

            _obj.ReceiverId = id;
            return(base.GetCustomFunction <MatchBXNotification>("spGetNotifications", _obj));
        }
Ejemplo n.º 2
0
        public bool ResetUserPassword(string email, string password)
        {
            MatchBXNotification      objNotification = new MatchBXNotification();
            MatchBXNotificationModel objNotiMod      = new MatchBXNotificationModel();

            objUsersList = objUsersMod.GetList("*", " Email = '" + email + "' and IsActive=1");
            if (objUsersList.Count() > 0)
            {
                objUsers                     = objUsersList[0];
                objUsers.Password            = password;
                objNotification.ReceiverId   = objUsers.UserId;
                objNotification.SenderId     = objUsers.UserId;
                objNotification.ReadStatus   = 0;
                objNotification.Notification = "Your password has been reset ";
                objNotification.Header       = "Reset Password";
                int returnValue = objUsersMod.Save(objUsers);
                if (returnValue > 0)
                {
                    MatchBxCommon.sendResetPasswordAckEmail(objUsers, false);
                    int retstatus = objNotiMod.Save(objNotification);
                    TempData["ErrorMessage"] = "Your password has been reset successfully.";
                    return(true);
                }
                else
                {
                    TempData["ErrorMessage"] = "Password Reset Failed";
                    return(false);
                }
            }
            else
            {
                TempData["ErrorMessage"] = "The email is not registered for a Matchbx Account. Please try again";
                return(false);
            }
        }
Ejemplo n.º 3
0
        public bool SetNotificationsReadStatus(MatchBXNotification _object)
        {
            List <MatchBXNotification> _list = base.GetCustomFunction <MatchBXNotification>("spSetNotificationsReadStatus", _object);

            return(_list.Count > 0 ? true : false);
        }
Ejemplo n.º 4
0
        public int Save(MatchBXNotification _object)
        {
            int _returnValue = base.Save <MatchBXNotification>("spAddEditMatchBXNotification", _object);

            return(_returnValue);
        }