Esempio n. 1
0
    void loadData()
    {
        DataTable db = objSchool.GetDataByID(Convert.ToInt32(Request.QueryString["SchoolID"].ToString()));

        if (db.Rows.Count > 0)
        {
            txtTitle.Text           = db.Rows[0]["School_Name"].ToString();
            imgDescription.ImageUrl = "~/images/schools/" + db.Rows[0]["School_Image"].ToString();
            int _status = Convert.ToInt32(db.Rows[0]["Status"].ToString());
            if (_status == 1)
            {
                cbStatus.Checked = true;
            }
            else
            {
                cbStatus.Checked = false;
            }
            txtLinkFacebook.Text = db.Rows[0]["Link_Facebook"].ToString();
        }
    }
    void loadData()
    {
        SchoolID = Request.QueryString["SchoolID"].ToString();
        //DataTable dbGetDataBySchoolID = objForum.GetDataBySchoolID(Convert.ToInt32(SchoolID));
        //if (dbGetDataBySchoolID.Rows.Count > 0)
        //{
        DataTable dbSchoolName = objSchool.GetDataByID(Convert.ToInt32(SchoolID));

        if (dbSchoolName.Rows.Count > 0)
        {
            string SchoolName = dbSchoolName.Rows[0]["School_Name"].ToString();
            ltContent.Text = SchoolName;
            Page.Title     = SchoolName;
        }
        //}
    }
Esempio n. 3
0
    void loadData()
    {
        DataTable dbSchool = objSchool.GetDataByID(Convert.ToInt32(Request.QueryString["ID"].ToString()));

        if (dbSchool.Rows.Count > 0)
        {
            string _schoolName = dbSchool.Rows[0]["School_Name"].ToString();
            ltSchoolName.Text = _schoolName;
            string _linkFacebook = dbSchool.Rows[0]["Link_Facebook"].ToString();
            if (_linkFacebook == "")
            {
                ltFacebookSchool.Text = "Chưa cập nhật.";
            }
            else
            {
                ltFacebookSchool.Text = "<a href='" + _linkFacebook + "' target='_blank'>" + _linkFacebook + "</a>";
            }

            this.Title = _schoolName;
        }
    }