Exemplo n.º 1
0
 public void DeleteData(int id)
 {
     try
     {
         BookIssueRet data = new BookIssueRet();
         data = context.BookIssueRets.
                Where(a => a.BookIssueReturnID == id).FirstOrDefault();
         context.BookIssueRets.Remove(data);
         context.SaveChanges();
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 2
0
        public void SaveData(Models.BookIssueRetModel bookIssueRetModel)
        {
            var data = new BookIssueRet()
            {
                BookIssueReturnID = bookIssueRetModel.BookIssueReturnID,
                MemberID          = bookIssueRetModel.MemberID,
                AssesionID        = bookIssueRetModel.AssesionID,
                IssueDate         = bookIssueRetModel.IssueDate,
                DueDate           = bookIssueRetModel.DueDate,
                ReturnDate        = bookIssueRetModel.ReturnDate,
                FineAmount        = bookIssueRetModel.FineAmount,
                Status            = bookIssueRetModel.Status,
                StaffMemberID     = bookIssueRetModel.StaffMemberID,
                Remarks           = bookIssueRetModel.Remarks
            };

            context.BookIssueRets.Add(data);
            context.SaveChanges();
        }
Exemplo n.º 3
0
 public void UpdateData(Models.BookIssueRetModel model)
 {
     try
     {
         BookIssueRet data = new BookIssueRet();
         data = context.BookIssueRets.
                Where(a => a.BookIssueReturnID == model.BookIssueReturnID).FirstOrDefault();
         data.MemberID      = model.MemberID;
         data.AssesionID    = model.AssesionID;
         data.IssueDate     = model.IssueDate;
         data.DueDate       = model.DueDate;
         data.ReturnDate    = model.ReturnDate;
         data.FineAmount    = model.FineAmount;
         data.Status        = model.Status;
         data.StaffMemberID = model.StaffMemberID;
         data.Remarks       = model.Remarks;
         context.SaveChanges();
     }
     catch (Exception)
     {
         throw;
     }
 }