示例#1
0
    private void FillGrid()
    {
        DataTable dtBrand = objDesg.GetCourseMaster(Session["CompId"].ToString().ToString());

        lblTotalRecords.Text = Resources.Attendance.Total_Records + ": " + dtBrand.Rows.Count + "";
        Session["dtCourse"]  = dtBrand;
        Session["dtFilter"]  = dtBrand;
        if (dtBrand != null && dtBrand.Rows.Count > 0)
        {
            GvCourse.DataSource = dtBrand;
            GvCourse.DataBind();
            AllPageCode();
        }
        else
        {
            GvCourse.DataSource = null;
            GvCourse.DataBind();
        }
    }
示例#2
0
    public static string[] GetCompletionListCourse(string prefixText, int count, string contextKey)
    {
        CourseMaster objCourse = new CourseMaster();
        DataTable    dt        = new DataView(objCourse.GetCourseMaster(HttpContext.Current.Session["CompId"].ToString()), "Course like '" + prefixText.ToString() + "%'", "", DataViewRowState.CurrentRows).ToTable();

        string[] txt = new string[dt.Rows.Count];

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            txt[i] = dt.Rows[i]["Course"].ToString();
        }
        return(txt);
    }