Ejemplo n.º 1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            string couponId;
            string passkey;
            string issuerGuid;
            dbTicketing = new ProcessAgentDB();

            if (!IsPostBack)
            {

                // try & test for local access or not configured
                if (secure)
                {
                    // retrieve parameters from URL
                    couponId = Request.QueryString["coupon_id"];
                    passkey = Request.QueryString["passkey"];
                    issuerGuid = Request.QueryString["issuer_guid"];
                    Ticket allowAdminTicket = null;
                    if (couponId != null && passkey != null && issuerGuid != null)
                    {
                        allowAdminTicket = dbTicketing.RetrieveAndVerify(
                            new Coupon(issuerGuid, Int64.Parse(couponId), passkey),
                            TicketTypes.ADMINISTER_LS);
                    }
                    else
                    {
                        Response.Redirect("AccessDenied.aspx", true);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            string couponId;
            string passkey;
            string issuerGuid;
            dbTicketing = new ProcessAgentDB();

            if (!IsPostBack)
            {

                // try & test for local access or not configured
                if (secure)
                {
                    // retrieve parameters from URL
                    couponId = Request.QueryString["coupon_id"];
                    passkey = Request.QueryString["passkey"];
                    issuerGuid = Request.QueryString["issuer_guid"];
                    Ticket allowAdminTicket = null;
                    if (couponId != null && passkey != null && issuerGuid != null)
                    {
                        allowAdminTicket = dbTicketing.RetrieveAndVerify(
                            new Coupon(issuerGuid, Int64.Parse(couponId), passkey),
                            TicketTypes.ADMINISTER_LS);
                    }
                    else
                    {
                        Response.Redirect("AccessDenied.aspx", true);
                    }
                }

                string returnUrl = Request.QueryString["sb_url"];
                if (returnUrl != null && returnUrl.Length > 0)
                    Session["returnURL"] = returnUrl;

            }
            String returnURL = (string)Session["returnURL"];
            if ((returnURL != null) && (returnURL.Length > 0))
            {
                lnkBackSB.NavigateUrl = returnURL;
                lnkBackSB.Visible = true;
            }
            else
            {
                lnkBackSB.Visible = false;
            }
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            culture = DateUtil.ParseCulture(Request.Headers["Accept-Language"]);
             dateF = DateUtil.DateTime24(culture);
            // Load the Group list box
             if (!IsPostBack)
             {
                 if (Session["couponID"] == null || Request.QueryString["coupon_id"] != null)
                     couponID = Request.QueryString["coupon_id"];
                 else
                     couponID = Session["couponID"].ToString();

                 if (Session["passkey"] == null || Request.QueryString["passkey"] != null)
                     passkey = Request.QueryString["passkey"];
                 else
                     passkey = Session["passkey"].ToString();

                 if (Session["issuerID"] == null || Request.QueryString["issuer_guid"] != null)
                     issuerID = Request.QueryString["issuer_guid"];
                 else
                     issuerID = Session["issuerID"].ToString();

                 if (Session["sbUrl"] == null || Request.QueryString["sb_url"] != null)
                     sbUrl = Request.QueryString["sb_url"];
                 else
                     sbUrl = Session["sbUrl"].ToString();
                 if (Session["userTZ"] != null)
                     userTZ = Convert.ToInt32(Session["userTZ"]);
                 bool unauthorized = false;

                 if (couponID != null && passkey != null && issuerID != null)
                 {
                     try
                     {
                         Coupon coupon = new Coupon(issuerID, long.Parse(couponID), passkey);

                         ProcessAgentDB dbTicketing = new ProcessAgentDB();
                         Ticket ticket = dbTicketing.RetrieveAndVerify(coupon, TicketTypes.MANAGE_USS_GROUP);
                         XmlDocument payload = new XmlDocument();
                         payload.LoadXml(ticket.payload);
                         if (ticket.IsExpired() || ticket.isCancelled)
                         {
                             unauthorized = true;
                             Response.Redirect("Unauthorized.aspx", false);
                         }

                         Session["couponID"] = couponID;
                         Session["passkey"] = passkey;
                         Session["issuerID"] = issuerID;
                         Session["sbUrl"] = sbUrl;
                         userTZ = Convert.ToInt32(payload.GetElementsByTagName("userTZ")[0].InnerText);
                         Session["userTZ"] = userTZ;
                     }

                     catch (Exception ex)
                     {
                         unauthorized = true;
                         Response.Redirect("Unauthorized.aspx", false);
                     }
                 }

                 else
                 {
                     unauthorized = true;
                     Response.Redirect("Unauthorized.aspx", false);
                 }

                 if (!unauthorized)
                 {
                     StringBuilder buf = new StringBuilder();
                     buf.Append("Select criteria for the reservations to be displayed.  Enter date values using this format: '");
                     buf.Append(dateF + " [PM]");
                     buf.Append ("' time may be entered as 24 or 12 hour format.");
                     buf.Append("<br/><br/>Times shown are GMT:&nbsp;&nbsp;&nbsp;" + userTZ / 60.0 + "&nbsp;&nbsp; and use a 24 hour clock.");
                     lblDescription.Text = buf.ToString();
                     lblFormat.Text = dateF;
                     LoadGroupListBox();
                     LoadExperimentListBox();
                 }
             }
             else
             {
                 userTZ = userTZ = Convert.ToInt32(Session["userTZ"]);
             }

            if (ddlTimeIs.SelectedIndex!=4)
            {
                txtTime2.ReadOnly=true;
                txtTime2.BackColor=Color.Lavender;
            }
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!IsPostBack)
            {
                if (secure)
                {
                    // Query values from the request
                    string couponId = Request.QueryString["coupon_id"];
                    string passkey = Request.QueryString["passkey"];
                    string issuerGuid = Request.QueryString["issuer_guid"];
                    string returnTarget = Request.QueryString["sb_url"];
                    if ((returnTarget != null) && (returnTarget.Length > 0))
                        Session["returnURL"] = returnTarget;

                    // this should be the Operation Coupon
                    if (!(passkey != null && passkey != "" && couponId != null && couponId != "" && issuerGuid != null && issuerGuid != ""))
                    {

                        Coupon coupon = new Coupon(issuerGuid, long.Parse(couponId), passkey);

                        ProcessAgentDB dbTicketing = new ProcessAgentDB();
                        Ticket ticket = dbTicketing.RetrieveAndVerify(coupon, TicketTypes.MANAGE_LAB);

                        if (ticket.IsExpired() || ticket.isCancelled)
                        {

                            Response.Redirect("Unauthorized.aspx", false);
                        }

                        Session["couponID"] = couponId;
                        Session["passkey"] = passkey;
                        Session["issuerID"] = issuerGuid;
                        Session["sbUrl"] = returnTarget;
                    }
                }
                btnDelete.Attributes.Add("onclick", "javascript:if(confirm('Are you sure you want to remove this Lab application?')== false) return false;");

                LoadLabList();
                String returnURL = (string)Session["returnURL"];
                if ((returnURL != null) && (returnURL.Length > 0))
                {
                    lnkBackSB.NavigateUrl = returnURL;
                    lnkBackSB.Visible = true;
                }
                else
                {
                    lnkBackSB.Visible = false;
                }
                lblErrorMessage.Visible = false;
            }
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            btnRemove.Attributes.Add("onclick", "javascript:if(confirm('Are you sure you want to remove this experiment Information?')== false) return false;");
            credentialSetIDs=LSSSchedulingAPI.ListCredentialSetIDs();
            credentialSets=LSSSchedulingAPI.GetCredentialSets(credentialSetIDs);
            ussInfoIDs=LSSSchedulingAPI.ListUSSInfoIDs();
            ussInfos=LSSSchedulingAPI.GetUSSInfos(ussInfoIDs);

            if(!IsPostBack)
            {

                if (Session["couponID"] == null || Request.QueryString["coupon_id"] != null)
                    couponID = Request.QueryString["coupon_id"];
                else
                    couponID = Session["couponID"].ToString();

                if (Session["passkey"] == null || Request.QueryString["passkey"] != null)
                    passkey = Request.QueryString["passkey"];
                else
                    passkey = Session["passkey"].ToString();

                if (Session["issuerID"] == null || Request.QueryString["issuer_guid"] != null)
                    issuerID = Request.QueryString["issuer_guid"];
                else
                    issuerID = Session["issuerID"].ToString();

                if (Session["sbUrl"] == null || Request.QueryString["sb_url"] != null)
                    sbUrl = Request.QueryString["sb_url"];
                else
                    sbUrl = Session["sbUrl"].ToString();

                bool unauthorized = false;

                if (couponID != null && passkey != null && issuerID != null)
                {
                    try
                    {
                        Coupon coupon = new Coupon(issuerID, long.Parse(couponID), passkey);

                        ProcessAgentDB dbTicketing = new ProcessAgentDB();
                        Ticket ticket = dbTicketing.RetrieveAndVerify(coupon, TicketTypes.ADMINISTER_LSS);

                        if (ticket.IsExpired() || ticket.isCancelled)
                        {
                            unauthorized = true;
                            Response.Redirect("Unauthorized.aspx", false);
                        }

                        Session["couponID"] = couponID;
                        Session["passkey"] = passkey;
                        Session["issuerID"] = issuerID;
                        Session["sbUrl"] = sbUrl;

                    }

                    catch (Exception ex)
                    {
                        unauthorized = true;
                        Response.Redirect("Unauthorized.aspx", false);
                    }
                }

                else
                {
                    unauthorized = true;
                    Response.Redirect("Unauthorized.aspx", false);
                }

                if (!unauthorized)
                {
                    // Load the Group list box
                    ddlGroup.Items.Add(new ListItem(" ---------- select Group ---------- "));
                    for (int i = 0; i < credentialSets.Length; i++)
                    {
                        USSInfo[] uIn = LSSSchedulingAPI.GetUSSInfos(new int[] { LSSSchedulingAPI.ListUSSInfoID(credentialSets[i].ussGuid) });
                        string cred = credentialSets[i].groupName + " " + credentialSets[i].serviceBrokerName + " " + uIn[0].ussName;
                        ddlGroup.Items.Add(new ListItem(cred, credentialSets[i].credentialSetId.ToString()));
                    }
                    // Load the USS list box
                    ddlUSS.Items.Add(new ListItem(" ---------- select User side scheduling server ---------- "));
                    for (int i = 0; i < ussInfos.Length; i++)
                    {
                        ddlUSS.Items.Add(new ListItem(ussInfos[i].ussName, ussInfos[i].ussGuid.ToString()));
                    }

                    // Set the GUID field to not ReadOnly
                    SetReadOnly(false);
                    //SetDDLUnable(false);
                }
            }
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            culture = DateUtil.ParseCulture(Request.Headers["Accept-Language"]);
            localTzOffset = DateUtil.LocalTzOffset;
            if (!IsPostBack)
            {
                lblDateTimeFormat.Text = culture.DateTimeFormat.ShortDatePattern;
                if (Session["couponID"] == null || Request.QueryString["coupon_id"] != null)
                    couponID = Request.QueryString["coupon_id"];
                else
                    couponID = Session["couponID"].ToString();

                if (Session["passkey"] == null || Request.QueryString["passkey"] != null)
                    passkey = Request.QueryString["passkey"];
                else
                    passkey = Session["passkey"].ToString();

                if (Session["issuerID"] == null || Request.QueryString["issuer_guid"] != null)
                    issuerID = Request.QueryString["issuer_guid"];
                else
                    issuerID = Session["issuerID"].ToString();

                if (Session["sbUrl"] == null || Request.QueryString["sb_url"] != null)
                    sbUrl = Request.QueryString["sb_url"];
                else
                    sbUrl = Session["sbUrl"].ToString();

                bool unauthorized = false;

                if (couponID != null && passkey != null && issuerID != null)
                {
                    try
                    {
                        Coupon coupon = new Coupon(issuerID, long.Parse(couponID), passkey);

                        ProcessAgentDB dbTicketing = new ProcessAgentDB();
                        Ticket ticket = dbTicketing.RetrieveAndVerify(coupon, TicketTypes.MANAGE_LAB);

                        if (ticket.IsExpired() || ticket.isCancelled)
                        {
                            unauthorized = true;
                            Response.Redirect("Unauthorized.aspx", false);
                        }

                        Session["couponID"] = couponID;
                        Session["passkey"] = passkey;
                        Session["issuerID"] = issuerID;
                        Session["sbUrl"] = sbUrl;

                        XmlDocument payload = new XmlDocument();
                        payload.LoadXml(ticket.payload);

                        labServerGuid = payload.GetElementsByTagName("labServerGuid")[0].InnerText;
                        Session["labServerGuid"] = labServerGuid;
                        labServerName = payload.GetElementsByTagName("labServerName")[0].InnerText;
                        Session["labServerName"] = labServerName;
                        userTZ = Convert.ToInt32(payload.GetElementsByTagName("userTZ")[0].InnerText);
                        Session["userTZ"] = userTZ;

                        StringBuilder buf = new StringBuilder("Select criteria for the reservations displayed.<br/><br/>Times shown are LSS local time GMT:&nbsp;&nbsp;&nbsp;");
                        if(localTzOffset > 0)
                            buf.Append("+");
                        buf.Append(localTzOffset / 60.0);
                        buf.Append(".");
                        lblDescription.Text =  buf.ToString();

                    }

                    catch (Exception ex)
                    {
                        unauthorized = true;
                        Response.Redirect("Unauthorized.aspx", false);
                    }
                }

                else
                {
                    unauthorized = true;
                    Response.Redirect("Unauthorized.aspx", false);
                }

                if (!unauthorized)
                {
                    LoadResourceListBox(Session["labServerGuid"].ToString());
                    // Load the Group list box
                    LoadGroupListBox(Session["labServerGuid"].ToString());
                    // Load the Experiment list box
                    LoadExperimentListBox(Session["labServerGuid"].ToString());
                    // load the reservation List box.
                    BuildReservationListBox(Session["labServerGuid"].ToString());
                }
            }

            if (ddlTimeIs.SelectedIndex!=4)
            {
                txtTime2.ReadOnly=true;
                txtTime2.BackColor=Color.Lavender;
            }
        }
Ejemplo n.º 7
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            culture = DateUtil.ParseCulture(Request.Headers["Accept-Language"]);
            localTzOffset = DateUtil.LocalTzOffset;
            credentialSetIDs = LSSSchedulingAPI.ListCredentialSetIDs();
            credentialSets=LSSSchedulingAPI.GetCredentialSets(credentialSetIDs);
            btnRemove.Attributes.Add("onclick", "javascript:if(confirm('Are you sure you want to remove this recurring time block?')== false) return false;");

            btnNew.Attributes.Add("onclick","javascript:window.open('NewTimeBlockPopUp.aspx','NewTimeBlockPopUp','width=910,height=600,left=270,top=180,modal=yes,resizable=yes').focus()");
            hiddenPopupOnNewTB.Attributes.Add("onpropertychange", Page.GetPostBackEventReference(btnSaveChanges));

            if (!IsPostBack)
            {

                if (Session["couponID"] == null || Request.QueryString["coupon_id"] != null)
                    couponID = Request.QueryString["coupon_id"];
                else
                    couponID = Session["couponID"].ToString();

                if (Session["passkey"] == null || Request.QueryString["passkey"] != null)
                    passkey = Request.QueryString["passkey"];
                else
                    passkey = Session["passkey"].ToString();

                if (Session["issuerID"] == null || Request.QueryString["issuer_guid"] != null)
                    issuerID = Request.QueryString["issuer_guid"];
                else
                    issuerID = Session["issuerID"].ToString();

                if (Session["sbUrl"] == null || Request.QueryString["sb_url"] != null)
                    sbUrl = Request.QueryString["sb_url"];
                else
                    sbUrl = Session["sbUrl"].ToString();

                bool unauthorized = false;

                if (couponID != null && passkey != null && issuerID != null)
                {
                    try
                    {
                        Coupon coupon = new Coupon(issuerID, long.Parse(couponID), passkey);
                        ProcessAgentDB dbTicketing = new ProcessAgentDB();
                        Ticket ticket = dbTicketing.RetrieveAndVerify(coupon, TicketTypes.MANAGE_LAB);

                        if ( ticket == null || ticket.IsExpired() || ticket.isCancelled)
                        {
                            unauthorized = true;
                            Response.Redirect("Unauthorized.aspx", false);
                        }

                        Session["couponID"] = couponID;
                        Session["passkey"] = passkey;
                        Session["issuerID"] = issuerID;
                        Session["sbUrl"] = sbUrl;

                        XmlDocument payload = new XmlDocument();
                        payload.LoadXml(ticket.payload);
                        userTZ = Convert.ToInt32(payload.GetElementsByTagName("userTZ")[0].InnerText);
                        Session["userTZ"] = userTZ;
                        labServerGuid = payload.GetElementsByTagName("labServerGuid")[0].InnerText;
                        Session["labServerGuid"] = labServerGuid;
                        labServerName = payload.GetElementsByTagName("labServerName")[0].InnerText;
                        Session["labServerName"] = labServerName;

                    }

                    catch (Exception ex)
                    {
                        unauthorized = true;
                        Response.Redirect("Unauthorized.aspx", false);
                    }
                }

                else
                {
                    unauthorized = true;
                    Response.Redirect("Unauthorized.aspx", false);
                }

                if (!unauthorized)
                {

                    BuildRecurrenceListBox();
                }

            }
            else
            {
                userTZ = (int) Session["userTZ"];
                labServerGuid = (string) Session["labServerGuid"];
                labServerName = (string) Session["labServerName"];

            }
            StringBuilder buf = new StringBuilder("Create, modify or delete recurring time blocks.<br/><br/>Times shown are Local LSS time UTC&nbsp;&nbsp;&nbsp;");
            if (localTzOffset > 0)
                buf.Append("+");
            buf.Append(localTzOffset / 60.0);
            lblDescription.Text = buf.ToString();
        }
