Exemplo n.º 1
0
    private void Show()
    {
        DataRow row = _grade.FillPlaceHolderControlsById(Request["id"]);

        if (row == null) return;

        DGrade dGrade = new DGrade();
        DSchool dSchool = new DSchool();

        //取得學校名稱
        String schoolAllName = dSchool.GetNameBySchoolId(row["school_id"].ToString());
        schoolName.Text = schoolAllName;

        //取得班級名稱
        GradeName.Text = dGrade.GetShortGradeNameById((int) row["id"]);

        //學校班級名稱
        AllName.Text = dGrade.GetFullGradeNameById((int) row["id"]);

        //取得班級人數
        String gradeStudentCount = dGrade.GetGradeCountById((int) row["id"]);
        GradeStudentCount.Text = gradeStudentCount;
        description.Text = My.WebForm.TXT2HTML(description.Text);

        enable.Text = enable.Text.ToScodeEnableName();
    }
Exemplo n.º 2
0
    private void Show()
    {
        Person person = new Person();
        DStudent dStudent =new DStudent(person.people_id);
        string GradeId = dStudent.GradeID;
        DGrade dGrade = new DGrade();

        if(person.Role == Person.LoginRole.Teacher)
        {
            GradeId = Request["grade_id"];
        }
        lblGradeName.Text = dGrade.GetShortGradeNameById(Convert.ToInt16(GradeId));
        DataTable dt = dl.GetStudentList(person.School_id, GradeId, "", "", "-1", "-1", "-1", "", "order by SeatNumber asc", 70, 1);
        Repeater1.DataSource = dt;
        Repeater1.DataBind();
    }