Beispiel #1
0
    void loadData(int ID)
    {
        DataTable dbVideo = objVideo.GetDataByID(ID);

        if (dbVideo.Rows.Count > 0)
        {
            txtTitle.Text       = dbVideo.Rows[0]["NAME"].ToString();
            txtSortDisplay.Text = dbVideo.Rows[0]["SORT_DISPLAY"].ToString();
            txtLinkYoutube.Text = dbVideo.Rows[0]["LINK_YOUTUBE"].ToString();
            txtContent.Text     = dbVideo.Rows[0]["DESCRIPTION"].ToString();
            int status = Convert.ToInt32(dbVideo.Rows[0]["STATUS"].ToString());
            if (status == 1)
            {
                chkStatus.Checked = true;
            }
            else
            {
                chkStatus.Checked = false;
            }
        }
    }