private DataSet TestQueryFor(LabTestProcs ProcToRun, SqlParameter SelectedLetter, String CnxString) { DataSet ds = new DataSet(); using (SqlConnection conn = new SqlConnection(CnxString)) { using (SqlCommand comm = new SqlCommand(AvailableLTProcs[ProcToRun], conn)) { comm.CommandType = CommandType.StoredProcedure; comm.Parameters.Add(SelectedLetter); using (SqlDataAdapter da = new SqlDataAdapter(comm)) { try { da.Fill(ds); } catch (Exception) { } finally { } } comm.Parameters.Clear(); } } return(ds); }
private DataSet TestQueryFor(LabTestProcs ProcToRun, SqlParameter SelectedLetter, String CnxString) { DataSet ds = new DataSet(); using (SqlConnection conn = new SqlConnection(CnxString)) { using (SqlCommand comm = new SqlCommand(AvailableLTProcs[ProcToRun], conn)) { comm.CommandType = CommandType.StoredProcedure; comm.Parameters.Add(SelectedLetter); using (SqlDataAdapter da = new SqlDataAdapter(comm)) { try { da.Fill(ds); } catch (Exception) { } finally { } } comm.Parameters.Clear(); } } return ds; }