예제 #1
0
        internal static void ModLawhor(Areas.Areas areas, Area_date current_area, int dlugoscMaxElement, int posnewmenu, string message)
        {
            Console.Clear();
            HorLawdata Law            = Program_function.SearchLawhor(areas, current_area, dlugoscMaxElement, posnewmenu, message);
            var        adddelemen     = new Menu(new string[] { "dodaj doc", " usun doc ", "dodaj obszar", "usun obszar" }, 0, 0);
            int        adddele        = adddelemen.Show();
            var        modechangemenu = Menuform.Menu_yn(posnewmenu, 0);

            switch (adddele)
            {
            case 1:
                MakeDocument.handcreateDocver(areas, Law.Id);
                break;

            case 2:
                ModDoc.DelDocHor(areas, Law);
                break;

            case 3:
                addarea_horlaw(areas, Law);

                break;

            case 4:
                delarea_horlaw(areas, Law);
                break;
            }
        }
예제 #2
0
        internal static void ModLawver(Areas.Areas areas, Area_date current_area, int dlugoscMaxElement, int posnewmenu, string message)
        {
            Console.Clear();
            Area_date varae = new Area_date();

            Console.WriteLine("Prawo kturego obszaru chezs zmodyfikowac");
            Area_date arealaw        = Program_function.Search(areas, varae, dlugoscMaxElement, posnewmenu, message);
            var       law            = areas.Find_local_law(arealaw.Id);
            var       adddelemen     = new Menu(new string[] { "dodaj doc", "dodaj usun" }, 0, 0);
            int       adddele        = adddelemen.Show();
            var       modechangemenu = Menuform.Menu_yn(posnewmenu, 0);

            switch (adddele)
            {
            case 1:
                MakeDocument.handcreateDocver(areas, law.Id);
                break;

            case 2:
                ModDoc.DelDocVer(areas, law);
                break;
            }
        }
예제 #3
0
        internal static void edit_select(Areas.Areas areas, Area_date current_area, int DlugoscMaxElement, int posnewmenu, string message)//chyba zrboie z tego klase bo to za duzo kodu;
        {
            int what, dod;

            do
            {
                Console.Clear();
                var menuwhat = new Menu(new string[] { "obszary", "prawo", "powrót" }, 0, 0);
                what = menuwhat.Show();
                var Menudo     = new Menu(new string[] { "dodaj", "modyfikuj", "usun", "powrót", }, 0, 0);
                var Menudoclaw = new Menu(new string[] { "document", "prawo", " powrót" }, 0, 0);

                switch (what)
                {
                case 0:
                    dod = Menudo.Show();
                    switch (dod)
                    {
                    case 0:
                        //reczne tworzenei obszaru
                        EditArea.hand_made_area(areas);
                        break;

                    case 1:
                        EditArea.Modarea(areas, current_area, 0, 0, message);
                        break;

                    case 2:
                        EditArea.DeleteArea(areas, current_area, 0, 0, message);
                        break;

                    case 3:
                        what = 2;
                        break;
                    }
                    break;

                case 1:
                    dod = Menudo.Show();
                    int doc;
                    switch (dod)
                    {
                    case 0:
                        Menudoclaw.Refresh_string(new string[] { "obszary do prawa", "prawo poziome", "powrót" });
                        doc = Menudoclaw.Show();
                        if (doc == 0)
                        {
                            MakeDocument.MakeDocumentto(areas, current_area, 0, 0, message);
                        }
                        else if (doc == 1)
                        {
                            Editmainfunction.MakeLawHor(areas, current_area, 0, 0, message);
                        }
                        break;

                    case 1:
                        doc = Menudoclaw.Show();
                        if (doc == 0)
                        {
                            Menu typeemenu = new Menu(new string[] { "poziome", "pionowe", }, 0, 0);
                            int  typee     = typeemenu.Show();
                            if (typee == 0)
                            {
                                ModDoc.Moddochor(areas, current_area, 0, 0, message);
                            }
                            else if (typee == 1)
                            {
                                ModDoc.Moddocver(areas, current_area, 0, 0, message);
                            }
                        }
                        else if (doc == 1)
                        {
                            Menu typeemenu = new Menu(new string[] { "pionowe", "poziome" }, 0, 0);
                            int  typee     = typeemenu.Show();
                            if (typee == 1)
                            {
                                ModLaw.ModLawver(areas, current_area, 0, 0, message);
                            }
                            else if (typee == 1)
                            {
                                ModLaw.ModLawhor(areas, current_area, 0, 0, message);
                            }
                        }
                        break;

                    case 2:
                        Menu typemenu = new Menu(new string[] { "pionowe", "poziome" }, 0, 0);
                        int  type     = typemenu.Show();
                        if (type == 1)
                        {
                            ModLaw.DelLawver(areas, current_area, 0, 0, message);
                        }
                        else if (type == 2)
                        {
                            ModLaw.DelLawhor(areas, current_area, 0, 0, message);
                        }
                        break;

                    case 3:
                        what = 2;
                        break;
                    }
                    break;
                }
            } while (what != 2 && what != -1);
            //pass
            return;
        }