Ejemplo n.º 1
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            foreach (Object item in chdListBoxCreate.CheckedItems)
            {
                if (chdListBoxCreate.Items.IndexOf(item) == 0)
                {
                    openFileDialog1.Filter   = "Excel files (*.xlsx)|*.xlsx";
                    openFileDialog1.FileName = "DogovorProject";
                    if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
                    {
                        return;
                    }
                    Dogovor dogovor = new Dogovor();
                    dogovor.ProjectDogovor(openFileDialog1.FileName);
                }
                else if (chdListBoxCreate.Items.IndexOf(item) == 1)
                {
                    openFileDialog1.Filter   = "Excel files (*.xlsx)|*.xlsx";
                    openFileDialog1.FileName = "DogovorCreate";
                    if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
                    {
                        return;
                    }
                    Dogovor dogovor = new Dogovor();
                    dogovor.CreateDogovor(openFileDialog1.FileName);
                }
                else if (chdListBoxCreate.Items.IndexOf(item) == 2)
                {
                    openFileDialog1.Filter   = "Excel files (*.xlsx)|*.xlsx";
                    openFileDialog1.FileName = "Home";
                    if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
                    {
                        return;
                    }
                    Home home = new Home();
                    home.CreateHome(openFileDialog1.FileName);
                }
                else if (chdListBoxCreate.Items.IndexOf(item) == 3)
                {
                    openFileDialog1.Filter   = "Excel files (*.xlsx)|*.xlsx";
                    openFileDialog1.FileName = "LS";
                    if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
                    {
                        return;
                    }
                    LS ls = new LS();
                    ls.CreateLS(false, openFileDialog1.FileName, "gis_ls");
                }
                else if (chdListBoxCreate.Items.IndexOf(item) == 4)
                {
                    openFileDialog1.Filter   = "Excel files (*.xlsx)|*.xlsx";
                    openFileDialog1.FileName = "IPY";
                    if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
                    {
                        return;
                    }
                    PY py = new PY();
                    py.AddIPY(openFileDialog1.FileName);
                }
                else if (chdListBoxCreate.Items.IndexOf(item) == 5)
                {
                    openFileDialog1.Filter   = "Excel files (*.xlsx)|*.xlsx";
                    openFileDialog1.FileName = "DeleteIPY";
                    if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
                    {
                        return;
                    }
                    PY py = new PY();
                    py.DeleteIPY(openFileDialog1.FileName);
                }
                else if (chdListBoxCreate.Items.IndexOf(item) == 6)
                {
                    openFileDialog1.Filter   = "Excel files (*.xlsx)|*.xlsx";
                    openFileDialog1.FileName = "PokazPY";
                    if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
                    {
                        return;
                    }

                    Pokaz pokaz = new Pokaz();
                    pokaz.AddPokazIPY(openFileDialog1.FileName);
                    //pokaz.AddPokazODPY(openFileDialog1.FileName);
                }
                else if (chdListBoxCreate.Items.IndexOf(item) == 7)
                {
                    openFileDialog1.Filter   = "Excel files (*.xlsx)|*.xlsx";
                    openFileDialog1.FileName = "ODPY";
                    if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
                    {
                        return;
                    }
                    PY py = new PY();
                    py.AddODPY(openFileDialog1.FileName);
                }
                else if (chdListBoxCreate.Items.IndexOf(item) == 8)
                {
                    openFileDialog1.Filter   = "Excel files (*.xlsx)|*.xlsx";
                    openFileDialog1.FileName = "Kvit";
                    if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
                    {
                        return;
                    }
                    Kvit kvit = new Kvit();
                    kvit.CreatKvit(openFileDialog1.FileName);
                }
                else if (chdListBoxCreate.Items.IndexOf(item) == 9)
                {
                    openFileDialog1.Filter   = "Excel files (*.xlsx)|*.xlsx";
                    openFileDialog1.FileName = "Pay";
                    if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
                    {
                        return;
                    }
                    Pay pay = new Pay();
                    pay.Kassa(openFileDialog1.FileName);
                }
                else if (chdListBoxCreate.Items.IndexOf(item) == 10)
                {
                    openFileDialog1.Filter   = "Excel files (*.xlsx)|*.xlsx";
                    openFileDialog1.FileName = "LS";
                    if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
                    {
                        return;
                    }
                    LS ls = new LS();
                    ls.CreateLS(false, openFileDialog1.FileName, "");
                }
            }
        }
Ejemplo n.º 2
0
        private void button8_Click(object sender, EventArgs e)
        {
            Dogovor createDogovor = new Dogovor();

            createDogovor.ProjectDogovor();
        }