Example #1
0
        public JsonResult RemoveProfileFields(int[] Fields)
        {
            foreach (int Field in Fields)
            {
                ProfileField field = ProfileFields.GetBy(Field);
                field.Delete();
                AuditEvent.AppEventSuccess(Profile.Member.Email, String.Format("The \"{0}\" field has been deleted.", field.FieldName));
            }

            RequestResultModel _model = new RequestResultModel();

            _model.InfoType = RequestResultInfoType.Success;
            _model.Message  = "All selected fields (and their data) have been deleted.";

            return(Json(new
            {
                NotifyType = NotifyType.PageInline,
                Html = this.RenderPartialView(@"_RequestResultPageInLine", _model),
            }, JsonRequestBehavior.AllowGet));
        }