예제 #1
0
        /////////////////////////////////////////////////////////////////////////////////////////
        ///
        public static DataTable list1(string strSQL)
        {
            //			if(CnxBase.Local=="Oui")
            //			{
            try
            {
                CnxBase        cnx2          = CnxBase.getInstance();
                SqlDataAdapter myDataAdapter = new SqlDataAdapter(strSQL, cnx2.OpenConnection());
                DataSet        myDataSet     = new DataSet();
                myDataAdapter.Fill(myDataSet, "MySrcTable");

                return(myDataSet.Tables["MySrcTable"]);
            }
            catch (Exception myException)
            {
                throw(new Exception(myException.Message + " => " + strSQL));
            }
            //			}
            //			else
            //			{
            //				localhost.Service1 sr=new Test.service.localhost.Service1();
            //
            //				return sr.List(strSQL).Tables[0];
            //			}
        }
예제 #2
0
 public void Connection()
 {
     cn.OpenConnection();
 }