예제 #1
0
파일: SQLHelper.cs 프로젝트: irengine/tms
        public static DataSet QueryToolReport(string name, string code)
        {
            DataSet dataSet = new CarsMaintenance.Reports.ToolDataSet();

            using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings[CONNECTION_NAME].ConnectionString))
            {
                try
                {
                    conn.Open();

                    string sql = string.Format(sqlToolReport, name, code);;

                    SqlDataAdapter dataAdapter = new SqlDataAdapter(sql, conn);
                    dataAdapter.Fill(dataSet.Tables[0]);
                }
                //catch (Exception e)
                //{
                //}
                finally
                {
                    conn.Close();
                }
            }
            return(dataSet);
        }
예제 #2
0
파일: SQLHelper.cs 프로젝트: irengine/TMS2
        public static DataSet QueryToolReport(string name, string code)
        {
            DataSet dataSet = new CarsMaintenance.Reports.ToolDataSet();
            using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings[CONNECTION_NAME].ConnectionString))
            {
                try
                {

                    conn.Open();

                    string sql = string.Format(sqlToolReport, name, code); ;

                    SqlDataAdapter dataAdapter = new SqlDataAdapter(sql, conn);
                    dataAdapter.Fill(dataSet.Tables[0]);
                }
                //catch (Exception e)
                //{
                //}
                finally
                {
                    conn.Close();
                }

            }
            return dataSet;
        }