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; } }
internal void Show() { Console.Clear(); Area_date varae = new Area_date(); Console.WriteLine("Prawo kturego obszaru chezs zmodyfikowac"); Area_date arealaw = searcher.Search(0, 1, varae); var law = areas.Find_local_law(arealaw.Id); var adddelemen = new Menu(new string[] { "dodaj doc", "dodaj usun" }, 0, 4); int adddele = adddelemen.Show(); var modechangemenu = Menuform.Menu_yn(0, 7); switch (adddele) { case 1: HandcreateDochor createhor = new HandcreateDochor(areas); createhor.Show(law.Id); break; case 2: DelDoc deldoc = new DelDoc(areas); deldoc.DelDocVer(areas, law, 0, 12); break; } }
internal void Show() { Console.Clear(); HorLawdata Law = searcher.SearchLawhor(); var adddelemen = new Menu(new string[] { "dodaj doc", " usun doc ", "dodaj obszar", "usun obszar" }, 0, 3); int adddele = adddelemen.Show(); var modechangemenu = Menuform.Menu_yn(0, 8); switch (adddele) { case 0: HandcreateDochor hand = new HandcreateDochor(areas); hand.Show(Law.Id); break; case 1: DelDoc deldoc = new DelDoc(areas); deldoc.DelDocHor(areas, Law, 0, 10); break; case 2: addarea_horlaw(areas, Law); break; case 3: delarea_horlaw(areas, Law); break; } }
//Areas.Areas areas, Area_date current_area, int dlugoscMaxElement, int posnewmenu, string message internal void Show() { 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 = search.Search(0, 3, virarea); if (selarea == virarea) { return; } 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 { createdoc.Show(id); Console.WriteLine("dodac wiecej?"); yn = menuyn.Show(); } while (yn == 0); }
internal void Show() { Suportfunction function = new Suportfunction(); Searcher searcher = new Searcher(); Console.Clear(); Console.WriteLine("podaj nazwe usuwanego obszaru"); var virarea = new Area_date(0, "", "", 0, ""); Area_date deletedarea = searcher.Search(0, 1, virarea); if (deletedarea == virarea) { return; } Console.WriteLine(); function.Show_area_date(deletedarea, areas); var menys = Menuform.Menu_yn(0, 10); Console.WriteLine(); int yn = menys.Show(); switch (yn) { case 0: areas.DeleteArea(deletedarea); break; case 1: break; } }
internal static void DeleteArea(Areas.Areas areas, Area_date current_area, int dlugoscMaxElement, int posnewmenu, string message) { Console.Clear(); Console.WriteLine("podaj nazwe usuwanego obszaru"); var virarea = new Area_date(0, "", "", 0, ""); Area_date deletedarea = Program_function.Search(areas, virarea, 0, 1, message); if (deletedarea == virarea) { return; } Show_area_date(deletedarea, areas); var menys = Menuform.Menu_yn(0, 8); int yn = menys.Show(); switch (yn) { case 0: areas.DeleteArea(deletedarea); break; case 1: break; } }
internal void Show() { Console.Clear(); var virarea = new Area_date(0, "", "", 0, ""); Console.WriteLine("Ktory obszar chesz zmodyifikowac"); Area_date modifiedarea = seracher.Search(0, 1, virarea); if (modifiedarea == virarea) { return; } Menu Whatchange = new Menu(new string[] { "nazwe", "nazwe rozncujaca", "wyższy obszar", "zakoncz" }, 0, 8); var morechange = Menuform.Menu_yn(0, 13); int more = 1; do { suportfunction.Show_area_date(modifiedarea, areas); int what = Whatchange.Show(); switch (what) { case 0: string newname = Console.ReadLine(); areas.UpdateName(modifiedarea.Id, newname); break; case 1: string newdifname = Console.ReadLine(); areas.UpdateDifName(modifiedarea.Id, newdifname); break; case 2: string newhigherstring = Console.ReadLine(); int newhigher = 0; if (Int32.TryParse(newhigherstring, out newhigher)) { areas.Updatehigher(modifiedarea.Id, newhigher); } break; case 3: more = 1; break; } if (0 <= what && what <= 3) { Console.WriteLine("Czy chesz dokonac wiecej zmian?"); more = morechange.Show(); } } while (more == 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; } }
//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); }
internal void Show() { Console.Clear(); var virarea = new Area_date(0, "", "", 0, ""); Console.WriteLine("ktorego obszaru prawo chesz modyfikować"); var modarea = searcher.Search(0, 1, virarea); if (modarea == virarea) { return; } Console.Clear(); var chosen_law = areas.Find_local_law(modarea.Id); Console.Clear(); var Document = suportfunction.SelectDoc(chosen_law, 0, 5); Menu Whatchange = new Menu(new string[] { "tytul", "obszarprzypisany", "opis", "link", "tagi" }, 0, 10); var morechange = Menuform.Menu_yn(Whatchange.DlugoscMaxElement, 8); Console.Clear(); int more = 0; do { int what = Whatchange.Show(); switch (what) { case 0: string newname; do { Console.WriteLine("podaj nowy tytuł"); newname = Console.ReadLine(); } while (!suportfunction.nameverifcation(newname)); areas.UpdateTitleVer(Document.id, newname); break; case 1: var new_area = searcher.Search(0, 0, virarea); if (virarea != new_area) { areas.Udapteareaselectedver(Document.id, new_area.Id); } break; case 2: Console.WriteLine("podaj nowy opis"); string newbrief = Console.ReadLine(); areas.Udaptebriefver(Document.id, newbrief); break; case 3: string newlink; do { Console.WriteLine("podaj nowy opis"); newlink = Console.ReadLine(); } while (!suportfunction.Linkverfication(newlink)); areas.Updatelinkver(Document.id, newlink); break; case 4: string tags = suportfunction.Createtags(); areas.Updatetagver(Document.id, tags); break; } Console.WriteLine("Czy chesz dokonac wiecej zmian?"); more = morechange.Show(); } while (more == 0); }
internal static void Moddochor(Areas.Areas areas, Area_date current_area, int dlugoscMaxElement, int posnewmenu, string message) { Console.Clear(); var virarea = new Area_date(0, "", "", 0, ""); //var modarea = Program_function.Search(areas, virarea, dlugoscMaxElement, posnewmenu, message); //if (modarea == virarea) { return; } Console.Clear(); var chosen_law = Program_function.SearchLawhor(areas, current_area, 0, 1, message); Console.Clear(); var Document = Program_function.SelectDoc(chosen_law, 0, 1); Console.Clear(); Menu Whatchange = new Menu(new string[] { "tytul", "opis", "link", "tagi", "powrot" }, 0, 6); var morechange = Menuform.Menu_yn(Whatchange.DlugoscMaxElement, 6); int more = 0; do { int what = Whatchange.Show(); switch (what) { case 0: string newname; do { Console.WriteLine("podaj nowy tytuł"); newname = Console.ReadLine(); } while (!Editmainfunction.nameverifcation()); areas.UpdateTitlehor(Document.id, newname); break; case 1: Console.WriteLine("podaj nowy opis"); string newbrief = Console.ReadLine(); areas.Updatebriefhor(Document.id, newbrief); break; case 2: string newlink; do { Console.WriteLine("podaj nowy opis"); newlink = Console.ReadLine(); } while (!Editmainfunction.Linkverfication()); areas.Updatelinkhor(Document.id, newlink); break; case 3: string tags = Editmainfunction.Createtags(); areas.Updatetaghor(Document.id, tags); break; case 4: return; } Console.WriteLine("Czy chesz dokonac wiecej zmian?"); more = morechange.Show(); } while (more == 0); }