public List<CMEDSummerClass> GetCMED_Order_Products(long bundle_id) { DB db = new DB(); SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "GetCMED_Order_ProductsByBundle"; cmd.Parameters.AddWithValue("@bundle_id", bundle_id); List<CMEDSummerClass> CMEDSummerClasses = new List<CMEDSummerClass>(); DataTable dt = db.Execute(cmd); foreach (DataRow dr in dt.Rows) { CMEDSummerClass SummerClass = new CMEDSummerClass { MediaTitle = dr["MediaTitle"].ToString(), AssetID = dr["AssetID"].ToString(), Url = dr["Url"].ToString(), }; CMEDSummerClasses.Add(SummerClass); } return CMEDSummerClasses; }
public List<CMEDSummerClass> GetCMEDSummerLogin(string email) { DB db = new DB(); SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "GetCMEDSummerClassesLogin"; cmd.Parameters.AddWithValue("@email", email); List<CMEDSummerClass> CMEDSummerClasses = new List<CMEDSummerClass>(); DataTable dt = db.Execute(cmd); foreach (DataRow dr in dt.Rows) { CMEDSummerClass SummerClass = new CMEDSummerClass { MediaTitle = dr["MediaTitle"].ToString(), AssetID = dr["AssetID"].ToString(), Url = dr["Url"].ToString(), }; CMEDSummerClasses.Add(SummerClass); } return CMEDSummerClasses; }