internal void DelDocVer(Areas.Areas areas, VerLawdata law, int posx, int posy) { Console.Clear(); Document doc = suportfunction.SelectDoc(law, posx, posy); areas.DeleteLawver(doc.id); }
internal void FindLocalLaw()//main_menu.DlugoscMaxElement menuposy + task) { VerLawdata local_law = areas.Find_local_law(current_area.Id); List <Document> DocWithTag = suportfunction.TagSearch(local_law, main_menu.DlugoscMaxElement, main_menu.Posy - 2); Menu selectmenu = Menu_form_area.DocList_to_menu(DocWithTag, main_menu.DlugoscMaxElement, main_menu.Posy); selectmenu.Shower = new Showernoclear(); Document selected = suportfunction.SelectDoc(selectmenu, local_law); //return selected.title+" "+selected.reference; Console.Clear(); if (selected.id != 0) { //Console.SetCursorPosition(DlugoscMaxElement+selectmenu.DlugoscMaxElement,posnewmenu); Console.Write(selected.title + " " + selected.reference); Console.ReadKey(); Console.Clear(); } }
internal void Show() { Console.Clear(); var virarea = new Area_date(0, "", "", 0, ""); Console.WriteLine("Podaj nazwe usuwanego prawa"); var areasel = searcher.Search(0, 0, virarea); Console.Clear(); if (areasel == virarea) { return; } var locallaw = areas.Find_local_law(areasel.Id); var doc = suportfunction.SelectDoc(locallaw, 0, 0); areas.DeleteLawver(doc.id); }
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 void Show() { Console.Clear(); var virarea = new Area_date(0, "", "", 0, ""); //var modarea = Program_function.Search(areas, virarea, dlugoscMaxElement, posnewmenu, message); //if (modarea == virarea) { return; } var chosen_law = searcher.SearchLawhor(); var Document = suportfunction.SelectDoc(chosen_law, 0, 1); Document emptydoc = new Document(); if (Document.id == emptydoc.id) { return; } 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 (!suportfunction.nameverifcation(newname)); 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 (!suportfunction.Linkverfication(newlink)); areas.Updatelinkhor(Document.id, newlink); break; case 3: string tags = suportfunction.Createtags(); areas.Updatetaghor(Document.id, tags); break; case 4: return; } Console.WriteLine("Czy chesz dokonac wiecej zmian?"); more = morechange.Show(); } while (more == 0); }