Form的Load事件代码如下,测试时,ds.Table["Credence"]和bsCredence中都有数据,为何dgvCredence中不显示数据呀....
        private void FrmCredence_Load(object sender, EventArgs e)
        {
            Entity.Credence.GetAllCredence(ds, "Credence");
            bsCredence.DataSource = ds.Tables["Credence"];
            dgvCredence.DataSource = ds.Tables["Credence"];
        }----------------------------------------using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;namespace Customs.Entity
{
    class Credence
    {
        static BaseClass.OperateData operate = new Customs.BaseClass.OperateData();        public Credence()
        {
        }        /// <summary>
        /// 取得所有已备案的资料
        /// </summary>
        /// <param name="ds">DataSet</param>
        /// <param name="tableName">Table name</param>
        public static void GetAllCredence(DataSet ds, string tableName)
        {
            string strSQL = "select a.item_code, a.code_t, a.g_mode, a.origin_consume, ";
            strSQL += " b.country_name, b.country_english, a.curr_code, c.curr_Name, ";
            strSQL += " a.unit_price, a.unit_code, d.unit_name, a.exp_type, a.decl_work_price,";
            strSQL += " a.work_price, a.item_type, a.edi_status, a.status,";
            strSQL += " a.auditing_content, a.appr_code, a.note_s ";
            strSQL += " from (((credence_tab a left join c_country b on a.origin_consume = b.country_code) ";
            strSQL += " left join c_curr c on a.curr_code = c.curr_code) ";
            strSQL += " left join c_unit d on a.unit_code = d.unit_code)";
            strSQL += " order by a.item_type, a.item_code";
            operate.FillDate(ds, tableName, strSQL);
        }
    }
}