示例#1
0
    protected void Tab_Host_TabClick(object sender, RadTabStripEventArgs e)
    {
        if (Grid_StudentList.SelectedValue != null)
        {
            switch (Convert.ToInt32(Tab_Host.SelectedIndex))
            {
            case 0:     // Request Detail
                PageViewVisible(true, false, false, false);
                break;

            case 1:     //Request History
                PageViewVisible(false, true, false, false);
                GridHistory.Rebind();
                break;

            case 2:     // Placement by School
                PageViewVisible(false, false, true, false);
                Grid_DormitoryPlacement.Rebind();
                break;

            case 3:    // Placement by Agency
                PageViewVisible(false, false, false, true);
                //Grid_PlacementAgency.Rebind();
                //Download.Visible = false;

                break;
            }
        }
    }
示例#2
0
        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();
            }
        }
示例#3
0
    protected void Grid_StudentList_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (Grid_StudentList.SelectedValue != null)
        {
            int OriginalId = Convert.ToInt32(Grid_StudentList.SelectedValue);
            RadToolBar3.Items[2].Enabled = true; //Placement
            RadToolBar3.Items[4].Enabled = true; //Shcedule Change

            RadToolBar3.Items[6].Enabled = true; //Cancel
            RadToolBar3.Items[8].Enabled = true; // Invoice and Payment

            //Show Placement Request Detail
            ShowPlacementRequestDetail(Convert.ToInt32(Grid_StudentList.SelectedValue));
            PageViewVisible(true, true, true, true);
            GridHistory.Rebind();
            Grid_DormitoryPlacement.Rebind();
        }
    }
示例#4
0
        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.");
            }
        }