Ejemplo n.º 1
0
        private void отчетToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmReps fr = new frmReps();

            my.Pform     = this;
            my.Ustr      = "";
            my.Szap      = " and   idOsr = " + idOSR.SelectedValue.ToString();
            my.Nbut      = 132;
            fr.MdiParent = my.MDIForm;
            fr.Show();
        }
Ejemplo n.º 2
0
        private void отчетToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmReps fr = new frmReps();

            my.Ustr      = "";
            my.Szap      = " and idcomplexchapter in (select idcomplexchapter from Sprav.dbo.tComplexChapter  where idcomplex = " + idComplex.SelectedValue.ToString() + ((int)idChapter.SelectedValue != 0 ? " and idchapter = " + idChapter.SelectedValue.ToString() : "") + ")";
            my.Nbut      = 131;
            fr.MdiParent = my.MDIForm;
            my.Pform     = this;
            fr.Show();
        }
Ejemplo n.º 3
0
        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            frmReps fr = new frmReps();

            my.Ustr      = "";
            my.Szap      = "'" + my.Uper + "'";
            my.Nbut      = 215;
            fr.MdiParent = my.MDIForm;
            my.Pform     = this;
            fr.Show();
        }
Ejemplo n.º 4
0
        private void TVib_Click(object sender, EventArgs e)
        {
            my.Nbut = nbut1;
            //my.UpredName = IdEnt.Text;
            frmReps fr = new frmReps();

            my.Pform = this;
            switch (nbut1)
            {
            case 77: my.Szap = "set dateformat dmy exec sReestrOSRF3 " + IdComplex.SelectedValue.ToString() + ", '" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "'"; break;

            case 73: my.Szap = " and idcomplex =" + IdComplex.SelectedValue.ToString(); break;

            case 185:
            case 178: my.UperName = (Convert.ToDateTime(d2.Text)).AddMonths(1).ToString("dd.MM.yyyy"); my.Szap = "exec SOstSmetLimit " + IdComplex.SelectedValue.ToString() + ",'" + d2.SelectedValue.ToString() + "'," + IdDog.SelectedValue + "," + ind + "," + IdPrice.SelectedValue + (nbut1 == 185? ",1":",0"); break;
            }
            fr.MdiParent = my.MDIForm;
            fr.Show();
        }
Ejemplo n.º 5
0
        private void TVib_Click(object sender, EventArgs e)
        {
            notChange = true;
            frmReps fr = new frmReps();

            my.Pform     = this;
            fr.MdiParent = my.MDIForm;
            my.Szap      = "";
            my.headStr   = headstr1;
            my.Nbut      = 67;
            //DataTable dt = dv.ToTable();

            //dv.Table = dt;
            //DataView dv1 = new DataView();
            //dv1.Table = dt;
            fr.dv = dv;
            fr.Show();
            notChange = false;
            //ModOffice.StendKompl(dv);
        }
Ejemplo n.º 6
0
 private void TVib_Click(object sender, EventArgs e)
 {
     my.UperName = "  " + d1.Text + " - " + d2.Text;
     if (d1.Text == d2.Text)
     {
         my.UperName = d1.Text;
     }
     if (rb2.Checked)
     {
         my.Szap = " and Period >= '" + d1.SelectedValue + "' and  Period  <= '" + d2.SelectedValue + "'  and vzamen = 0";
         if (rb3.Checked)
         {
             my.Szap = " and [ПериодГП] >= '" + d3.SelectedValue + "' and  [ПериодГП]  <= '" + d3.SelectedValue + "' ";
         }
         if (rbSub.Checked)
         {
             my.Szap = "exec sGpSp '" + d1.SelectedValue + "','" + d2.SelectedValue + "'," + (my.Nbut == 52 ? 76 : 1) + ",2";
         }
         ;
         if (chVvod.Checked & !rbSub.Checked)
         {
             my.Szap = my.Szap + " and [Datebeg]  between '" + d1.SelectedValue + "' and '" + d2.SelectedValue + "'";
         }
     }
     if (sender.ToString() == "Просмотр")
     {
         frmReps fr = new frmReps();
         my.Pform     = this;
         fr.MdiParent = my.MDIForm;
         fr.Show();
     }
     else
     {
         my.showSprDGV(my.Nbut, false, true);
         return;
     }
 }
