示例#1
0
文件: BAL.cs 项目: lchambaka/WorkPad
        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;
        }
示例#2
0
文件: BAL.cs 项目: lchambaka/WorkPad
        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;
        }