/// <summary> /// Gets the post back value. /// </summary> public RsFile GetPostBackValue(PostBackValueDictionary postBackValues) { if (postBackValue == null) { var value = formValue.GetValue(postBackValues); if (value == null) { return(null); } using (var ms = new MemoryStream()) { IoMethods.CopyStream(value.InputStream, ms); postBackValue = new RsFile(ms.ToArray(), Path.GetFileName(value.FileName), contentType: value.ContentType); } } return(postBackValue); }
/// <summary> /// Validates the HTML. /// </summary> public void Validate(PostBackValueDictionary postBackValues, Validator validator, ValidationErrorHandler errorHandler) { mod.Html = validator.GetString(errorHandler, wysiwygEditor.GetPostBackValue(postBackValues), true); }
/// <summary> /// Returns true if the value changed on this post back. /// </summary> public bool ValueChangedOnPostBack(PostBackValueDictionary postBackValues) { return(checkBoxFormValue != null?checkBoxFormValue.ValueChangedOnPostBack(postBackValues) : radioButtonFormValue.ValueChangedOnPostBack(postBackValues)); }
/// <summary> /// Gets whether the box is checked in the post back. /// </summary> public bool IsCheckedInPostBack(PostBackValueDictionary postBackValues) { return(checkBoxFormValue != null?checkBoxFormValue.GetValue(postBackValues) : radioButtonFormValue.GetValue(postBackValues) == this); }
/// <summary> /// Gets the selected item IDs in the post back. /// </summary> public IEnumerable <ItemIdType> GetSelectedItemIdsInPostBack(PostBackValueDictionary postBackValues) { return(items.Where(i => checkBoxesByItem[i].IsCheckedInPostBack(postBackValues)).Select(i => i.Id).ToArray()); }
/// <summary> /// Returns true if the selections changed on this post back. /// </summary> public bool SelectionsChangedOnPostBack(PostBackValueDictionary postBackValues) { return(items.Any(i => checkBoxesByItem[i].ValueChangedOnPostBack(postBackValues))); }
/// <summary> /// Returns true if the value changed on this post back. /// </summary> public bool ValueChangedOnPostBack(PostBackValueDictionary postBackValues) { return(formValue.ValueChangedOnPostBack(postBackValues)); }
/// <summary> /// Gets the post back value. /// </summary> public string GetPostBackValue(PostBackValueDictionary postBackValues) { return(formValue.GetValue(postBackValues)); }
/// <summary> /// Gets the post back value. /// </summary> private string getPostBackValue(PostBackValueDictionary postBackValues) { return(formValue.GetValue(postBackValues)); }