示例#1
0
 public static void PutQueryToState(RQquery query, UserState.States stateType)
 {
     state = (ViewState)UserState.Get(stateType);
     if (state == null)
     {
         state = new ViewState(stateType);
     }
     state.query = query;
     state.Save();
 }
示例#2
0
 public static Boolean GetClasstreeOptionsState()
 {
     state = (ViewState)UserState.Get(UserState.States.ClasstreeOptionsState);
     if (state == null)
     {
         state       = new ViewState(UserState.States.ClasstreeOptionsState);
         state.query = false;
         state.Save();
     }
     return((Boolean)state.query);
 }
示例#3
0
    protected override void SavePageStateToPersistenceMedium(object viewState)
    {
        CiroLightLibrary.BLL.ViewState myViewState = new ViewState();
        if (Request["__DATABASE_VIEWSTATE"] != null)
        {
            myViewState.GUID = Request["__DATABASE_VIEWSTATE"].ToString();
        }
        else
        {
            myViewState.GUID = Guid.NewGuid().ToString();
        }
        LosFormatter myFormatter    = new LosFormatter();
        StringWriter myStringWriter = new StringWriter();

        myFormatter.Serialize(myStringWriter, viewState);
        myViewState.Value = myStringWriter.ToString();
        myViewState.Save();
        ScriptManager.RegisterHiddenField(this, "__DATABASE_VIEWSTATE", myViewState.GUID);
    }
示例#4
0
 public static Boolean GetClasstreeOptionsState()
 {
     state = (ViewState)UserState.Get(UserState.States.ClasstreeOptionsState);
     if (state == null)
     {
         state = new ViewState(UserState.States.ClasstreeOptionsState);
         state.query = false;
         state.Save();
     }
     return (Boolean)state.query;
 }