• API-DAL后台示例--dal(添加,显示)


    dal(添加,显示)
     
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Model;
    namespace DAL
    {
        public class ShoppingDAL
        {
            DBHelper helper = new DBHelper();
            /// <summary>
            /// 新增优惠券的方式
            /// </summary>
            /// <param name="m"></param>
            /// <returns></returns>
            public int Add(yhqModel m)
            {
                string sql = string.Format("insert into [yhq] values ('{0}', '{1}', {2}, '{3}', '{4}', '{5}', '{6}', '{7}', {8}, {9})",
                    m.mc, m.Fenlei, m.sytj, m.ksrq, m.jsrq, m.yhfs, m.yhfs1, m.yhfs2, m.flfs, m.ffzs);
                return helper.ExecuteNonQuery(sql);
            }
            /// <summary>
            /// 获取所有领取记录的方法
            /// </summary>
            /// <returns></returns>
            public List<lqjlModel> Show()
            {
                string sql = @"select lqjl.Id, yh.Name, yhq.mc, yhq.sytj, yhq.yhfs, yhq.yhfs1, lqjl.lqsh, lqjl.hxzt
                    from lqjl left join yh on lqjl.yhId = yh.Id
                    left join yhq on lqjl.yhqId = yhq.Id";
                return helper.GetToList<lqjlModel>(sql);
            }
        }
    }
  • 相关阅读:
    jquery常用语句
    记录一个奇异的问题
    冰块渲染2
    冰块渲染
    GCAlloc 问题一则
    矩阵基础3
    优化 Overdraw 和 GrabPass
    优化平面法线贴图
    环境模拟
    使用 GPU 加速计算
  • 原文地址:https://www.cnblogs.com/gc1229/p/13072889.html
Copyright © 2020-2023  润新知