Exemple #1
0
 public void UpdateMembers(Entities.member btMem, string MemberID)
 {
     Entities.LibEntities dbCtx    = new Entities.LibEntities();
     Entities.member      bkUpdate = dbCtx.members.First(b => b.MemberID == MemberID);
     BaseRepository.CopyPropertyValues(btMem, bkUpdate);
     dbCtx.SaveChanges();
 }
Exemple #2
0
 public void InsertSubCat(Entities.SubCategory objSubCat)
 {
     //NewsoftEntities dbCtx = new NewsoftEntities();
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.SubCategories.Add(objSubCat);
     dbCtx.SaveChanges();
 }
Exemple #3
0
 public void DeleteSeries(int seriesID)
 {
     Entities.LibEntities dbCtx    = new Entities.LibEntities();
     Entities.Series      bkUpdate = dbCtx.Series.First(b => b.SeriesID == seriesID);
     dbCtx.Series.Remove(bkUpdate);
     dbCtx.SaveChanges();
 }
Exemple #4
0
 public void DeleteSubCat(int subcatID)
 {
     Entities.LibEntities dbCtx    = new Entities.LibEntities();
     Entities.SubCategory bkUpdate = dbCtx.SubCategories.First(b => b.Id == subcatID);
     dbCtx.SubCategories.Remove(bkUpdate);
     dbCtx.SaveChanges();
 }
Exemple #5
0
 public void DeleteAuthors(int authorID)
 {
     Entities.LibEntities dbCtx    = new Entities.LibEntities();
     Entities.author      bkUpdate = dbCtx.authors.First(b => b.AuthorID == authorID);
     dbCtx.authors.Remove(bkUpdate);
     dbCtx.SaveChanges();
 }
Exemple #6
0
 public void InsertAuthors(Entities.author objAuth)
 {
     //NewsoftEntities dbCtx = new NewsoftEntities();
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.authors.Add(objAuth);
     dbCtx.SaveChanges();
 }
Exemple #7
0
 public void InsertBooks(Entities.book bkObj)
 {
     //NewsoftEntities dbCtx = new NewsoftEntities();
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.books.Add(bkObj);
     dbCtx.SaveChanges();
 }
 public void UpdateBookReturn(Entities.booktran btTran, int TransID)
 {
     Entities.LibEntities dbCtx    = new Entities.LibEntities();
     Entities.booktran    bkUpdate = dbCtx.booktrans.First(b => b.TRANSID == TransID);
     bkUpdate.TRANSID    = btTran.TRANSID;
     bkUpdate.ReturnDate = btTran.ReturnDate;
     dbCtx.SaveChanges();
 }
Exemple #9
0
 public void UpdateWishList(Entities.WishList wishObj, int WishID)
 {
     Entities.LibEntities dbCtx    = new Entities.LibEntities();
     Entities.WishList    bkUpdate = dbCtx.WishLists.First(b => b.WishID == WishID);
     BaseRepository.CopyPropertyValues(wishObj, bkUpdate);
     bkUpdate.WishID = WishID;
     dbCtx.SaveChanges();
 }
Exemple #10
0
        public void DeleteBooks(string bookID)
        {
            Entities.LibEntities dbCtx    = new Entities.LibEntities();
            Entities.book        bkUpdate = dbCtx.books.First(b => b.BookID == bookID);
            dbCtx.books.Remove(bkUpdate);

            dbCtx.SaveChanges();
        }
Exemple #11
0
        public void UpdateBooks(Entities.book bkObj, string bookID)
        {
            Entities.LibEntities dbCtx    = new Entities.LibEntities();
            Entities.book        bkUpdate = dbCtx.books.First(b => b.BookID == bookID);
            BaseRepository.CopyPropertyValues(bkObj, bkUpdate);

            dbCtx.SaveChanges();
        }
Exemple #12
0
 public void UpdateBookTrans(Entities.booktran btTran, int TransID)
 {
     Entities.LibEntities dbCtx    = new Entities.LibEntities();
     Entities.booktran    bkUpdate = dbCtx.booktrans.First(b => b.TRANSID == TransID);
     if (String.IsNullOrEmpty(btTran.MemberID))
     {
         bkUpdate.TRANSID    = btTran.TRANSID;
         bkUpdate.ReturnDate = btTran.ReturnDate;
         //bt.LendRate = Int32.Parse(ds.Rows[0]["LendRate"].ToString());
         bkUpdate.Fine   = btTran.Fine;
         bkUpdate.LibBal = btTran.LibBal;
         bkUpdate.MemBal = btTran.MemBal;
     }
     else
     {
         BaseRepository.CopyPropertyValues(btTran, bkUpdate);
     }
     dbCtx.SaveChanges();
 }
Exemple #13
0
 public void InsertBookTrans(Entities.booktran tranObj)
 {
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.booktrans.Add(tranObj);
     dbCtx.SaveChanges();
 }
Exemple #14
0
 public void InsertWishList(Entities.WishList wishObj)
 {
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.WishLists.Add(wishObj);
     dbCtx.SaveChanges();
 }
Exemple #15
0
 public void InsertMembers(Entities.member tranObj)
 {
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.members.Add(tranObj);
     dbCtx.SaveChanges();
 }
Exemple #16
0
 public void InsertSeries(Entities.Series objSeries)
 {
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.Series.Add(objSeries);
     dbCtx.SaveChanges();
 }