Exemplo n.º 1
0
 public static void UpdateCommunicationSettings(this Users entity, AccountSettingsDTO token)
 {
     entity.DisplayActivitiesOnFB             = token.DisplayActivitiesOnFB;
     entity.DisplayCourseNewsWeeklyOnFB       = token.DisplayCourseNewsWeeklyOnFB;
     entity.DisplayDiscussionFeedDailyOnFB    = token.DisplayDiscussionFeedDailyOnFB;
     entity.ReceiveMonthlyNewsletterOnEmail   = token.ReceiveMonthlyNewsletterOnEmail;
     entity.ReceiveDiscussionFeedDailyOnEmail = token.ReceiveDiscussionFeedDailyOnEmail;
     entity.ReceiveCourseNewsWeeklyOnEmail    = token.ReceiveCourseNewsWeeklyOnEmail;
 }
Exemplo n.º 2
0
 public static void UpdateAcountEntity(this Users entity, AccountSettingsDTO token)
 {
     entity.FirstName           = token.FirstName;
     entity.LastName            = token.LastName;
     entity.Nickname            = token.Nickname;
     entity.BioHtml             = token.BioHtml;
     entity.PictureURL          = token.PictureName;
     entity.AffiliateCommission = token.AffiliateCommission ?? entity.AffiliateCommission;
 }
Exemplo n.º 3
0
        public ActionResult Settings()
        {
            // string error;
            var token = new AccountSettingsDTO {
                Role = CommonEnums.UserRoles.Author
            };                                                                        //_userAccountServices.GetSettingsToken(CurrentUserId,out error);

            //token.ShowCancelButton = true;
            return(View(token));
        }
Exemplo n.º 4
0
        public ActionResult UpdateCommunicationSettings(AccountSettingsDTO token)
        {
            string error;
            var    isUpdated = _userAccountServices.UpdateCommunicationSettings(token, out error);

            return(Json(new JsonResponseToken
            {
                success = isUpdated
                , error = error
            }, JsonRequestBehavior.AllowGet));
        }