private void LoadCustomViewState() { if (Page.IsPostBack) { UrlEncodedDictionary customViewState = new UrlEncodedDictionary(EncryptionHelper.DecryptAES(Request.Form[VS_CustomState.UniqueID])); this.CurrentPath = customViewState.TryGetValue("CurrentPath"); this.CurrentFileName = customViewState.TryGetValue("CurrentFileName"); _BrowseImageId = customViewState.TryGetValue("BrowseImageId"); _BrowseField = customViewState.TryGetValue("BrowseField"); //THIS LIST OF NAMES IS USED TO PROCESS DELETES string[] fileNames = customViewState.TryGetValue("FileNameList").Split("|".ToCharArray()); _VSFileNameList.AddRange(fileNames); } else { _BrowseImageId = Request.QueryString["ImageId"]; if (_BrowseImageId == null) { _BrowseImageId = string.Empty; } else { _BrowseImageId = _BrowseImageId.ToUpperInvariant(); } _BrowseField = Request.QueryString["Field"]; } //THIS IS TO DOUBLE CHECK PATH WAS NOT MODIFIED BEFORE DELETE IS PROCESSED _VSCurrentPath = this.CurrentPath; }
private void LoadCustomViewState() { if (Page.IsPostBack) { UrlEncodedDictionary customViewState = new UrlEncodedDictionary(EncryptionHelper.DecryptAES(Request.Form[VS_CustomState.UniqueID])); _CurrentPage = AlwaysConvert.ToInt(customViewState.TryGetValue("CurrentPage")); names = new List <string>(customViewState.TryGetValue("ColumnNames").Split(',')); if (_CurrentPage < 1) { _CurrentPage = 1; } } }
private void LoadCustomViewState() { if (Page.IsPostBack) { UrlEncodedDictionary customViewState = new UrlEncodedDictionary(EncryptionHelper.DecryptAES(Request.Form[VS_CustomState.UniqueID])); this.CurrentPath = customViewState.TryGetValue("CurrentPath"); this.CurrentFileName = customViewState.TryGetValue("CurrentFileName"); //THIS LIST OF NAMES IS USED TO PROCESS DELETES string[] fileNames = customViewState.TryGetValue("FileNameList").Split("|".ToCharArray()); _VSFileNameList.AddRange(fileNames); } //THIS IS TO DOUBLE CHECK PATH WAS NOT MODIFIED BEFORE DELETE IS PROCESSED _VSCurrentPath = this.CurrentPath; }
private void LoadCustomViewState() { if (Page.IsPostBack) { string vsContent = Request.Form[VS.UniqueID]; string decodedContent = EncryptionHelper.DecryptAES(vsContent); UrlEncodedDictionary customViewState = new UrlEncodedDictionary(decodedContent); _AddProductId = AlwaysConvert.ToInt(customViewState.TryGetValue("PID")); _AddOptionList = customViewState.TryGetValue("OL"); int[] skp = AlwaysConvert.ToIntArray(customViewState.TryGetValue("SKP")); if (skp != null && skp.Length > 0) { _AddKitProducts.AddRange(skp); } } }
private void LoadCustomViewState() { User user = AbleContext.Current.User; _CurrentBasketHash = user.Basket.GetContentHash(OrderItemType.Product); if (Page.IsPostBack) { UrlEncodedDictionary customViewState = new UrlEncodedDictionary(EncryptionHelper.DecryptAES(Request.Form[VS_CustomState.UniqueID])); string savedBasketHash = customViewState.TryGetValue("SavedBasketHash"); if (savedBasketHash == _CurrentBasketHash) { string savedShipRates = customViewState.TryGetValue("SavedShipRates"); ParseSavedShipRates(savedShipRates); } _SavedBasketHash = savedBasketHash; } }
private void LoadCustomViewState() { if (Page.IsPostBack) { string vsContent = Request.Form[VS.UniqueID]; string decodedContent = EncryptionHelper.DecryptAES(vsContent); UrlEncodedDictionary customViewState = new UrlEncodedDictionary(decodedContent); _LastPasswordValue = customViewState.TryGetValue("P"); } }
private void LoadCustomViewState() { if (Page.IsPostBack) { UrlEncodedDictionary customViewState = new UrlEncodedDictionary(EncryptionHelper.DecryptAES(Request.Form[VS.UniqueID])); _PageMode = customViewState.TryGetValue("M"); //VIEW IS DEFAULT MODE if (_PageMode != "V" && _PageMode != "A" && _PageMode != "E") { _PageMode = "V"; } _ShowProvinceList = !string.IsNullOrEmpty(customViewState.TryGetValue("P")); _SelectedCountryCode = customViewState.TryGetValue("C"); if (string.IsNullOrEmpty(_SelectedCountryCode)) { _SelectedCountryCode = GetDefaultCountryCode(); } _EditAddressId = AlwaysConvert.ToInt(customViewState.TryGetValue("A")); } }
private void LoadCustomViewState() { if (Page.IsPostBack) { UrlEncodedDictionary customViewState = new UrlEncodedDictionary(EncryptionHelper.DecryptAES(Request.Form[VS.UniqueID])); _ShowEditGrid = AlwaysConvert.ToBool(customViewState.TryGetValue("ShowEditGrid"), false); _EnableScrolling = AlwaysConvert.ToBool(customViewState.TryGetValue("EnableScrolling"), true); string selectedCategories = customViewState.TryGetValue("SC"); if (!string.IsNullOrEmpty(selectedCategories)) { int[] tempCategoryIds = AlwaysConvert.ToIntArray(selectedCategories); if (tempCategoryIds != null && tempCategoryIds.Length > 0) { for (int i = 0; i < tempCategoryIds.Length; i++) { AddCategoryToList(tempCategoryIds[i]); } } } BuildFieldList(customViewState.TryGetValue("SF")); } }
private void LoadCustomViewState() { if (Page.IsPostBack) { string vsContent = Request.Form[VS.UniqueID]; string decodedContent = EncryptionHelper.DecryptAES(vsContent); UrlEncodedDictionary customViewState = new UrlEncodedDictionary(decodedContent); string selectedProducts = customViewState.TryGetValue("SP"); if (!string.IsNullOrEmpty(selectedProducts)) { int[] tempProductIds = AlwaysConvert.ToIntArray(selectedProducts); if (tempProductIds != null && tempProductIds.Length > 0) { for (int i = 0; i < tempProductIds.Length; i++) { AddProductToList(tempProductIds[i]); } BindSelectedProducts(_SelectedProducts); } } } }