Пример #1
0
    //5_1_a_s_p_x
    private void GridviewBind()
    {
        string  timeF   = ddlyearF.SelectedItem.Text + "-" + ddlMonthF.SelectedItem.Text + "-" + "1";
        string  timeT   = ddlYearT.SelectedItem.Text + "-" + ddlMonthT.SelectedItem.Text + "-" + "1";
        string  title   = txtdocTitle.Text;
        string  column  = ddlColumn.SelectedValue;
        string  keyword = txtKeywords.Text;
        Doc     dc      = new Doc();
        DataSet ds      = dc.AllDoc(title, column, keyword, timeF, timeT);

        lblCount.Text        = Convert.ToString(ds.Tables[0].Rows.Count);
        GridView1.DataSource = ds.Tables[0];
        GridView1.DataBind();
    }