Exemplo n.º 1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (Session["UserID"]==null)
                Response.Redirect("../login.aspx");

            labClientID = int.Parse(Request.Params["lc"]);
            labClientIDs = new int[1];
            labClientIDs[0] = labClientID;
            labClients = wrapper.GetLabClientsWrapper(labClientIDs);

            // Get Available Lab Servers
            BrokerDB brokerDB = new BrokerDB();
            int[] serverIDs = brokerDB.GetProcessAgentIDsByType(new int[]{
                (int)ProcessAgentType.AgentType.LAB_SERVER,
                (int)ProcessAgentType.AgentType.BATCH_LAB_SERVER});
            AvailLabServers = wrapper.GetProcessAgentInfosWrapper(serverIDs);

            /// Get Associated Lab Servers (i.e. associated to a specified Lab Client)
            AssocLabServers = wrapper.GetProcessAgentInfosWrapper(labClients[0].labServerIDs);

            // Current Lab Client name
            lblLabClient.Text = labClients[0].clientName;

            // Error Message
            divErrorMessage.Visible = false;
            lblResponse.Visible = false;

            if(!IsPostBack)
            {
                LoadListBoxes();
            }
        }