zoukankan      html  css  js  c++  java
  • 12-业务逻辑层

    using DAL;
    using Entity;

    public class CarBLL
    {
    CarDAL DAL = new CarDAL();
    /// <summary>
    /// 添加房车信息
    /// </summary>
    /// <param name="car"></param>
    /// <returns></returns>
    public int CarAdd(Car car)
    {
    return DAL.CarAdd(car);
    }
    /// <summary>
    /// 汽车品牌
    /// </summary>
    /// <returns></returns>
    public List<CarPinPai> GetCarPinPai()
    {
    return DAL.GetCarPinPai();
    }
    /// <summary>
    /// 汽车价格区间
    /// </summary>
    /// <returns></returns>
    public List<CarPrice> GetCarPrice()
    {
    return DAL.GetCarPrice();
    }
    /// <summary>
    /// 汽车类型
    /// </summary>
    /// <returns></returns>
    public List<CarXingType> GetCarXingType()
    {
    return DAL.GetCarXingType();
    }
    /// <summary>
    /// 汽车分组
    /// </summary>
    /// <returns></returns>
    public List<CarGroup> GetCarGroup()
    {
    return DAL.GetCarGroup();
    }
    /// <summary>
    /// 图片添加
    /// </summary>
    /// <param name="carImg"></param>
    /// <returns></returns>
    public int AddImg(CarImg carImg)
    {
    return DAL.AddImg(carImg);
    }
    /// <summary>
    /// 汽车分组
    /// </summary>
    /// <returns></returns>
    public List<CarImgType> GetCarImgType()
    {
    return DAL.GetCarImgType();
    }
    /// <summary>
    /// 图片显示
    /// </summary>
    /// <returns></returns>
    public PageBox GetImgList(int pageindex=1,string name="")
    {
    var list = DAL.GetImgList();
    if (!string.IsNullOrWhiteSpace(name))
    {
    list = list.Where(s => s.ImgTitle.Contains(name)).ToList();
    }
    PageBox pb = new PageBox();
    pb.PageIndex = pageindex;
    pb.PageCount = list.Count;
    pb.Data = list.Skip((pageindex - 1) * 3).Take(pageindex * 3);
    return pb;
    }
    /// <summary>
    /// 删除
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    public int Delete(int id)
    {
    return DAL.Delete(id);
    }
    /// <summary>
    /// 房车信息显示
    /// </summary>
    /// <returns></returns>
    public PageBox GetCarList(int pageindex=1,string name="")
    {
    var list = DAL.GetCarList();
    if (!string.IsNullOrWhiteSpace(name))
    {
    list = list.Where(s => s.CarName.Contains(name)).ToList();
    }
    PageBox pb = new PageBox();
    pb.PageIndex = pageindex;
    pb.PageCount = list.Count;
    pb.Data = list.Skip((pageindex - 1) * 3).Take(pageindex * 3);
    return pb;
    }
    }

  • 相关阅读:
    visitortheoryreflection.cs
    adaptertheory.cs
    factorymethodavocados.cs
    compositetheorynswithShare.cs
    在.NET/Mono上运行Java:Jeroens Frijters谈IKVM.NET
    Building ASP.NET Server ControlsTextbox.cs
    compositephotolibrary.cs
    proxyspacebook.cs
    adapterpluggabletheory.cs
    Building ASP.NET Server ControlsFancyLabel.cs
  • 原文地址:https://www.cnblogs.com/Wangyang11/p/10003352.html
Copyright © 2011-2022 走看看