Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 3
0
        //static class Editfunction {



        internal static void MakeLawHor(Areas.Areas areas, Area_date current_area, int dlugoscMaxElement, int posnewmenu, string message)
        {
            Console.Clear();
            Console.WriteLine("Podaj nazwe");
            string name = Console.ReadLine();
            int    id   = areas.createhorlav(name);

            Console.WriteLine("ktorego obszaru bedzie dotyczyło");
            int  yn = 0;
            Menu menuyn;

            //int lawid = 0;
            do
            {
                var virarea = new Area_date(0, "", "", 0, "");
                var selarea = Program_function.Search(areas, virarea, 0, 3, message);
                if (selarea == virarea)
                {
                    return;
                }
                //Console.WriteLine("podaj nazwe obszaru jakiego dotyczy");
                //Area_date area = Program_function.Search(areas,current_area,0,8,message);
                areas.addareatolawhor(id, selarea.Id);
                Console.WriteLine("dodac wiecej obszrow?");
                menuyn = Menuform.Menu_yn(0, 10);
                yn     = menuyn.Show();
            } while (yn == 0);
            Console.WriteLine("dodaj documenty do prawa");
            do
            {
                MakeDocument.handcreateDochor(areas, id);

                Console.WriteLine("dodac wiecej?");
                yn = menuyn.Show();
            } while (yn == 0);
        }
Ejemplo n.º 4
0
 internal static void addarea_horlaw(Areas.Areas areas, HorLawdata law)
 {
     MakeDocument.handcreateDochor(areas, law.Id);
     //areas.delareahorlaw(law.Id,selecteddoc-1);
 }
Ejemplo n.º 5
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;
        }