Ejemplo n.º 7
0
        private void TVib_Click(object sender, EventArgs e)
        {
            Upred        = my.ExeScalar("select KodEntpr from Sprav.dbo.tsEntpr where identpr =" + IdEnt.SelectedValue.ToString());
            my.Nbut      = nbut1;
            my.UpredName = IdEnt.Text;
            frmReps fr = new frmReps();

            my.Pform = this;
            my.Szap  = " '" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "','" + ((nbut1 == 2003 | nbut1 == 80 | nbut1 == 85) ? "0" : (nbut1 == 2001 | nbut1 == 2020 ? Upred : IdEnt.SelectedValue.ToString())) + "' , " + ((this.radioButton0.Checked) ? 0 : 1) + "," + ((this.radioButton2.Checked) ? 0 : 1);
            if (groupBox2.Visible == false & nbut1 != 80 & nbut1 != 85)
            {
                my.Szap = " '" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "','" + IdEnt.SelectedValue.ToString() + "' , " + ((this.radioButton0.Checked) ? 0 : 1);
            }

            my.UperName = "  " + d1.Text + " - " + d2.Text;
            if (d1.Text == d2.Text)
            {
                my.UperName = d1.Text;
            }
            //if (nbut1 == 2002 | nbut1 == 2003 | nbut1 == 2001 | nbut1 == 170 | nbut1 == 80 | nbut1 == 81 | nbut1 == 85)
            //{
            if (this.radioButton3.Checked)
            {
                my.Ustr = "(соб. силы)";
            }
            else
            {
                if (this.radioButton0.Checked)
                {
                    my.Ustr = "(выполнение по ф є2)";
                }
                else
                {
                    my.Ustr = "(выполнение уточненное)";
                }
            }
            if (chPr.Checked & nbut1 != 2001)
            {
                my.Nbut = 2004;
            }

            switch (nbut1)
            {
            case 80: my.Szap = "set dateformat dmy exec r_svodnall " + my.Szap + ",4"; break;

            case 85: my.Szap = "set dateformat dmy exec r_svodnall " + my.Szap + ",4"; break;

            case 81: my.Szap = "set dateformat dmy exec sOplNezav '" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "'"; break;

            case 2003: my.Szap = "set dateformat dmy exec r_svodnall " + my.Szap + ""; break;

            case 2002: my.Szap = "set dateformat dmy exec r_svodn " + my.Szap + ",2002," + (chPr.Checked ? 1 : 0); break;

            case 2020:
            case 2001: my.Szap = "set dateformat dmy exec R_SmetnoeRaz " + my.Szap + "," + (nbut1 == 2001  ? nbut1.ToString() : "2002") + (nbut1 == 2001? "," + (chPr.Checked ? 1 : 0) : ""); break;

            case 170: my.Szap = "set dateformat dmy exec sNezaversh  '" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "'," + IdEnt.SelectedValue.ToString() + ",1"; break;

            case 2007:
            case 2005: my.Szap = "set dateformat dmy exec R_Buh  '" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "','" + Upred + "'," + my.Nbut.ToString(); break;

            case 2019: my.Szap = "set dateformat dmy exec R_Buh  '" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "','" + Upred + "'," + my.Nbut.ToString(); break;

            case 64:  my.Szap = "'" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "'"; break;

            case 183:
                my.Szap = "set dateformat dmy exec SSvodn  '" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "'"; break;

            case 186:
                my.Szap = "exec smrUpr.dbo.r_svodnall  '" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "',0,0,0"; break;

            case 189:
                my.Szap = "exec sRepNZ  '" + d1.SelectedValue.ToString() + "','" + ((DateTime)d2.SelectedValue).AddMonths(1).AddDays(-1).ToString() + "'," + IdEnt.SelectedValue.ToString(); break;

            case 74:
                my.Szap = "set dateformat dmy exec RSvodnZam  '" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "',0,1"; break;

            // case 2007: my.Szap = "set dateformat dmy exec R_Buh  '" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "','" + Upred + "'," + my.Nbut.ToString(); break;
            case 31:
                my.Szap = " and Period >= '" + d1.SelectedValue.ToString() + "' and  Period  <= '" + d2.SelectedValue.ToString() + "'" + (Upred == "000" ? "" : "  and Pred = '" + Upred + "'");
                my.Szap = my.Szap + " GROUP BY IdSm, Nomer, Object, Naim, SumBaz, SumTek, Zak, Sum91Or, PredName, Dogf2, DESCr, SumBazOr, SumTekOr, BazStObor, Osn";
                my.showSprDGV(my.Nbut, false, true);
                return;

            case 711:
                my.Szap = " and Period >= '" + d1.SelectedValue.ToString() + "' and  Period  <= '" + d2.SelectedValue.ToString() + "'" + (Upred == "000" ? "" : "  and Pred = '" + Upred + "'");
                break;

            case 181:
                my.Szap  = "exec sInvPrVip '" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "'," + IdEnt.SelectedValue.ToString();
                my.SzapN = "'" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "'," + IdEnt.SelectedValue.ToString();
                break;

            case 192:

                break;

            case 193:
                my.Szap = "exec sForNZNotPrivjazki  '" + d1.SelectedValue.ToString() + "','" + d2.SelectedValue.ToString() + "','" + Upred + "'";
                my.Nbut = 3000;
                my.showSprDGV(my.Nbut, false, true);
                return;

            default:
                if (!my.isFormInMdi("frmSprZapros", my.Nbut, this))
                {
                    my.showSprZapros(my.Nbut, false, true);
                }
                return;
            }
            fr.MdiParent = my.MDIForm;
            fr.Show();
        }
