protected void GetGuestName() { AllBookingsBL objGuestDetailsBL = new AllBookingsBL(); List <Booking> lstBook = new List <Booking>(); List <GuestDetailstbl> lstGuestDetails = new List <GuestDetailstbl>(); AllBookingstbl abt = new AllBookingstbl(); Gueststbl gt = new Gueststbl(); Hotelstbl ht = new Hotelstbl(); Roomstbl rt = new Roomstbl(); Supplierstbl st = new Supplierstbl(); Agentstbl at = new Agentstbl(); GuestDetailstbl Cust = new GuestDetailstbl(); Cust.Status = 1; lstBook = objGuestDetailsBL.GetAllBookings(abt, gt, ht, rt, st, at).ToList(); foreach (var cnt in lstBook) { ListItem li = new ListItem(); li.Text = cnt.Gueststc.FirstName + ' ' + cnt.Gueststc.LastName; li.Value = cnt.Gueststc.GuestId.ToString(); } }
protected void GetHotelName() { AllBookingsBL objHotelBL = new AllBookingsBL(); List <Booking> lstBook = new List <Booking>(); List <HotelDetailstbl> lstHotel = new List <HotelDetailstbl>(); HotelDetailstbl Htl = new HotelDetailstbl(); AllBookingstbl abt = new AllBookingstbl(); Gueststbl gt = new Gueststbl(); Hotelstbl ht = new Hotelstbl(); Roomstbl rt = new Roomstbl(); Supplierstbl st = new Supplierstbl(); Agentstbl at = new Agentstbl(); GuestDetailstbl Cust = new GuestDetailstbl(); Htl.IsActive = 1; lstBook = objHotelBL.GetAllBookings(abt, gt, ht, rt, st, at).ToList(); foreach (var cnt in lstHotel) { ListItem li = new ListItem(); li.Text = cnt.HotelName; li.Value = cnt.HotelDetailsId.ToString(); } }
public IEnumerable <GuestDetailstbl> GetHotelByStatus(GuestDetailstbl gd) { return(objGuestDA.GuestDetails(8, gd)); }
public IEnumerable <GuestDetailstbl> UpdateGuestStatus(GuestDetailstbl gd) { return(objGuestDA.GuestDetails(7, gd)); }
public IEnumerable <GuestDetailstbl> UpdateGuestIsActive(GuestDetailstbl gd) { return(objGuestDA.GuestDetails(6, gd)); }
public IEnumerable <GuestDetailstbl> DeleteGuest(GuestDetailstbl gd) { return(objGuestDA.GuestDetails(5, gd)); }
public IEnumerable <GuestDetailstbl> InsertGuest(GuestDetailstbl hd) { return(objGuestDA.GuestDetails(3, hd)); }
public IEnumerable <GuestDetailstbl> GetGuestbyId(GuestDetailstbl gd) { return(objGuestDA.GuestDetails(2, gd)); }
public IEnumerable <GuestDetailstbl> GetAllGuest(GuestDetailstbl gd) { return(objGuestDA.GuestDetails(1, gd)); }
protected void GuestInsert(int RoomDetailsId) { GuestDetailstbl gd1 = new GuestDetailstbl() { GuestId = 0, BookingDetailsId = 0, RoomDetailsId = 0, FirstName = txtAdultFN1.Text, LastName = txtAdultLN1.Text, Salutation = ddlAdultSalutation1.SelectedValue, Type = "Adult", Status = 1, CreatedBy = 2, CreatedDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), }; GuestDetailstbl gd2 = new GuestDetailstbl() { GuestId = 0, BookingDetailsId = 0, RoomDetailsId = 1, FirstName = txtAdultFN2.Text, LastName = txtAdultLN2.Text, Salutation = ddlAdultSalutation2.SelectedValue, Type = "Adult", Status = 1, CreatedBy = 36, CreatedDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), }; GuestDetailstbl gd3 = new GuestDetailstbl() { GuestId = 0, BookingDetailsId = 0, RoomDetailsId = 2, FirstName = txtChildFN1.Text, LastName = txtChildLN1.Text, Age = Convert.ToInt32(ddlChildAge1.SelectedValue), Type = "Child", Status = 1, CreatedBy = 26, CreatedDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), }; GuestDetailstbl gd4 = new GuestDetailstbl() { GuestId = 0, BookingDetailsId = 0, RoomDetailsId = 2, FirstName = txtChildFN2.Text, LastName = txtChildLN2.Text, Age = Convert.ToInt32(ddlChildAge2.SelectedValue), Type = "Child", Status = 1, CreatedBy = 26, CreatedDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), }; GuestDetailstbl gd = new GuestDetailstbl(); List <GuestDetailstbl> objgd = new List <GuestDetailstbl>(); gd1.RoomDetailsId = RoomDetailsId; gd2.RoomDetailsId = RoomDetailsId; gd3.RoomDetailsId = RoomDetailsId; gd4.RoomDetailsId = RoomDetailsId; objgd.Add(gd1); objgd.Add(gd2); objgd.Add(gd3); objgd.Add(gd4); for (int i = 0; i < objgd.Count(); i++) { GuestDetailstbl gdt = new GuestDetailstbl(); gdt.GuestId = objgd[i].GuestId; gdt.BookingDetailsId = objgd[i].BookingDetailsId; gdt.RoomDetailsId = objgd[i].RoomDetailsId; gdt.FirstName = objgd[i].FirstName; gdt.LastName = objgd[i].LastName; gdt.Salutation = objgd[i].Salutation; gdt.Type = objgd[i].Type; gdt.Status = objgd[i].Status; gdt.CreatedBy = objgd[i].CreatedBy; gdt.CreatedDate = objgd[i].CreatedDate; gdt.Age = objgd[i].Age; GDtbl = objGBL.InsertGuest(gdt).ToList(); } }