皇冠现金app下一场创造1个model,然后创建三个model

预备图片,把相关记录添加至数据库表中:
  皇冠现金app 1

预备图片,把相关记录添加至数据库表中:
  皇冠现金app 2

始建一个存款和储蓄进度,获取具有记录:
皇冠现金app 3

成立2个仓库储存进程,获取具有记录:
皇冠现金app 4

在ASP.NET MVC专案中,部署Bootstrap环境……

在ASP.NET MVC专案中,部署Bootstrap环境……

接下来创设一个model:
皇冠现金app 5

下一场创造三个model:
皇冠现金app 6

 

 

皇冠现金app 7皇冠现金app 8

皇冠现金app 9皇冠现金app 10

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Insus.NET.Models
{
   public class Slider
    {
        public byte Slider_nbr { get; set; }

        public byte Sequence { get; set; }

        public string Title { get; set; }

        public string ImageUrl { get; set; }          

        public string Description { get; set; }
    }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Insus.NET.Models
{
   public class Slider
    {
        public byte Slider_nbr { get; set; }

        public byte Sequence { get; set; }

        public string Title { get; set; }

        public string ImageUrl { get; set; }          

        public string Description { get; set; }
    }
}

Source Code

Source Code

 

 

再次创下设二个Entity:
皇冠现金app 11

再次创下制三个Entity:
皇冠现金app 12

 

 

皇冠现金app 13皇冠现金app 14

皇冠现金app 15皇冠现金app 16

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Insus.NET.Models;
using System.Data;
using Insus.NET.ExtendMethods;
using Insus.NET.DataBases;

namespace Insus.NET.Entities
{
  public  class SliderEntity
    {
        BizSP sp = new BizSP();

        public IEnumerable<Slider> Sliders()
        {
            sp.ConnectionString = DB.ConnectionString;
            sp.Parameters = null;
            sp.ProcedureName = "usp_Slider_GetAll";
            DataTable dt = sp.ExecuteDataSet().Tables[0];
            return dt.ToList<Slider>();
        }
    }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Insus.NET.Models;
using System.Data;
using Insus.NET.ExtendMethods;
using Insus.NET.DataBases;

namespace Insus.NET.Entities
{
  public  class SliderEntity
    {
        BizSP sp = new BizSP();

        public IEnumerable<Slider> Sliders()
        {
            sp.ConnectionString = DB.ConnectionString;
            sp.Parameters = null;
            sp.ProcedureName = "usp_Slider_GetAll";
            DataTable dt = sp.ExecuteDataSet().Tables[0];
            return dt.ToList<Slider>();
        }
    }
}

Source Code

Source Code

安装图片切换速度:
皇冠现金app 17

设置图片切换速度:
皇冠现金app 18

View视图:
皇冠现金app 19

View视图:
皇冠现金app 20

 

 

皇冠现金app 21皇冠现金app 22

皇冠现金app 23皇冠现金app 24

<div class="tp-wrapper">
    <div id="imgcarousel" class="carousel slide" data-ride="carousel">
        <ol class="carousel-indicators">
            @foreach (var item in (new SliderEntity()).Sliders())
            {
                <li data-target="#imgcarousel" data-slide-to="@item.Sequence" class="@(item.Sequence == 0 ? "active" : "")"></li>
            }
        </ol>
        <div class="carousel-inner">
            @foreach (var item in (new SliderEntity()).Sliders())
            {
                <div class="@(item.Sequence == 0 ? "item active" : "item")">
                    <img src="~/Content/img/slider-images/@item.ImageUrl"
                         alt="@item.Description" class="img-responsive" />
                    <div class="carousel-caption">
                        <h1>@item.Title</h1>
                        <p>@item.Description</p>
                    </div>
                </div>
            }
        </div>

        <a class="left carousel-control" href="#imgcarousel" data-slide="prev">

        </a>

        <a class="right carousel-control" href="#imgcarousel" data-slide="next">

        </a>
    </div>
</div>
<div class="tp-wrapper">
    <div id="imgcarousel" class="carousel slide" data-ride="carousel">
        <ol class="carousel-indicators">
            @foreach (var item in (new SliderEntity()).Sliders())
            {
                <li data-target="#imgcarousel" data-slide-to="@item.Sequence" class="@(item.Sequence == 0 ? "active" : "")"></li>
            }
        </ol>
        <div class="carousel-inner">
            @foreach (var item in (new SliderEntity()).Sliders())
            {
                <div class="@(item.Sequence == 0 ? "item active" : "item")">
                    <img src="~/Content/img/slider-images/@item.ImageUrl"
                         alt="@item.Description" class="img-responsive" />
                    <div class="carousel-caption">
                        <h1>@item.Title</h1>
                        <p>@item.Description</p>
                    </div>
                </div>
            }
        </div>

        <a class="left carousel-control" href="#imgcarousel" data-slide="prev">

        </a>

        <a class="right carousel-control" href="#imgcarousel" data-slide="next">

        </a>
    </div>
</div>

Source Code

Source Code

演示:
皇冠现金app 25

演示:
皇冠现金app 26

 

 

相关文章