Ejemplo n.º 8
0
        private void TVib_Click(object sender, EventArgs e)
        {
            frmReps fr = new frmReps();

            my.Pform     = this;
            my.UpredName = IdEnt.Text;
            my.UperName  = "  " + d1.Text + " - " + d2.Text;
            if (d1.Text == d2.Text)
            {
                my.UperName = d1.Text;
            }
            switch (my.Nbut)
            {
            case 180:
            case 195:
                //if (chPoMes.Checked)
                //{
                //    my.Szap = "exec SSvodnPoMes '" + d1.SelectedValue + "','" + d2.SelectedValue + "'," + IdEnt.SelectedValue + "," + idComplex.SelectedValue + "," + (chOldCodir.Checked ? 1 : 0);
                //    //return;
                //}
                //else
                //{
                my.Szap = "exec SSvodn '" + d1.SelectedValue + "','" + d2.SelectedValue + "'," + IdEnt.SelectedValue + ",1," + idComplex.SelectedValue + "," + (chOldCodir.Checked ? 1 : 0) + "," + (chSub.Checked || chPoMes.Checked ? 1 : 0);
                //}
                if (chSNds.Checked)
                {
                    fr.nds = 1.20;
                }
                else
                {
                    fr.nds = 1;
                }
                break;

            case 191:
            case 190:
            case 172:
            case 166:
            case 182:
            case 171:
                if (chPoMes.Checked)
                {
                    my.Szap = "exec sNezavershKratko '" + ((my.Nbut == 171 || my.Nbut == 190) ? "01.07.2008" : "01.09.2007") + "','" + d1.SelectedValue + "','" + d2.SelectedValue + "', " + ((my.Nbut == 171 || my.Nbut == 190) ? 4 : 5) + ",'" + IdEnt.Text + "'";
                }
                else
                {
                    my.Szap = "exec sNezaversh '" + d1.SelectedValue + "','" + d2.SelectedValue + "'," + IdEnt.SelectedValue + "," + (my.Nbut == 182 ? 2 : (my.Nbut == 166? 0: (my.Nbut == 171 | my.Nbut == 190 | my.Nbut == 191) ? 4 : 5)) + ",0," + (chSub.Checked ? 0 : 1) + ",'" + IdEnt.Text + "'," + (chOldCodir.Checked ? 1 : 0) + ",0";
                }
                break;

            case 175:
                my.Szap = "exec SOstSmet '" + d1.SelectedValue + "','" + d2.SelectedValue + "','" + IdEnt.Text + "'," + idComplex.SelectedValue;
                break;

            case 187:
                my.Szap = "exec SSvodnPoDog  '" + d1.SelectedValue + "','" + d2.SelectedValue + "','" + IdEnt.SelectedValue + "',1," + idComplex.SelectedValue;
                break;

            default:
                break;
            }

            if (chSub.Checked)
            {
                fr.sub = true;
            }
            else
            {
                fr.sub = false;
            }
            if (chPoMes.Checked)
            {
                fr.poMes = true;
            }
            else
            {
                fr.poMes = false;
            }

            fr.MdiParent = my.MDIForm;
            fr.Show();
        }
