Ejemplo n.º 1
0
        private void LoadCheckOutFromServers()
        {
            try
            {
                cbCheckOutFrom.Items.Clear();
                DataTable dt = null;

                using (DataStuff sn = new DataStuff())
                {
                    if (!StrictCreateBaseFromProd)
                    {
                        //Load all servers

                        dt = sn.GetCheckOutFromServers(AliasName);
                    }
                    else
                    {
                        //See if the object exists in prod

                        if (IsExistingObjectInProd())
                        {
                            //Set the combo text to production and disable

                            cbCheckOutFrom.Text    = ProductionServerAlias;
                            cbCheckOutFrom.Enabled = false;
                            return;
                        }
                        else
                        {
                            //Load all servers

                            dt = sn.GetCheckOutFromServers(AliasName);
                        }
                    }

                    if (dt.Rows.Count > 0)
                    {
                        foreach (DataRow row in dt.Rows)
                        {
                            cbCheckOutFrom.Items.Add(row["ServerAliasDesc"].ToString());
                        }
                    }

                    cbCheckOutFrom.Items.Add("Use Current Version");
                }
            }

            catch
            {
                throw;
            }
        }