zoukankan      html  css  js  c++  java
  • 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);
            }
        }
    }
  • 相关阅读:
    BZOJ 1568: [JSOI2008]Blue Mary开公司
    BZOJ 3165: [Heoi2013]Segment
    BZOJ 2733: [HNOI2012]永无乡
    BZOJ 4631: 踩气球
    BZOJ 4530: [Bjoi2014]大融合
    BZOJ 4919: [Lydsy1706月赛]大根堆
    BZOJ 5442: [Ceoi2018]Global warming
    BZOJ 4027: [HEOI2015]兔子与樱花
    BZOJ 5441: [Ceoi2018]Cloud computing
    php的抓取
  • 原文地址:https://www.cnblogs.com/gc1229/p/13072889.html
Copyright © 2011-2022 走看看