protected void Grid_HostList_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { if (HomestayStudentId > 0) { HomestayStudentBasic Student = StudentRequest(HomestayStudentId); DateTime StartDate = Convert.ToDateTime(Student.StartDate); DateTime EndDate = Convert.ToDateTime(Student.EndDate); var cHomestayBasic = new CHomestayHostBasic(); Grid_HostList.DataSource = cHomestayBasic.HomestayHostListWithVacantBed(CurrentSiteLocationId, StartDate, EndDate); //cHomestayBasic.GetHomestayHostActiveList(CurrentSiteLocationId, StartDate,EndDate); } }
protected void Grid_HostBed_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { if (Grid_HostList.SelectedValue != null && Grid_HostRoom.SelectedValue != null) { var cHomestayHosBed = new CHomestayHostBasic(); int hostid = Convert.ToInt32(Grid_HostList.SelectedValue.ToString()); int roomid = Convert.ToInt32(Grid_HostRoom.SelectedValue.ToString()); HomestayStudentBasic Student = StudentRequest(HomestayStudentId); Grid_HostBed.DataSource = cHomestayHosBed.HomestayBedListWithVacantBed(hostid, roomid, Convert.ToDateTime(Student.StartDate), Convert.ToDateTime(Student.EndDate)); // cHomestayHostBed.HomestayHostBedByRoom(hostid, roomid); Grid_HostBed.Visible = true; } }
protected void Grid_HostRoom_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { if (Grid_HostList.SelectedValue != null) { int hostId = 0; hostId = Convert.ToInt32(Grid_HostList.SelectedValue.ToString()); List <HomestayHostRoom> HostRoom = new List <HomestayHostRoom>(); var cHomestayHostRoom = new CHomestayHostBasic(); HomestayStudentBasic Student = StudentRequest(HomestayStudentId); HostRoom = cHomestayHostRoom.HomestayRoomListWithVacantBed(hostId, Convert.ToDateTime(Student.StartDate), Convert.ToDateTime(Student.EndDate)); //cHomestayHostRoom.GetHostRoomList(hostId); Grid_HostRoom.DataSource = HostRoom; } }