Ejemplo n.º 1
0
        private void SaveCustomViewState()
        {
            UrlEncodedDictionary customViewState = new UrlEncodedDictionary();

            customViewState["P"] = _LastPasswordValue;
            VS.Value             = EncryptionHelper.EncryptAES(customViewState.ToString());
        }
Ejemplo n.º 2
0
        private void SaveCustomViewState()
        {
            UrlEncodedDictionary customViewState = new UrlEncodedDictionary();

            customViewState.Add("CurrentPage", _CurrentPage.ToString());
            VS_CustomState.Value = EncryptionHelper.EncryptAES(customViewState.ToString());
        }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
        private void SaveCustomViewState()
        {
            UrlEncodedDictionary customViewState = new UrlEncodedDictionary();

            customViewState.Add("SavedBasketHash", _CurrentBasketHash);
            customViewState.Add("SavedShipRates", EncodeSavedShipRates());
            VS_CustomState.Value = EncryptionHelper.EncryptAES(customViewState.ToString());
        }
Ejemplo n.º 5
0
        private void SaveCustomViewState()
        {
            UrlEncodedDictionary customViewState = new UrlEncodedDictionary();

            customViewState["PID"] = _ProductId.ToString();
            customViewState["OL"]  = string.Empty + _OptionList;
            customViewState["SKP"] = GetCommaDelimitedKitProducts();
            VS.Value = EncryptionHelper.EncryptAES(customViewState.ToString());
        }
Ejemplo n.º 6
0
        private void SaveCustomViewState()
        {
            UrlEncodedDictionary customViewState = new UrlEncodedDictionary();

            customViewState.Add("M", _PageMode);
            customViewState.Add("P", _ShowProvinceList ? "1" : string.Empty);
            customViewState.Add("C", _SelectedCountryCode);
            customViewState.Add("A", _EditAddressId.ToString());
            VS.Value = EncryptionHelper.EncryptAES(customViewState.ToString());
        }
Ejemplo n.º 7
0
 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");
     }
 }
Ejemplo n.º 8
0
        private void SaveCustomViewState()
        {
            UrlEncodedDictionary customViewState = new UrlEncodedDictionary();

            customViewState["CurrentPath"]     = this.CurrentPath;
            customViewState["CurrentFileName"] = this.CurrentFileName;
            //WE WILL PARSE THE FILE NAME LIST WHEN DELETE BUTTON IS CLICKED
            customViewState["FileNameList"] = string.Join("|", _FileNameList.ToArray());
            VS_CustomState.Value            = EncryptionHelper.EncryptAES(customViewState.ToString());
        }
Ejemplo n.º 9
0
 private void LoadCustomViewState()
 {
     if (Page.IsPostBack)
     {
         UrlEncodedDictionary customViewState = new UrlEncodedDictionary(EncryptionHelper.DecryptAES(Request.Form[VS_CustomState.UniqueID]));
         _CurrentPage = AlwaysConvert.ToInt(customViewState.TryGetValue("CurrentPage"));
         if (_CurrentPage < 1)
         {
             _CurrentPage = 1;
         }
     }
 }
        private void SaveCustomViewState()
        {
            UrlEncodedDictionary customViewState = new UrlEncodedDictionary();

            if (_SelectedProductIds.Count > 0)
            {
                customViewState["SP"] = AlwaysConvert.ToList(",", _SelectedProductIds.ToArray());
            }
            else
            {
                customViewState["SP"] = string.Empty;
            }
            VS.Value = EncryptionHelper.EncryptAES(customViewState.ToString());
        }
Ejemplo n.º 11
0
 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;
 }
Ejemplo n.º 12
0
 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);
         }
     }
 }
Ejemplo n.º 13
0
        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;
            }
        }
Ejemplo n.º 14
0
 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)
     {
         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);
             }
         }
     }
 }
 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"));
     }
 }
Ejemplo n.º 17
0
        private void SaveCustomViewState()
        {
            List <string> selectedNames = new List <string>();

            foreach (ListItem item in FieldNamesList.Items)
            {
                if (item.Selected)
                {
                    selectedCount++;
                    selectedNames.Add(item.Value);
                }
            }

            //SHOW SAVE BUTTONS WHEN ATLEAST ONE FIELD IS SELECTED FOR EDITING
            SaveButton.Visible         = selectedCount > 0;
            SaveAndCloseButton.Visible = SaveButton.Visible;

            UrlEncodedDictionary customViewState = new UrlEncodedDictionary();

            customViewState.Add("CurrentPage", _CurrentPage.ToString());
            customViewState.Add("ColumnNames", string.Join(",", selectedNames.ToArray()));
            VS_CustomState.Value = EncryptionHelper.EncryptAES(customViewState.ToString());
        }
        private void SaveCustomViewState()
        {
            UrlEncodedDictionary customViewState = new UrlEncodedDictionary();

            customViewState["ShowEditGrid"]    = _ShowEditGrid.ToString();
            customViewState["EnableScrolling"] = _EnableScrolling.ToString();
            if (_SelectedCategoryIds.Count > 0)
            {
                customViewState["SC"] = AlwaysConvert.ToList(",", _SelectedCategoryIds.ToArray());
            }
            else
            {
                customViewState["SC"] = string.Empty;
            }
            if (_SelectedFields.Count > 0)
            {
                customViewState["SF"] = string.Join(",", _SelectedFields.ToArray());
            }
            else
            {
                customViewState["SF"] = string.Empty;
            }
            VS.Value = EncryptionHelper.EncryptAES(customViewState.ToString());
        }