110,533
社区成员
发帖
与我相关
我的任务
分享
class ExportInfo
{
public string sampleno { get; set; }
public string patientname { get; set; }
public string sex { get; set; }
public string age { get; set; }
public string itemname { get; set; }
public string sampletype { get; set; }
public string department { get; set; }
public string doctor { get; set; }
public string bedno { get; set; }
public string diagnosis { get; set; }
public string collectDate { get; set; }
public string sendDate { get; set; }
public string remark { get; set; }
public string phone { get; set; }
public string identityCard { get; set; }
public string barcode { get; set; }
}
string cx = "select * from VW_EXPORTBIO where 收样日期>='" + std + "' and 收样日期<'" + end + "'";
SqlConnection conn = new SqlConnection(connStr);
conn.Open();
DataSet ds = new DataSet();
SqlDataAdapter sda = new SqlDataAdapter(cx, conn);
sda.Fill(ds, "VW_EXPORTBIO");
foreach (DataRow d in ds.Tables["VW_EXPORTBIO"].Rows)
用这个就行,自己研究出来了