void openConfDir()
        {
            try
            {

                int val = Convert.ToInt32(cbMAType.SelectedValue.ToString());

                if (first == true)
                {
                    button6.Visible = false;
                    if ((val > 1 && val <= 4) || (val >= 8 && val <= 11))
                    {
                        if (globalData.maplan != 0)
                            loadConfName();
                        else
                            tbConf.Text = "Нет в справочнике";

                        lNameConf.Visible = true;
                        tbConf.Visible    = true;
                        button6.Visible = true;
                    }

                    return;
                }

                if (val > 1 && val <= 4)
                {
                    //AddConf ac = new AddConf();
                    AddMA_Name ac = new AddMA_Name(val);
                    ac.ShowDialog();//MessageBox.Show("Выберите конференцию из списка!");
                    tbConf.Visible = true;
                    lNameConf.Visible = true;
                    button6.Visible = true;
                }
                else if (val >= 8 && val <= 11)
                {
                    //AddConf ac = new AddConf(true);
                    AddMA_Name ac = new AddMA_Name(val);
                    ac.ShowDialog();//MessageBox.Show("Выберите мероприятие Эскулап Академии из списка!");
                    lNameConf.Visible = true;
                    tbConf.Visible = true;
                    button6.Visible = true;
                }
                else
                {
                    globalData.maplan = 0;
                    globalData.matype = "0";
                    tbConf.Text = String.Empty;
                    lNameConf.Visible = false;
                    tbConf.Visible = false;
                    button6.Visible = false;
                }

                if (globalData.maplan != 0)
                    loadConfName();
                else
                    tbConf.Text = "Нет в справочнике";

            }
            catch (Exception)
            {
               // this.Close();
            }
        }
        void openConfDir()
        {
            try
            {
                int val = Convert.ToInt32(cbMAType.SelectedValue.ToString());

                if (first == true)
                {
                    button6.Visible = false;
                    if ((val > 1 && val <= 4) || (val >= 8 && val <= 11))
                    {
                        if (globalData.maplan != 0)
                        {
                            loadConfName();
                        }
                        else
                        {
                            tbConf.Text = "Нет в справочнике";
                        }

                        lNameConf.Visible = true;
                        tbConf.Visible    = true;
                        button6.Visible   = true;
                    }

                    return;
                }


                if (val > 1 && val <= 4)
                {
                    //AddConf ac = new AddConf();
                    AddMA_Name ac = new AddMA_Name(val);
                    ac.ShowDialog();//MessageBox.Show("Выберите конференцию из списка!");
                    tbConf.Visible    = true;
                    lNameConf.Visible = true;
                    button6.Visible   = true;
                }
                else if (val >= 8 && val <= 11)
                {
                    //AddConf ac = new AddConf(true);
                    AddMA_Name ac = new AddMA_Name(val);
                    ac.ShowDialog();//MessageBox.Show("Выберите мероприятие Эскулап Академии из списка!");
                    lNameConf.Visible = true;
                    tbConf.Visible    = true;
                    button6.Visible   = true;
                }
                else
                {
                    globalData.maplan = 0;
                    globalData.matype = "0";
                    tbConf.Text       = String.Empty;
                    lNameConf.Visible = false;
                    tbConf.Visible    = false;
                    button6.Visible   = false;
                }

                if (globalData.maplan != 0)
                {
                    loadConfName();
                }
                else
                {
                    tbConf.Text = "Нет в справочнике";
                }
            }
            catch (Exception)
            {
                // this.Close();
            }
        }