protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            setOptions_class setOptions = new setOptions_class();
            setOptions.setPriRegimeItems(ddl_primary.Items);
            setOptions.setSecRegimeItems(ddl_secondary.Items);
            setOptions.setUtilizationItems(ddl_priUtilization.Items);
            setOptions.setUtilizationItems(ddl_secUtilization.Items);
            setOptions.setSeverityItems(ddl_priSeverity.Items);
            setOptions.setSeverityItems(ddl_secSeverity.Items);
            setOptions.setSuppressionItems(ddl_priSuppression.Items);
            setOptions.setFireSizeItems(ddl_priFireSize.Items);
            setOptions.setSecPlacementItems(ddl_secPlacement.Items);

            // check for session timeout and send user back to the beginning if timeout has occured
            if (Page.Session["scale"] == null)
            {
                Response.Redirect("default.aspx");
            }

            valRange_priInterval.MinimumValue = "1";
            valRange_priInterval.MaximumValue = Page.Session["numSimYears"].ToString();
            valRange_priInterval.ErrorMessage = "Select primary treatment interval between " + valRange_priInterval.MinimumValue + " and " + valRange_priInterval.MaximumValue;
            valRange_secOffset.MinimumValue   = "0";
            valRange_secOffset.MaximumValue   = Page.Session["numSimYears"].ToString();
            valRange_secOffset.ErrorMessage   = "Select secondary treatment offset between " + valRange_secOffset.MinimumValue + " and " + valRange_secOffset.MaximumValue;

            displayDictionary((SortedList <string, ArrayList>)Session["managementDict"], (SortedList <string, ArrayList>)Session["natDisturbDict"]);
        }
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            // check for session timeout and send user back to the beginning if timeout has occured
            if (Page.Session["scale"] == null)
            {
                Response.Redirect("default.aspx");
            }

            setOptions_class setOptions = new setOptions_class();
            setOptions.setPriRegimeItems(ddl_primary.Items);
            ddl_primary.Items.FindByValue("WildfireDefault").Enabled = false;
            ddl_primary.Items.FindByValue("WildfireCustom").Enabled  = false;
            ddl_primary.Items.Add(new ListItem("Wildfire", "WildfireEvent"));

            setOptions.setUtilizationItems(ddl_priUtilization.Items);
            setOptions.setSeverityItems(ddl_priSeverity.Items);
            setOptions.setSuppressionItems(ddl_priSuppression.Items);
            setOptions.setFireSizeItems(ddl_priFireSize.Items);

            int endYear = Convert.ToInt16(Page.Session["currentYear"].ToString()) - 1;
            valRange_priYear.MinimumValue = Page.Session["simStartYear"].ToString();
            valRange_priYear.MaximumValue = endYear.ToString();
            valRange_priYear.ErrorMessage = "Select a year between " + valRange_priYear.MinimumValue + " and " + valRange_priYear.MaximumValue;

            displayDictionary((SortedList <string, ArrayList>)Session["managementDict"]);
        }
    }