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(); }
public void InsertSubCat(Entities.SubCategory objSubCat) { //NewsoftEntities dbCtx = new NewsoftEntities(); Entities.LibEntities dbCtx = new Entities.LibEntities(); dbCtx.SubCategories.Add(objSubCat); dbCtx.SaveChanges(); }
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(); }
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(); }
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(); }
public void InsertAuthors(Entities.author objAuth) { //NewsoftEntities dbCtx = new NewsoftEntities(); Entities.LibEntities dbCtx = new Entities.LibEntities(); dbCtx.authors.Add(objAuth); dbCtx.SaveChanges(); }
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(); }
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(); }
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(); }
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(); }
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(); }
public void InsertBookTrans(Entities.booktran tranObj) { Entities.LibEntities dbCtx = new Entities.LibEntities(); dbCtx.booktrans.Add(tranObj); dbCtx.SaveChanges(); }
public void InsertWishList(Entities.WishList wishObj) { Entities.LibEntities dbCtx = new Entities.LibEntities(); dbCtx.WishLists.Add(wishObj); dbCtx.SaveChanges(); }
public void InsertMembers(Entities.member tranObj) { Entities.LibEntities dbCtx = new Entities.LibEntities(); dbCtx.members.Add(tranObj); dbCtx.SaveChanges(); }
public void InsertSeries(Entities.Series objSeries) { Entities.LibEntities dbCtx = new Entities.LibEntities(); dbCtx.Series.Add(objSeries); dbCtx.SaveChanges(); }