using System; using System.Collections; using System.ComponentModel; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Text; using System.Text.RegularExpressions; //using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Resources; using System.Globalization; using System.Threading; namespace infoExpediters { /// /// Summary description for WebCode. /// public class WebCode { public WebCode() { // // TODO: Add constructor logic here // } public DataSet getAllSmilies() { //String strCon =ApplicationData.DB_CONNECTION; String strCon = System.Configuration.ConfigurationManager.AppSettings["DB_CONNECTION"]; DataSet ds =new DataSet(); using(SqlConnection conn = new SqlConnection(strCon)) { SqlCommand cmd; SqlDataAdapter daObj=new SqlDataAdapter(); conn.Open(); cmd=new SqlCommand("dbo.sp_getSmilies",conn); cmd.CommandType =CommandType.StoredProcedure; daObj.SelectCommand =cmd; //Pass index and page size to get the required set of records into dataset daObj.Fill(ds); daObj.Dispose(); cmd.Dispose(); conn.Close(); conn.Dispose(); } return ds; } } }