Ejemplo n.º 1
0
        private void LoadCourse()
        {
            DataTable   dt;
            DAV_Cources oDAV_Cources = new DAV_Cources();

            dt = oDAV_Cources.SelectCourse();

            if (dt.Rows.Count > 0)
            {
                dropCourse.DataSource     = null;
                dropCourse.DataSource     = dt;
                dropCourse.DataTextField  = "course_name";
                dropCourse.DataValueField = "idmaincourse";
                dropCourse.DataBind();
            }
            LoadData();
        }
        public void LoadData()
        {
            try
            {
                DataTable   dt;
                DAV_Cources oDAV_Cources = new DAV_Cources();
                dt = oDAV_Cources.SelectCourse();
                String StrInnserHtml = "";

                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        StrInnserHtml = StrInnserHtml + "<tr><td>" + dt.Rows[i][1].ToString() + "</td><td>" + dt.Rows[i][2].ToString() + "</td><td>" + dt.Rows[i][3].ToString() + "</td><td> " + dt.Rows[i][4].ToString() + " </td><td> " + dt.Rows[i][5].ToString() + " </td></tr>";
                    }
                }
                divInnerHtml.InnerHtml = StrInnserHtml;
            }
            catch (Exception ex)
            {
                throw;
            }
        }