protected void fillLocationsCombobox()
        {
            DataTable LocationDataTable = VSWebBL.SecurityBL.LocationsBL.Ins.GetAllData();

            LocationsComboBox.DataSource = LocationDataTable;
            LocationsComboBox.TextField  = "Location";
            LocationsComboBox.ValueField = "ID";
            LocationsComboBox.DataBind();
        }
        public void FillNodesData(int id)
        {
            DataTable dt = new DataTable();

            try
            {
                Nodes web = new Nodes();
                web.ID = Convert.ToInt32(Request.QueryString["ID"]);
                dt     = VSWebBL.SecurityBL.NodesBL.Ins.GetAllDataByNames(web);
                if (dt.Rows.Count > 0)
                {
                    NameTextBox.Text       = dt.Rows[0]["Name"].ToString();
                    HostNameTextBox.Text   = dt.Rows[0]["HostName"].ToString();
                    AliveTextBox.Text      = dt.Rows[0]["Alive"].ToString();
                    VersionTextBox.Text    = dt.Rows[0]["Version"].ToString();
                    NodeTypeTextBox.Text   = dt.Rows[0]["NodeType"].ToString();
                    LoadFactorTextBox.Text = dt.Rows[0]["LoadFactor"].ToString();

                    string isPriamry = dt.Rows[0]["IsConfiguredPrimaryNode"] != null && dt.Rows[0]["IsConfiguredPrimaryNode"].ToString() != "" ? dt.Rows[0]["IsConfiguredPrimaryNode"].ToString() : "false";
                    IsPrimaryNodeCheckBox.Checked = bool.Parse(isPriamry);
                    int CredentialsID = 0;
                    if (dt.Rows[0]["CredentialsID"].ToString() != null && dt.Rows[0]["CredentialsID"].ToString() != "" && dt.Rows[0]["CredentialsID"].ToString() != "-1")
                    {
                        Credentials cred = new Credentials();
                        cred.ID       = Convert.ToInt32(dt.Rows[0]["CredentialsId"].ToString());
                        CredentialsID = Convert.ToInt32(dt.Rows[0]["CredentialsId"].ToString());
                        DataTable credntials = VSWebBL.SecurityBL.NodesBL.Ins.GetCredentialsBynameid(cred);
                        //CredentialsComboBox.Text = Convert.ToString(CredentialsComboBox.Items.FindByValue(CredentialsID));
                        CredentialsComboBox.Text = credntials.Rows[0]["AliasName"].ToString();
                        for (int i = 0; i < CredentialsComboBox.Items.Count; i++)
                        {
                            if (CredentialsComboBox.Items[i].Value.ToString() == CredentialsID.ToString())
                            {
                                CredentialsComboBox.Items[i].Selected = true;
                            }
                        }
                    }

                    if (dt.Rows[0]["Location"].ToString() != null && dt.Rows[0]["Location"].ToString() != "")
                    {
                        LocationsComboBox.Text = dt.Rows[0]["Location"].ToString();
                        for (int i = 0; i < LocationsComboBox.Items.Count; i++)
                        {
                            if (LocationsComboBox.Items[i].Value.ToString() == LocationsComboBox.ToString())
                            {
                                LocationsComboBox.Items[i].Selected = true;
                            }
                        }
                    }

                    if (dt.Rows[0]["isDisabled"].ToString() == "" || !(Convert.ToBoolean(dt.Rows[0]["isDisabled"].ToString())))
                    {
                        FormDisableButton.Text = "Disable";
                    }
                    else
                    {
                        FormDisableButton.Text = "Enable";
                    }
                }
            }
            catch (Exception ex)
            {
                Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                throw ex;
            }
        }