Exemplo n.º 1
0
        public void paid(record rcd)
        {
            hrs.records.Add(rcd);

            hrs.SaveChanges();
            customer custm = hrs.customers.Where(x => (x.cnic == rcd.CNIC_)).FirstOrDefault();
            payment  pay   = hrs.payments.Where(x => (x.cust_id == custm.cust_id)).FirstOrDefault();
            booking  bk    = hrs.bookings.Where(x => (x.Booking_id == pay.Booking_id)).FirstOrDefault();

            bk.room.status = "unreserved";
            hrs.SaveChanges();
            hrs.bookings.Remove(bk);
            hrs.payments.Remove(pay);
            hrs.customers.Remove(custm);
            hrs.SaveChanges();
        }
Exemplo n.º 2
0
 public List <record> getrecords(record rcrd)
 {
     return(hrsda.getrecords(rcrd));
 }
Exemplo n.º 3
0
 public void paid(record rcd)
 {
     hrsda.paid(rcd);
 }
Exemplo n.º 4
0
 public List <record> getrecords(record rcrd)
 {
     return(hrs.records.Where(x => (x.fname == rcrd.fname || x.CNIC_ == rcrd.CNIC_ || x.leaving_date == rcrd.leaving_date || x.Booking_date == rcrd.Booking_date)).ToList());
 }