如何从表中读出Priority字段的所有内容?我写的只能读出一个,请教高手
private void f_tx_Load(object sender, System.EventArgs e)
{
DateTime todaydate=DateTime.Now;//系统当前的日期
int Priority=Convert.ToInt32(client_class.p_exes("select * from task","task","Priority"));//要提醒的天数
System.Data.DataSet ds=new System.Data.DataSet();
ds=client_class.p_exer("select * from task","task");
string[] a={"Priority"};
for(int j=0;j<ds.Tables[0].Rows.Count;j++)
Priority=a["Priority"];
DateTime tomorrwdate=todaydate.AddDays(Priority);//计算出要提醒的日期
int mm=tomorrwdate.Month;//提醒的月
int dd=tomorrwdate.Day;//提醒的日
string str="select * from task ";
dataSet1=client_class.p_exer(str,"task");
for(int i=0;i<dataSet1.Tables[0].Rows.Count;i++)
{
string title=dataSet1.Tables[0].Rows[i]["Title"].ToString();
string detail=dataSet1.Tables[0].Rows[i]["Detail"].ToString();
string type=dataSet1.Tables[0].Rows[i]["Type"].ToString();
string begintime=dataSet1.Tables[0].Rows[i]["BeginTime"].ToString();
string du=dataSet1.Tables[0].Rows[i]["du"].ToString();
string[] subItems={title,detail,type,begintime,du};
ListViewItem item=new ListViewItem(subItems);
this.listView1.Items.Insert(i,item);
}
}