protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack)
            {
                if (ViewState["EditMode"] != null)
                {
                    _editMode = (bool)ViewState["EditMode"];
                }

                if (ViewState["EdittedPartitionArchive"] != null)
                {
                    ServerEntityKey partitionKey = ViewState["EdittedPartitionArchive"] as ServerEntityKey;
                    _partitionArchive = Model.PartitionArchive.Load(partitionKey);
                }

                if (ViewState["ServerPartition"] != null)
                {
                    _partition = (ServerPartition)ViewState["ServerPartition"];
                }
            }

            ArchiveTypeDropDownList.Items.Clear();

            foreach (ArchiveTypeEnum archiveTypeEnum in ArchiveTypeEnum.GetAll())
            {
                ArchiveTypeDropDownList.Items.Add(new ListItem(ServerEnumDescription.GetLocalizedDescription(archiveTypeEnum), archiveTypeEnum.Lookup));
            }
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int archiveSelectedIndex = ArchiveTypeFilter.SelectedIndex;

            ArchiveTypeFilter.Items.Clear();
            ArchiveTypeFilter.Items.Add(new ListItem(SR.All));
            foreach (ArchiveTypeEnum archiveTypeEnum in ArchiveTypeEnum.GetAll())
            {
                ArchiveTypeFilter.Items.Add(
                    new ListItem(ServerEnumDescription.GetLocalizedDescription(archiveTypeEnum), archiveTypeEnum.Lookup));
            }
            ArchiveTypeFilter.SelectedIndex = archiveSelectedIndex;

            int statusSelectedIndex = StatusFilter.SelectedIndex;
            StatusFilter.Items.Clear();
            StatusFilter.Items.Add(new ListItem(SR.All, SR.All));
            StatusFilter.Items.Add(new ListItem(SR.Enabled, SR.Enabled));
            StatusFilter.Items.Add(new ListItem(SR.Disabled, SR.Disabled));
            StatusFilter.SelectedIndex = statusSelectedIndex;
        }