using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; /// <summary> /// Summary description for OrderDB /// </summary> public class OrderDB { private string connectionString = "Data Source=.;Initial Catalog=aspnetdb;user=sa;password=password123;"; public OrderDB() { // // TODO: Add constructor logic here // } public DataSet GetOrders() { string sqlStr; sqlStr = "select cat.catid, cat.Name, ord.Description, ord.amount "; sqlStr += " from "; sqlStr += " tblcategory cat left outer join tblOrders ord ON "; sqlStr += " ord.catId= cat.catId order by cat.id"; DataSet ds = new DataSet(); ds = SqlDataHelper.ExecuteDataset(connectionString, CommandType.Text, sqlStr); return (ds); } }