private void RegistoRevisao() { //TODO: Implement Console.WriteLine("RegistoRevisao()"); Console.WriteLine("(5)Insira UserID"); int i1 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("(1)Insira ArticleID"); int i2 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("(1)Insira ConferenceID"); int i3 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("(95)Insira nota"); int i4 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("(good)Insira texto"); string s = Console.ReadLine(); using (SI2_T1Entities db = new SI2_T1Entities()) { Console.WriteLine("Revisor_Artigo Atual"); Revisor_Artigo a = db.Revisor_Artigo.Where((x) => x.userID == i1 && x.ID == i2 && x.conferenceID == i3).FirstOrDefault(); Console.WriteLine("Revisor_artigo: UserID-{0} | articleID-{1} | conferenceID-{2} | nota-{3} | texto-{4}", a.userID, a.ID, a.conferenceID, a.nota, a.texto); db.RegistoRevisao(i1, i2, i3, i4, s); } using (SI2_T1Entities db = new SI2_T1Entities()) { Console.WriteLine("Revisor_Artigo Atualizado"); Revisor_Artigo a = db.Revisor_Artigo.Where((x) => x.userID == i1 && x.ID == i2 && x.conferenceID == i3).FirstOrDefault(); Console.WriteLine("Revisor_artigo: UserID-{0} | articleID-{1} | conferenceID-{2} | nota-{3} | texto-{4}", a.userID, a.ID, a.conferenceID, a.nota, a.texto); } }
private void addReviewerToArticle() { //TODO: Implement Console.WriteLine("addReviewerToArticle()"); Console.WriteLine("(1)Insira ConferenceID"); int i1 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("(1)Insira ArticleID"); int i2 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("(6)Insira ReviewerID"); int i3 = Convert.ToInt32(Console.ReadLine()); using (SI2_T1Entities db = new SI2_T1Entities()) { Console.WriteLine("Revisor_Artigo na DataBase"); var a = db.Revisor_Artigo.ToList(); foreach (var res in a) { Console.WriteLine("Revisor_artigo: UserID-{0} | articleID-{1} | conferenceID-{2}", res.userID, res.ID, res.conferenceID); } db.addReviewerToArticle(i1, i2, i3); } using (SI2_T1Entities db = new SI2_T1Entities()) { Console.WriteLine("Novo Revisor_Artigo"); Revisor_Artigo a = db.Revisor_Artigo.Where((x) => x.userID == i3 && x.ID == i2 && x.conferenceID == i1).FirstOrDefault(); Console.WriteLine("Revisor_artigo: UserID-{0} | articleID-{1} | conferenceID-{2}", a.userID, a.ID, a.conferenceID); } }