Ejemplo n.º 9
0
        private void TVib_Click(object sender, EventArgs e)
        {
            SMRC.DGVt dg = (SMRC.DGVt)pform1.GetType().InvokeMember("DgvActs", System.Reflection.BindingFlags.GetField, null, pform1, null);
            my.Szap = "";
            int kol = dg.SelectedRows.Count;

            if (kol == 0)
            {
                return;
            }
            for (int i = 0; i < kol; i++)
            {
                my.Szap = my.Szap + dg.SelectedRows[i].Cells[0].Value + ",";
            }
            my.Szap = my.Szap.Substring(0, my.Szap.Length - 1);
            my.Nbut = nbut1;
            //switch (nbut1)
            //{
            //case 1:
            //case 4:
            //case 8:
            //case 20:
            //case 13:
            //case 21:
            //case 25:
            //case 11:
            //    {
            frmReps fr = new frmReps();

            my.Ustr      = "";
            my.MyStr[0]  = (rb84.Checked ? "1" : "2");
            fr.MdiParent = my.MDIForm;
            my.Pform     = pform1;
            fr.Show();
            //break;
            //    }
            //default:
            //    break;
            //}
            //if nbut1 = 17 Or nbut1 = 23 Or nbut1 = 28 Then
            //    nbut = nbut1 + 2
            //ElseIf nbut1 = 20 Then
            //    nbut = nbut1
            //ElseIf nbut1 = 0 Then
            //    nbut = 2
            //Else
            //    nbut = nbut1 + IIf(nbut1 = 11, фл_ДавальчМатериалы, 0)
            //End If



            //If nbut = 2 Or nbut = 6 Then reestr: Exit Sub
            //If nbut1 = 1 Then reestrUsKom: Exit Sub
            //If nbut1 = 2 Then reestrUsKom1: Exit Sub
            //If nbut1 = 3 Then reestrSUS: Exit Sub
            //If nbut1 = 5 Then nbut = nbut1: reestr2000: Exit Sub
            //If nbut1 = 6 Then nbut = nbut1: reestr2000: Exit Sub
            //Set fr = New CR
            // fr.Show
            //ex:
        }
