public void UpdateEmailNotoficationTest()
        {
            UserInfoManager target = new UserInfoManager(); // TODO: Initialize to an appropriate value
            //object[] param = null; // TODO: Initialize to an appropriate value
            //target.UpdateEmailNotofication(param);

            UserRegistration _objUserReg = new UserRegistration();
            EmailNotification _objEmaNoti = new EmailNotification();
            int UserId = InsertDummyUser("tj_op");
            _objEmaNoti.UserId = UserId;
            _objEmaNoti.StoryNotify = true;
            _objEmaNoti.NotesNotify = true;
            _objEmaNoti.EventsNotify = true;
            _objEmaNoti.GuestBookNotify = true;
            _objEmaNoti.GiftsNotify = true;
            _objEmaNoti.PhotosNotify = true;
            _objEmaNoti.PhotoAlbumNotify = true;
            _objEmaNoti.VideosNotify = true;
            _objEmaNoti.CommentsNotify = true;
            _objEmaNoti.MessagesNotify = true;
            _objEmaNoti.NewsLetterNotify = true;
            _objUserReg.EmailNotification = _objEmaNoti;
            object[] param = { _objUserReg };
            target.UpdateEmailNotofication(param);
            //Assert.Inconclusive("A method that does not return a value cannot be verified.");

            UserRegistration _objUserReg1 = new UserRegistration();
            TributesPortal.BusinessEntities.Users objUsers = new TributesPortal.BusinessEntities.Users();
            objUsers.UserId = UserId;
            _objUserReg1.Users = objUsers;
            target.GetEmailNotofication(_objUserReg1);

            Assert.AreEqual(true, _objUserReg1.EmailNotification.CommentsNotify);
            Assert.AreEqual(true, _objUserReg1.EmailNotification.EventsNotify);
            Assert.AreEqual(true, _objUserReg1.EmailNotification.GiftsNotify);
            Assert.AreEqual(true, _objUserReg1.EmailNotification.GuestBookNotify);
            Assert.AreEqual(true, _objUserReg1.EmailNotification.MessagesNotify);
            Assert.AreEqual(true, _objUserReg1.EmailNotification.NewsLetterNotify);
            Assert.AreEqual(true, _objUserReg1.EmailNotification.NotesNotify);
            Assert.AreEqual(true, _objUserReg1.EmailNotification.PhotoAlbumNotify);
            Assert.AreEqual(true, _objUserReg1.EmailNotification.PhotosNotify);
            Assert.AreEqual(true, _objUserReg1.EmailNotification.StoryNotify);
            Assert.AreEqual(true, _objUserReg1.EmailNotification.VideosNotify);
        }
        public void GetEmailNotofication(object[] objValue)
        {
            UserRegistration objUserReg = (UserRegistration)objValue[0];
            try
            {
                object[] objParam = { objUserReg.Users.UserId };
                DataSet _objDataSet = GetDataSet("usp_GetEmailNotification", objParam);
                if (_objDataSet.Tables[0].Rows.Count > 0)
                {

                    EmailNotification objEmail = new EmailNotification(
                         int.Parse(_objDataSet.Tables[0].Rows[0][EmailNotification.EmailNotify.EmailNotifyId.ToString()].ToString()),
                         int.Parse(_objDataSet.Tables[0].Rows[0][EmailNotification.EmailNotify.UserId.ToString()].ToString()),
                        bool.Parse(_objDataSet.Tables[0].Rows[0][EmailNotification.EmailNotify.StoryNotify.ToString()].ToString()),
                         bool.Parse(_objDataSet.Tables[0].Rows[0][EmailNotification.EmailNotify.NotesNotify.ToString()].ToString()),
                         bool.Parse(_objDataSet.Tables[0].Rows[0][EmailNotification.EmailNotify.EventsNotify.ToString()].ToString()),
                         bool.Parse(_objDataSet.Tables[0].Rows[0][EmailNotification.EmailNotify.GuestBookNotify.ToString()].ToString()),
                         bool.Parse(_objDataSet.Tables[0].Rows[0][EmailNotification.EmailNotify.GiftsNotify.ToString()].ToString()),
                         bool.Parse(_objDataSet.Tables[0].Rows[0][EmailNotification.EmailNotify.PhotoAlbumNotify.ToString()].ToString()),
                         bool.Parse(_objDataSet.Tables[0].Rows[0][EmailNotification.EmailNotify.PhotosNotify.ToString()].ToString()),
                         bool.Parse(_objDataSet.Tables[0].Rows[0][EmailNotification.EmailNotify.VideosNotify.ToString()].ToString()),
                         bool.Parse(_objDataSet.Tables[0].Rows[0][EmailNotification.EmailNotify.CommentsNotify.ToString()].ToString()),
                         bool.Parse(_objDataSet.Tables[0].Rows[0][EmailNotification.EmailNotify.MessagesNotify.ToString()].ToString()),
                         bool.Parse(_objDataSet.Tables[0].Rows[0][EmailNotification.EmailNotify.NewsLetterNotify.ToString()].ToString()));
                    objUserReg.EmailNotification = objEmail;
                }

            }
            catch (System.Data.SqlClient.SqlException sqlEx)
            {
                if (sqlEx.Number >= 50000)
                {
                    Errors objError = new Errors();
                    objError.ErrorMessage = sqlEx.Message;
                    objUserReg.CustomError = objError;
                }
            }
        }