Ejemplo n.º 8
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            btnRemove.Attributes.Add("onclick", "javascript:if(confirm('Are you sure you want to remove this experiment Information?')== false) return false;");
            experimentInfoIds=USSSchedulingAPI.ListExperimentInfoIDs();
            experimentInfos=USSSchedulingAPI.GetExperimentInfos(experimentInfoIds);
            lssInfoIds=USSSchedulingAPI.ListLSSInfoIDs();
            lssInfos=USSSchedulingAPI.GetLSSInfos(lssInfoIds);

            if(!IsPostBack)
            {
                if (Session["couponID"] == null)
                    couponID = Request.QueryString["coupon_id"];
                else
                    couponID = Session["couponID"].ToString();

                if (Session["passkey"] == null)
                    passkey = Request.QueryString["passkey"];
                else
                    passkey = Session["passkey"].ToString();

                if (Session["issuerID"] == null)
                    issuerID = Request.QueryString["issuer_guid"];
                else
                    issuerID = Session["issuerID"].ToString();

                if (Session["sbUrl"] == null)
                    sbUrl = Request.QueryString["sb_url"];
                else
                    sbUrl = Session["sbUrl"].ToString();

                bool unauthorized = false;

                if (couponID != null && passkey != null && issuerID != null)
                {
                    try
                    {
                        Coupon coupon = new Coupon(issuerID, long.Parse(couponID), passkey);

                        ProcessAgentDB dbTicketing = new ProcessAgentDB();
                        Ticket ticket = dbTicketing.RetrieveAndVerify(coupon, TicketTypes.ADMINISTER_USS);

                        if (ticket.IsExpired() || ticket.isCancelled)
                        {
                            unauthorized = true;
                            Response.Redirect("Unauthorized.aspx", false);
                        }

                        Session["couponID"] = couponID;
                        Session["passkey"] = passkey;
                        Session["issuerID"] = issuerID;
                        Session["sbUrl"] = sbUrl;
                    }

                    catch (Exception ex)
                    {
                        unauthorized = true;
                        Response.Redirect("Unauthorized.aspx", false);
                    }
                }

                else
                {
                    unauthorized = true;
                    Response.Redirect("Unauthorized.aspx", false);
                }

                if (!unauthorized)
                {
                    // Load the Experiment list box
                    ddlExperiment.Items.Add(new ListItem(" ---------- select Experiment ---------- "));
                    for (int i = 0; i < experimentInfos.Length; i++)
                    {
                        string exper = experimentInfos[i].labClientName + " : " + experimentInfos[i].labClientVersion;
                        ddlExperiment.Items.Add(new ListItem(exper, experimentInfos[i].experimentInfoId.ToString()));
                    }
                    // Load the LSSlist box
                    ddlLSS.Items.Add(new ListItem(" ---------- select Lab side scheduling server ---------- "));
                    for (int i = 0; i < lssInfos.Length; i++)
                    {
                        ddlLSS.Items.Add(new ListItem(lssInfos[i].lssName, lssInfos[i].lssGuid));
                    }

                    // Set the GUID field to not ReadOnly
                    SetReadOnly(false);
                }

            }
        }
