• 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);
            }
        }
    }
  • 相关阅读:
    开通博客了
    nginx一些高级配置
    hue的优化
    hue改下载行数
    运维常用脚本
    scala
    kafka调优
    confluent部署:
    Redis主从及哨兵
    Redis配置
  • 原文地址:https://www.cnblogs.com/gc1229/p/13072889.html
Copyright © 2020-2023  润新知