public String GetStateParameter(String paName) { String lcValue; if ((!String.IsNullOrEmpty(paName)) && (!String.IsNullOrEmpty(lcValue = GetParameter(paName)))) { ActiveWebStateBlock.StoreWebStateVariable(paName, lcValue); return(lcValue); } else { return(ActiveWebStateBlock.GetData(paName)); } }
private String GetFormStack() { String lcFormStackStr; String[] lcFormStack; String lcNewFromStack; String lcLastFormName; if ((ActiveFormInfoManager != null) && (!String.IsNullOrEmpty(lcFormStackStr = General.Base64Decode(GetStateParameter(ctPRMFormStack))))) { if (!clFormInfoManager.IsAttributeSet(FormInfoManager.FormAttribute.Desktop)) { lcFormStack = lcFormStackStr.Split(new String[] { ctFormStackDelimiter.ToString() }, StringSplitOptions.RemoveEmptyEntries); if (lcFormStack.Length > 0) { lcLastFormName = lcFormStack[lcFormStack.Length - 1].Trim().Split(',')[0]; if (lcLastFormName.Trim() == ActiveFormInfoManager.ActiveRow.FormName.Trim()) { Array.Resize(ref lcFormStack, lcFormStack.Length - 1); } } //if ((lcFormStack.Length > 0) && (lcFormStack[lcFormStack.Length - 1].Trim() == ActiveFormInfoManager.ActiveRow.FormName.Trim())) // Array.Resize(ref lcFormStack, lcFormStack.Length - 1); lcNewFromStack = String.Join(ctFormStackDelimiter.ToString(), lcFormStack); } else { lcNewFromStack = String.Empty; } lcNewFromStack = General.Base64Encode(lcNewFromStack); ActiveWebStateBlock.StoreWebStateVariable(ctPRMFormStack, lcNewFromStack); return(lcNewFromStack); } return(String.Empty); }