Ejemplo n.º 9
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            btnRemove.Attributes.Add("onclick", "javascript:if(confirm('Are you sure you want to remove this experiment Information?')== false) return false;");
            policyIDs = dbManager.ListUSSPolicyIDs();
            policies = dbManager.GetUSSPolicies(policyIDs);
            experimentInfoIds = dbManager.ListExperimentInfoIDs();
            experimentInfos = dbManager.GetExperimentInfos(experimentInfoIds);
            credentialSetIds = dbManager.ListCredentialSetIds();
            credentials = dbManager.GetCredentialSets(credentialSetIds);

            if (!IsPostBack)
            {

                if (Session["couponID"] == null || Request.QueryString["coupon_id"] != null)
                    couponID = Request.QueryString["coupon_id"];
                else
                    couponID = Session["couponID"].ToString();

                if (Session["passkey"] == null || Request.QueryString["passkey"] != null)
                    passkey = Request.QueryString["passkey"];
                else
                    passkey = Session["passkey"].ToString();

                if (Session["issuerID"] == null || Request.QueryString["issuer_guid"] != null)
                    issuerID = Request.QueryString["issuer_guid"];
                else
                    issuerID = Session["issuerID"].ToString();

                if (Session["sbUrl"] == null || Request.QueryString["sb_url"] != null)
                    sbUrl = Request.QueryString["sb_url"];
                else
                    sbUrl = Session["sbUrl"].ToString();

                bool unauthorized = false;

                if (couponID != null && passkey != null && issuerID != null)
                {
                    try
                    {
                        Coupon coupon = new Coupon(issuerID, long.Parse(couponID), passkey);

                        ProcessAgentDB dbTicketing = new ProcessAgentDB();
                        Ticket ticket = dbTicketing.RetrieveAndVerify(coupon, TicketTypes.MANAGE_USS_GROUP);

                        if (ticket.IsExpired() || ticket.isCancelled)
                        {
                            unauthorized = true;
                            Response.Redirect("Unauthorized.aspx", false);
                        }

                        Session["couponID"] = couponID;
                        Session["passkey"] = passkey;
                        Session["issuerID"] = issuerID;
                        Session["sbUrl"] = sbUrl;

                        XmlDocument payload = new XmlDocument();
                        payload.LoadXml(ticket.payload);

                        groupName = payload.GetElementsByTagName("groupName")[0].InnerText;
                        Session["groupName"] = groupName;
                        sbGuid = payload.GetElementsByTagName("sbGuid")[0].InnerText;
                        Session["sbGuid"] = sbGuid;
                    }

                    catch (Exception ex)
                    {
                        unauthorized = true;
                        Response.Redirect("Unauthorized.aspx", false);
                    }
                }

                else
                {
                    unauthorized = true;
                    Response.Redirect("Unauthorized.aspx", false);
                }

                if (!unauthorized)
                {

                    // Load the Policy list box
                    ddlPolicy.Items.Add(new ListItem(" ---------- select Policy ---------- "));
                    for (int i = 0; i < policies.Length; i++)
                    {
                        UssExperimentInfo exp = dbManager.GetExperimentInfos(new int[] { policies[i].experimentInfoId })[0];
                        string expStr = exp.labClientName + " " + exp.labClientVersion;
                        UssCredentialSet cre = dbManager.GetCredentialSets(new int[] { policies[i].credentialSetId })[0];
                        string creStr = cre.serviceBrokerName + " " + cre.groupName;
                        string pol = creStr + " _ " + expStr;
                        ddlPolicy.Items.Add(new ListItem(pol, policies[i].ussPolicyId.ToString()));
                    }
                    // Load the Experiment box
                    ddlExperiment.Items.Add(new ListItem(" ---------- select Experiment ---------- "));
                    for (int i = 0; i < experimentInfos.Length; i++)
                    {
                        string exper = experimentInfos[i].labClientName + " : " + experimentInfos[i].labClientVersion;
                        ddlExperiment.Items.Add(new ListItem(exper, experimentInfos[i].experimentInfoId.ToString()));
                    }

                    int index = -1;

                    // Load the Credential box
                    ddlGroup.Items.Add(new ListItem(" ---------- select Group ---------- "));
                    for (int i = 0; i < credentials.Length; i++)
                    {
                        string creStr = credentials[i].serviceBrokerName + " : " + credentials[i].groupName;
                        if (credentials[i].groupName.Equals(groupName) && credentials[i].serviceBrokerGuid.Equals(sbGuid))
                            index = credentials[i].credentialSetId;

                        ddlGroup.Items.Add(new ListItem(creStr, credentials[i].credentialSetId.ToString()));

                    }

                    ddlGroup.SelectedValue = index.ToString();
                    ddlGroup.Enabled = false;

                    // Set the GUID field to not ReadOnly
                    SetReadOnly(false);
                }

            }
        }