protected void RoomInsert(int BookingDetailsId) { RoomDetailstbl rd1 = new RoomDetailstbl() { RoomDetailsId = 0, BookingDetailsId = 0, Adults = 2, Kids = 2, Status = 1, RoomType = "1stsingle", Price = "1000", }; List <GuestDetailstbl> GDtbl = new List <GuestDetailstbl>(); gd1.BookingDetailsId = BookingDetailsId; gd2.BookingDetailsId = BookingDetailsId; gd3.BookingDetailsId = BookingDetailsId; gd4.BookingDetailsId = BookingDetailsId; GDtbl.Add(gd1); GDtbl.Add(gd2); GDtbl.Add(gd3); GDtbl.Add(gd4); rd1.GuestDetails = GDtbl; //rd2.GuestDetails = GDtbl; //rd3.GuestDetails = GDtbl; List <RoomDetailstbl> objRDT = new List <RoomDetailstbl>(); RoomDetailstbl objrd = new RoomDetailstbl(); objRDT.Add(rd1); //objRDT.Add(rd2); //objRDT.Add(rd3); for (int i = 0; i < objRDT.Count(); i++) { List <RoomDetailstbl> lrt = new List <RoomDetailstbl>(); objrd.BookingDetailsId = objRDT[i].BookingDetailsId; objrd.RoomType = objRDT[i].RoomType; objrd.Adults = objRDT[i].Adults; objrd.Kids = objRDT[i].Kids; objrd.Status = objRDT[i].Status; objrd.Price = objRDT[i].Price; lrt = objRoomBL.InsertRoom(objrd).ToList(); //lrt = objRoomBL.InsertRoom(objrd).ToList(); lrt = objRoomBL.GetMaxRoom(objrd).ToList(); GuestInsert(lrt.First().RoomDetailsId); } }
public IEnumerable <RoomDetailstbl> GetMaxRoom(RoomDetailstbl rd) { return(objRoomDA.RoomDetails(9, rd)); }
public IEnumerable <RoomDetailstbl> GetRoomByStatus(RoomDetailstbl rd) { return(objRoomDA.RoomDetails(8, rd)); }
public IEnumerable <RoomDetailstbl> UpdateRoomIsActive(RoomDetailstbl rd) { return(objRoomDA.RoomDetails(6, rd)); }
public IEnumerable <RoomDetailstbl> UpdateStatus(RoomDetailstbl rd) { return(objRoomDA.RoomDetails(7, rd)); }
public IEnumerable <RoomDetailstbl> DeleteRoom(RoomDetailstbl rd) { return(objRoomDA.RoomDetails(5, rd)); }
public IEnumerable <RoomDetailstbl> UpdateRoom(RoomDetailstbl rd) { return(objRoomDA.RoomDetails(4, rd)); }
public IEnumerable <RoomDetailstbl> InsertRoom(RoomDetailstbl rd) { return(objRoomDA.RoomDetails(3, rd)); }
public IEnumerable <RoomDetailstbl> GetRoombyId(RoomDetailstbl rd) { return(objRoomDA.RoomDetails(2, rd)); }
public IEnumerable <RoomDetailstbl> GetAllRoom(RoomDetailstbl rd) { return(objRoomDA.RoomDetails(1, rd)); }