// طريقة اضافة ورقة public int addpaper(papershare P) { using (PaperindexDataClassDataContext db = new PaperindexDataClassDataContext()) { Paper papr = new Paper { papTitle = P.PTitle, @abstract = P.PAbstract, jouTitle = P.JTitle, Keywords = P.PKeywords, volumenumber = P.PVnumber, issunumber = P.PInumber, Yearofpub = P.PYear, Authers = P.Pauther, FirstPagePaper = P.PPagesN, LastpagePaper = P.PPagesF, NumoFAuther = P.PNofauthers }; db.Papers.InsertOnSubmit(papr); db.SubmitChanges(); Console.WriteLine(" ADD PAPER IS EXECUTE ......" + DateTime.Now); return(papr.paperId); } }
// طريقة حذف ورقة public void deletepaper(int PapId) { using (PaperindexDataClassDataContext db = new PaperindexDataClassDataContext()) { Paper papr = db.Papers.SingleOrDefault(x => x.paperId == PapId); db.Papers.DeleteOnSubmit(papr); db.SubmitChanges(); Console.WriteLine("Delete PAPER IS EXECUTE ......" + DateTime.Now); } }
public void delete(int id) { using (PaperindexDataClassDataContext db = new PaperindexDataClassDataContext()) { journal jou = db.journals.SingleOrDefault(x => x.jouID == id); db.journals.DeleteOnSubmit(jou); db.SubmitChanges(); Console.WriteLine("Delete Journal IS EXECUTE ......" + DateTime.Now); } }
public void modifaypaper(Journalshared current) { using (PaperindexDataClassDataContext db = new PaperindexDataClassDataContext()) { journal jou = db.journals.SingleOrDefault(x => x.jouID == current.JId); jou.joucity = current.Jcity; jou.journalTitle = current.Jtitle; jou.jousubject = current.Jsub; jou.jouclass = current.Jclass; db.SubmitChanges(); Console.WriteLine("Modifay Journal IS EXECUTE ......" + DateTime.Now); } }
public int save(Journalshared current) { using (PaperindexDataClassDataContext db = new PaperindexDataClassDataContext()) { journal jou = new journal { journalTitle = current.Jtitle, jouclass = current.Jclass, joucity = current.Jcity, jousubject = current.Jsub }; db.journals.InsertOnSubmit(jou); db.SubmitChanges(); Console.WriteLine(" ADD Journal IS EXECUTE ......" + DateTime.Now); return(jou.jouID); } }
// طريقة تعديل ورقة public void modifaypaper(papershare modfipaper) { using (PaperindexDataClassDataContext db = new PaperindexDataClassDataContext()) { Paper papr = db.Papers.SingleOrDefault(x => x.paperId == modfipaper.PId); papr.@abstract = modfipaper.PAbstract; papr.Authers = modfipaper.Pauther; papr.FirstPagePaper = modfipaper.PPagesN; papr.LastpagePaper = modfipaper.PPagesF; papr.issunumber = modfipaper.PInumber; papr.jouTitle = modfipaper.JTitle; papr.Keywords = modfipaper.PKeywords; papr.NumoFAuther = modfipaper.PNofauthers; papr.papTitle = modfipaper.PTitle; papr.volumenumber = modfipaper.PVnumber; papr.Yearofpub = modfipaper.PYear; db.SubmitChanges(); Console.WriteLine("Modifay PAPER IS EXECUTE ......" + DateTime.Now); } }