Пример #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();
 }
Пример #2
0
 public void InsertSubCat(Entities.SubCategory objSubCat)
 {
     //NewsoftEntities dbCtx = new NewsoftEntities();
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.SubCategories.Add(objSubCat);
     dbCtx.SaveChanges();
 }
Пример #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();
 }
Пример #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();
 }
Пример #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();
 }
Пример #6
0
 public void InsertAuthors(Entities.author objAuth)
 {
     //NewsoftEntities dbCtx = new NewsoftEntities();
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.authors.Add(objAuth);
     dbCtx.SaveChanges();
 }
Пример #7
0
 public void InsertBooks(Entities.book bkObj)
 {
     //NewsoftEntities dbCtx = new NewsoftEntities();
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.books.Add(bkObj);
     dbCtx.SaveChanges();
 }
Пример #8
0
 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();
 }
Пример #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();
 }
Пример #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();
        }
Пример #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();
        }
Пример #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();
 }
Пример #13
0
 public void InsertBookTrans(Entities.booktran tranObj)
 {
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.booktrans.Add(tranObj);
     dbCtx.SaveChanges();
 }
Пример #14
0
 public void InsertWishList(Entities.WishList wishObj)
 {
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.WishLists.Add(wishObj);
     dbCtx.SaveChanges();
 }
Пример #15
0
 public void InsertMembers(Entities.member tranObj)
 {
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.members.Add(tranObj);
     dbCtx.SaveChanges();
 }
Пример #16
0
 public void InsertSeries(Entities.Series objSeries)
 {
     Entities.LibEntities dbCtx = new Entities.LibEntities();
     dbCtx.Series.Add(objSeries);
     dbCtx.SaveChanges();
 }