Beispiel #1
0
 public static int select()
 {
     try
     {
         string[] strFormNum = new string[1] {
             "TDBG"
         };
         CDBControl dbcontrol = new CDBControl();
         dbcontrol.Sql = "SELECT FormNum, Project, Vendor, Product FROM dbo.V_TestWorkSearch where ((FormNum LIKE '%" + strFormNum[0] + "%'or FormNum LIKE '%" + strFormNum[1] + "%')AND (Status = '测试中'))";
         dbcontrol.readerData();
         dbcontrol.clear();
         dbcontrol.dataView();
         dst = dbcontrol.ds;
         return(dbcontrol.ds.Tables[0].Rows.Count);
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message);
         return(0);
     }
 }