Ejemplo n.º 10
0
        private void HelpMenu_Click(object sender, System.EventArgs e)
        {
            ToolStripMenuItem item = (ToolStripMenuItem)sender;

            my.Szap = "";
            Console.Write(item.Name);
            if (item.Name != "SootvA0" & item.Name != "Spr")
            {
                if (item.Name != "Reestr")
                {
//Console.Write( item.Name);
                    switch (item.Name)
                    {
                    //case "Prog1":
                    //    {
                    //        About fr = new About();
                    //        fr.ShowDialog();
                    //    }
                    //    break;
                    case "frmSogl":
                        try
                        {
                            //string s = "exec sRInFileNZP '','','','test','" + DateTime.Today.Year.ToString() + "','nz'";
                            my.Nbut = 1;
                            if (!my.isFormInMdi("frmSogl", my.Nbut, this))
                            {
                                frmSogl fr = new frmSogl();
                                fr.Tag       = my.Nbut;
                                fr.MdiParent = my.MDIForm;
                                fr.Dock      = DockStyle.Fill;
                                //  fr.GrafikUni(s);
                                fr.Show();
                            }

                            //  MessageBox.Show("Готово");
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(ex.Message);
                        }
                        break;

                    case "frmVibList":
                        try
                        {
                            string s = "exec sRInFileNZP '','','','test','" + DateTime.Today.Year.ToString() + "','nz'";
                            my.Nbut = 1;
                            if (!my.isFormInMdi("frmVibList", my.Nbut, this))
                            {
                                frmVibList fr = new frmVibList();
                                fr.Tag       = my.Nbut;
                                fr.MdiParent = my.MDIForm;
                                fr.GrafikUni(s);
                                fr.Show();
                            }

                            //  MessageBox.Show("Готово");
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(ex.Message);
                        }
                        break;

                    case "Upload":
                        try
                        {
                            System.Diagnostics.Process proc = new System.Diagnostics.Process();
                            proc.EnableRaisingEvents = false;
                            proc.StartInfo.FileName  = "C:\\cis\\Сервис\\Web1SSvod.exe";
                            proc.Start();
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(ex.Message);
                        }

                        break;

                    case "Dostup":
                        if (!my.isFormInMdi("frmDostup", (int)item.Tag, this))
                        {
                            frmDostup fr = new frmDostup();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "SpUgSh":
                        if (!my.isFormInMdi("frmOSR", (int)item.Tag, this))
                        {
                            frmOSR fr = new frmOSR();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            string withupstr = my.ExeScalar("select 1 from dostup.dbo.v_Dostup where Login = '******'  and id_ac=217");
                            fr.WithUp = (withupstr == "" ? false : true);
                            fr.Show();
                        }
                        break;

                    case "MSProject":
                        if (!my.isFormInMdi("frmMSProject", (int)item.Tag, this))
                        {
                            //frmMSProject fr = new frmMSProject();
                            //fr.Tag = (int)item.Tag;
                            //my.Nbut = (int)item.Tag; ;
                            //fr.MdiParent = my.MDIForm;
                            //fr.Show();
                        }
                        break;

                    case "DogOpyt":
                        my.Szap = "exec sDogOpyt";
                        frmReps fr1 = new frmReps();
                        my.Pform      = this;
                        fr1.MdiParent = my.MDIForm;
                        fr1.Tag       = (int)item.Tag;
                        my.Nbut       = (int)item.Tag;

                        fr1.Show();
                        break;

                    case "frmTP":
                        if (!my.isFormInMdi("frmTP", (int)item.Tag, this))
                        {
                            frmTP fr = new frmTP();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "LinkWrk":
                        if (!my.isFormInMdi("frmLinkWRK", (int)item.Tag, this))
                        {
                            frmLinkWRK fr = new frmLinkWRK();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "Struc":
                        if (!my.isFormInMdi("frmStrucProg", (int)item.Tag, this))
                        {
                            frmStrucProg fr = new frmStrucProg();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "GrafikMatch":
                        if (!my.isFormInMdi("frmGrafikMatch", (int)item.Tag, this))
                        {
                            frmGrafikMatch fr = new frmGrafikMatch();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "ScanSm":
                        if (!my.isFormInMdi("frmScanSm", (int)item.Tag, this))
                        {
                            frmScanSm fr = new frmScanSm();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "PlanSmA0":
                        if (!my.isFormInMdi("frmPlanSmA0", (int)item.Tag, this))
                        {
                            frmPlanSmA0 fr = new frmPlanSmA0();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "Hierar":
                        if (!my.isFormInMdi("frmVibComplex", (int)item.Tag, this))
                        {
                            frmVibComplex fr = new frmVibComplex();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "PerechSm":
                        if (!my.isFormInMdi("frmVibIspSm", (int)item.Tag, this))
                        {
                            frmVibIspSm fr = new frmVibIspSm();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "RPredNZ":
                        if (!my.isFormInMdi("frmVibPred", (int)item.Tag, this))
                        {
                            frmVibPred fr = new frmVibPred();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "frmVibTest":
                        if (!my.isFormInMdi("frmVibTest", (int)item.Tag, this))
                        {
                            frmVibTest fr = new frmVibTest();
                            fr.Tag       = (int)item.Tag;
                            fr.Text      = item.Text;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Dock      = DockStyle.Fill;
                            fr.Show();
                        }
                        break;

                    case "RPredGP":
                        if (!my.isFormInMdi("frmVibGP", (int)item.Tag, this))
                        {
                            frmVibGP fr = new frmVibGP();
                            fr.Tag       = (int)item.Tag;
                            fr.Text      = item.Text;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "RInv":
                        if (!my.isFormInMdi("frmVibInv", (int)item.Tag, this))
                        {
                            frmVibInv fr = new frmVibInv();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "RPred":
                    case "RSmet":
                    case "RSmetF2F3":
                        //fr;
                        if (!my.isFormInMdi("frmVibSmet", (int)item.Tag, this))
                        {
                            frmVibSmet fr = new frmVibSmet();
                            fr.Tag       = (int)2001;
                            fr.Text      = item.Text;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            if (item.Name == "RPred")
                            {
                                fr.Height = 111;
                            }
                            fr.Show();
                            if (my.Nbut == 2001 | my.Nbut == 170 | my.Nbut == 2020)
                            {
                                fr.Text = "Сметное разложение";
                            }
                            else
                            {
                                if (my.Nbut == 2002)
                                {
                                    fr.Text = "Сводные";
                                }
                            };
                        }
                        break;

                    case "RPeriod":
                        if (!my.isFormInMdi("frmVibPeriod", (int)item.Tag, this))
                        {
                            frmVibPeriod fr = new frmVibPeriod();
                            fr.Text      = item.Text;
                            fr.Tag       = (int)item.Tag;
                            fr.Nbut      = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "RPer":
                        if (!my.isFormInMdi("frmVibPer", (int)item.Tag, this))
                        {
                            frmVibPer fr = new frmVibPer();
                            fr.Text = item.Text;
                            fr.Tag  = (int)item.Tag;
                            // fr.Nbut = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "A0":
                        if (!my.isFormInMdi("frmSootvA0", (int)item.Tag, this))
                        {
                            frmSootvA0 fr = new frmSootvA0();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "PlanGen":
                        if (!my.isFormInMdi("frmPlanGen", (int)item.Tag, this))
                        {
                            frmPlanGen fr = new frmPlanGen();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "Pr":
                        if (!my.isFormInMdi("frmSootvPr", (int)item.Tag, this))
                        {
                            frmSootvPr fr = new frmSootvPr();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "A0LKV":
                        if (!my.isFormInMdi("frmA0LKV", (int)item.Tag, this))
                        {
                            frmA0LKV fr = new frmA0LKV();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "TM":
                        if (!my.isFormInMdi("frmPlans", (int)item.Tag, this))
                        {
                            frmTemPlans fr = new frmTemPlans();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "wf3":
                    {
                        frmForF3 fr = new frmForF3();
                        fr.MdiParent = my.MDIForm;
                        fr.Show();
                    }
                    break;

                    case "GP":
                        if (!my.isFormInMdi("frmDog", (int)item.Tag, this))
                        {
                            frmDog fr = new frmDog();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag - 1000;;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "Sub":
                        if (!my.isFormInMdi("frmActsSub", (int)item.Tag, this))
                        {
                            frmActsSub fr = new frmActsSub();
                            fr.Tag       = (int)item.Tag;
                            my.Nbut      = (int)item.Tag - 3000;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "SSR1":
                        if (!my.isFormInMdi("frmSSRSm", 0, this))
                        {
                            frmSSRSm fr = new frmSSRSm();
                            fr.Tag       = (int)0;
                            fr.nbut1     = 0;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "Koef":
                        if (!my.isFormInMdi("frmDN", 0, this))
                        {
                            frmDN fr = new frmDN();
                            fr.Tag       = (int)0;
                            fr.nbut1     = 0;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "frmInvDog":
                        if (!my.isFormInMdi("frmInvDog", 0, this))
                        {
                            frmInvDog fr = new frmInvDog();
                            fr.Tag       = (int)0;
                            fr.MdiParent = my.MDIForm;
                            fr.Show();
                        }
                        break;

                    case "SpUgPr":
                        my.Szap = "";
                        my.Nbut = (int)item.Tag;
                        //my.Nbut = 8;
                        bool withup = true;
                        if (my.Nbut == 8 || my.Nbut == 721 || my.Nbut == 724)
                        {
                            withup = false;
                        }
                        //if (my.Nbut == 704) { if (my.UserInGroup(my.Id_us,234)) ; }
                        if (!my.isFormInMdi("frmSprDGV", my.Nbut, this))
                        {
                            my.showSprDGV(my.Nbut, withup, true);
                        }
                        break;

                    case "frmReasons":
                        my.Szap = "";
                        my.Nbut = (int)item.Tag;
                        //my.Nbut = 8;
                        withup = true;
                        //if (my.Nbut == 704) { if (my.UserInGroup(my.Id_us,234)) ; }
                        if (!my.isFormInMdi("frmReasons", my.Nbut, this))
                        {
                            frmReasons fr = new frmReasons();
                            fr.Tag       = (int)0;
                            fr.MdiParent = my.MDIForm;
                            fr.Dock      = DockStyle.Fill;
                            fr.Show();
                        }
                        break;

                    case "PreviewAkt":
                        if (!my.isFormInMdi("frmActs", my.Nbut, this))
                        {
                            Form fr = new frmActs();
                            fr.Tag       = 0;
                            fr.MdiParent = my.MDIForm;
                            fr.Dock      = DockStyle.Fill;
                            fr.Show();
                            int w = fr.Width;
                            int h = fr.Height;
                            fr.Dock   = DockStyle.None;
                            fr.Width  = w;
                            fr.Height = h;
                        }
                        break;

                    case "WindH":
                        LayoutMdi(MdiLayout.TileHorizontal); break;

                    case "WindV":
                        LayoutMdi(MdiLayout.TileVertical); break;

                    case "WindC":
                        LayoutMdi(MdiLayout.Cascade); break;

                    case "Prog":
                    {
                        About fr = new About(); fr.ShowDialog();
                        //frmReasons fr = new frmReasons(); fr.Show();
                    }
                        //if (!my.isFormInMdi("frmDiagram", 0, this))
                        //{
                        //    frmDiagram fr = new frmDiagram();
                        //    fr.Tag = (int)0;
                        //    fr.MdiParent = my.MDIForm;
                        //    fr.Show();
                        //}
                        //if (my.MDIFormCont.Visible)
                        //{
                        //    while (my.MDIFormCont.Controls.Count != 0)
                        //    {

                        //        foreach (Control fr in my.MDIFormCont.Controls)
                        //        {
                        //            //MessageBox.Show(fr.Name);
                        //            if (fr.GetType().ToString().Contains("frm"))
                        //            {
                        //                //  my.MDIFormCont.Controls.Remove(fr);
                        //                //((Form)  fr).TopLevel = true;
                        //                ((Form)fr).MdiParent = my.MDIForm;
                        //                ((Form)fr).FormBorderStyle = FormBorderStyle.Sizable;
                        //                ((Form)fr).Show();
                        //            }
                        //            else { my.MDIFormCont.Controls.Remove(fr); }

                        //        }
                        //    }
                        //    my.MDIFormCont.Hide();
                        //}
                        //else
                        //{
                        //    System.Windows.Forms.Splitter splitter1;
                        //    foreach (Form fr in my.MDIForm.MdiChildren)
                        //    {
                        //        if (!fr.Equals(my.MDIFormCont))
                        //        {
                        //            fr.MdiParent = null; fr.TopLevel = false;
                        //            my.MDIFormCont.Controls.Add(fr);
                        //            fr.Dock = DockStyle.Left;
                        //            fr.FormBorderStyle = FormBorderStyle.FixedToolWindow;
                        //            fr.Show();
                        //            splitter1 = new System.Windows.Forms.Splitter();
                        //            splitter1.Dock = System.Windows.Forms.DockStyle.Left;
                        //            //splitter1.BackColor = System.Drawing.Color.Azure;
                        //            splitter1.Size = new System.Drawing.Size(10, 562);
                        //            splitter1.BorderStyle = BorderStyle.FixedSingle;
                        //            my.MDIFormCont.Controls.Add(splitter1);
                        //        }
                        //    }
                        //    my.MDIFormCont.MdiParent = my.MDIForm;
                        //    my.MDIFormCont.Dock = DockStyle.Fill;
                        //    //my.MDIFormCont.BackColor = System.Drawing.Color.Lavender;
                        //    my.MDIFormCont.FormBorderStyle = FormBorderStyle.None;
                        //    my.MDIFormCont.Show();
                        //}
                        break;

                    case "Exit1":
                        Application.Exit();
                        return;

                    default:
                        //   LayoutMdi(MdiLayout.Cascade);
                        break;
                    }
                }
            }
        }