protected void Tab_Host_TabClick(object sender, RadTabStripEventArgs e) { if (Session["DormitoryHostid"] != null) { switch (Convert.ToInt32(Tab_Host.SelectedIndex)) { case 1: Grid_HostRoom.Rebind(); break; case 2: Grid_HostBed.Rebind(); break; case 3: Grid_School.Rebind(); break; case 4: Grid_DormitoryPlacement.Rebind(); break; } SetSessionNull(); ClearForm(); } }
protected void btn_registration_Click(object sender, EventArgs e) { Session["DormitoryHostid"] = null; Grid_HostRoom.Rebind(); Grid_HostBed.Rebind(); Grid_School.Rebind(); //Clear Host Basic Information ClearHostBasicForm(); //Clear Host Family Member Information //Clear Host Room ClearHostRoomForm(); //Clear Host Bed ClearHostBedForm(); //Clear Host Preferred School //load dropdown lists Dropdown_Province(); Dropdown_ShcoolList(); Dropdown_RoomLocation(); SetSessionNull(); Tab_Host.SelectedIndex = 0; EnableTab(false, false); PageView_Basic.Selected = true; //VisiableBtn(false); }
protected void Grid_HostList_SelectedIndexChanged(object sender, EventArgs e) { if (Grid_HostList.SelectedValue.ToString() != null) { Grid_HostRoom.Rebind(); Grid_HostBed.Visible = false; } }
protected void ClearHostRoomForm() { Session["HostRoomId"] = null; txtRoomName.Text = ""; ddlRoomLocation.SelectedValue = "1"; ddlRoomType.SelectedValue = "1"; Dropdown_RoomLocation(); ddlRoom.SelectedIndex = 0; Grid_HostRoom.Rebind(); Grid_HostList.Rebind(); }
protected void FillFormBySelectedHostid(int hostid) { if (Session["DormitoryHostid"] != null) { var Dormitory = (new CDormitoryHost()).Get(hostid); //DormitoryHost Dormitory = new DormitoryHost(); //Dormitory Information txtDormitoryName.Text = Dormitory.DormitoryHostName; txtHomeAddress.Text = Dormitory.Address; txtCity.Text = Dormitory.City; txtPostalCode.Text = Dormitory.PostalCode; txtPhone.Text = Dormitory.PhoneNumber; txtAdditionalPhone.Text = Dormitory.AdditionalPhone; txtCoordianatorName.Text = Dormitory.CoordinatorName; txtCoordianatorPhone.Text = Dormitory.CoordinatorPhone; ddlSchoolName.SelectedValue = Dormitory.SchoolName; DatePickerLeaseStartDate.SelectedDate = Dormitory.LeaseStartDate; DatePickerLeaseEndDate.SelectedDate = Dormitory.LeaseEndDate; ddlHomeType.SelectedIndex = Convert.ToInt32(Dormitory.HomeType); ddlProvice.SelectedValue = Dormitory.Province; //School var cHostSchool = new CDormitoryHostPreferredSchool(); DormitoryHostPrefferedSchool HostSchool = cHostSchool.GetHostTopSchool(hostid); ddlSchoolName.SelectedValue = HostSchool.SiteLocationId.ToString(); // Host status LoadDropListHostStatus(); ddlHostStatus.SelectedValue = Convert.ToInt32(Dormitory.HostStatus).ToString();// HomestayHostStatus(Convert.ToInt32(Dormitory.HostStatus.ToString())); if (Dormitory.HostStatus == 1 || Dormitory.HostStatus == 0) { DatePickStatusDate.SelectedDate = Dormitory.ActiveDate; } else { DatePickStatusDate.SelectedDate = Dormitory.InactiveDate; } if (Dormitory.HostStatus == 1) { DatePickActiveDate.SelectedDate = Dormitory.ActiveDate; } else if (Dormitory.HostStatus == 2) { DatePickInactiveDate.SelectedDate = Dormitory.InactiveDate; } else if (Dormitory.HostStatus == 0) { DatePickActiveDate.SelectedDate = null; DatePickInactiveDate.SelectedDate = null; } Grid_HostRoom.Rebind(); Grid_HostBed.Rebind(); Grid_DormitoryPlacement.Rebind(); } else { ShowMessage("Session time out."); } }