//public List<object> SelectStat() //{ // string str1 = "select * from Products"; // List<object> productDAL = new List<object>(); // using (SqlConnection connection = new SqlConnection(ConnectionString)) // { // SqlCommand command = new SqlCommand(str1, connection); // connection.Open(); // SqlDataReader reader = command.ExecuteReader(); // reader.Read(); // //productDAL.Add[] = reader["Name"].ToString(); // while (reader.Read()) // { // //productDAL.Name = reader["Name"].ToString(); // //str[i] = productDAL.Name; // productDAL.Add(reader["Name"]); // productDAL.Add(reader["ID"]); // productDAL.Add(reader["Location"]); // } // } // return productDAL; public string ForProc() { string str; sqlConn.Name = Name; return(str = sqlConn.GetResultUsingProc()); }