Bootstrap Table使用整理(五)-分页组合查询

一、分页组合查询

/*
* data-pagination 指定是否启用分页
* data-page-list 指定分页的页数据量数组 '[5,10]'
* data-side-pagination 指定分页是否是服务端(server)/客户端(client)
* 特别说明:
* 客户端,请求参数:
* search:文本框内容,在文本框内容改变是自动提交请求
* order: 排序方式
* sort:排序列名
* offset:划过条数
* limit:要获取的数据的条数
*
*/
var $table1= $('#table1').bootstrapTable({
    columns: [
        { field: 'sno', title: '学生编号',sortable:true },
        { field: 'sname', title: '学生姓名' },
        { field: 'ssex', title: '性别' },
        { field: 'sbirthday', title: '生日' },
        { field: 'class', title: '课程编号' },
    ],
    url: '@Url.Action("GetStuList", "DataOne")',
    pagination: true,
    sidePagination: 'server',
    pageList:[5,10,20,50],
    queryParams: function (params) {
        params.name = '张三丰';
        //特别说明,返回的参数的值为空,则当前参数不会发送到服务器端
        //这种指定请求参数的方式和datatables控价类似
        params.sex = $('input[name="sex"]:checked').val();
        return params;
    }
});
//刷新方法
$('#heartBtn').click(function () {
    $table1.bootstrapTable('refresh');
});

<table id="table1"
       data-classes="table table-hover "
       data-search="true"
       data-show-refresh="true"
       data-show-toggle="true"
       data-show-columns="true"
       data-toolbar="#toolbar"></table>
<div id="toolbar">
    <div class="btn-group">
        <button class="btn btn-default">
            <i class="glyphicon glyphicon-plus"></i>
        </button>
        <button class="btn btn-default">
            <i class="glyphicon glyphicon-heart" id="heartBtn"></i>
        </button>
        <button class="btn btn-default">
            <i class="glyphicon glyphicon-trash"></i>
        </button>
    </div>
    <div class="form-group">
        <label class="control-label">性别:</label>
        <label class="radio-inline">
            <input type="radio" name="sex" value="男" /> 男
        </label>
        <label class="radio-inline">
            <input type="radio" name="sex" value="女" /> 女
        </label>
    </div>
</div>

2.服务端代码处理

public JsonResult GetStuList(string sex, string search, string sort, string order, int offset, int limit)
{
    var query = _Context.Student.AsQueryable();
    if (string.IsNullOrEmpty(sex) == false)
        query = query.Where(q => q.Ssex == sex);
    if (string.IsNullOrEmpty(search) == false)
        query = query.Where(q => q.Sno.Contains(search) || q.Sname.Contains(search));
    //排序
    if (sort == "sno")
    {
        if (order == "asc")
            query = query.OrderBy(q => q.Sno);
        else
            query = query.OrderByDescending(q => q.Sno);
    }
    else
        query = query.OrderBy(q => q.Sbirthday);

    int total = query.Count();
    var list = query.Skip(offset).Take(limit).ToList();
    return Json(new
    {
        rows = list,
        total = total
    });
}

更多:

bootstrap-table教程目录
转载自:https://blog.csdn.net/u011127019/article/details/72933921

You may also like...

187 Responses

  1. Tqtgqk说道:

    buy escitalopram 20mg generic buy naltrexone sale naltrexone oral

  2. Xlthls说道:

    buy lasix generic diuretic furosemide pill buy albuterol without a prescription

  3. Yffhbp说道:

    buy furosemide paypal order albuterol 2mg without prescription cheap albuterol 2mg

  4. Znfkgo说道:

    buy lexapro naltrexone usa buy revia 50mg

  5. Pjpult说道:

    oral strattera buy seroquel for sale brand zoloft 50mg

  6. Palrmf说道:

    order strattera 25mg pills order strattera 25mg pills zoloft 50mg drug

  7. Dpenhy说道:

    order actigall generic order zyban 150mg order cetirizine 5mg generic

  8. Duposn说道:

    order actigall pills bupropion brand buy cetirizine 10mg for sale

  9. Wooogr说道:

    order azithromycin 500mg pills prednisolone 5mg without prescription buy gabapentin 600mg pills

  10. Bvumlz说道:

    zithromax 250mg uk buy omnacortil cheap neurontin ca

  11. Faozel说道:

    safest daily antacid names of anti nausea medication medicine to reduce flatulence

  12. Srslna说道:

    can paracetamol upset your stomach nausea medication list what to take for flatulence

  13. Grudom说道:

    order prednisone 40mg online cheap generic accutane 10mg amoxil 1000mg sale

  14. Vpgyua说道:

    buy prednisone 20mg amoxicillin without prescription order amoxil 1000mg pills

  15. Fvcafu说道:

    free online birth control pills buy birth control pills walgreens does muira puama increase semen volume

  16. Beefgd说道:

    promethazine pills promethazine price stromectol without prescription

  17. Uwbcvs说道:

    promethazine us stromectol 6mg cost ivermectina online

  18. Fofyem说道:

    non bleeding erosive gastropathy treatment nhs treatment for stomach ulcers different types of uti bacteria

  19. Qiyprx说道:

    what causes duodenal erosion tests to determine stomach ulcers urinary tract infection treatment pharmacy

  20. Fhabdt说道:

    how to buy duloxetine cymbalta pills provigil 100mg for sale

  21. Maggrp说道:

    where can i buy cymbalta order glipizide 5mg generic order modafinil 200mg without prescription

  22. Tvtjgj说道:

    anti fungi tablets without perscriptions tablets for nail fungal infection most popular blood pressure meds

  23. Wtggzy说道:

    fungus clear fix reviews hsv 2 cure progress blood pressure medication starts with an o

  24. Jnvxla说道:

    buy periactin 4 mg fluvoxamine for sale generic ketoconazole

  25. Xysdlh说道:

    daily suppressive herpes medication type 2 diabetes blood test results explained diabetic pill medicine

  26. Hhvfgg说道:

    buy cyproheptadine 4mg online cheap oral luvox 100mg buy nizoral 200 mg online

  27. Tenepg说道:

    genital herpes medication costs valacyclovir shingles still spreading latest treatment for diabetics

  28. Kvgrld说道:

    homeopathic way to quit smoking medication used to treat arthritis buy pain meds online no script needed

  29. Ugjswt说道:

    buy medroxyprogesterone for sale microzide 25mg cheap buy microzide 25 mg for sale

  30. Norbnb说道:

    order medroxyprogesterone without prescription brand biltricide 600 mg order hydrochlorothiazide 25 mg generic

  31. Plwkxz说道:

    nicorette 12 week quit plan where to buy pain medication online buy painkillers online overnight delivery

  32. Vhkiea说道:

    buy sleeping tablets online usa fastest weight loss pills buy weight loss medications online

  33. Lnhtki说道:

    buy femara 2.5 mg online cheap letrozole 2.5mg cost aripiprazole 20mg pill

  34. Hpqhlq说道:

    order femara without prescription buy femara for sale order abilify 30mg online

  35. Fanzvy说道:

    doxylamine uk over the counter sleeping tablets online shop weight loss medication prescribed online

  36. Bttdfg说道:

    buy uroxatral 10mg pill best otc heartburn med heartburn after taking antibiotics

  37. Wjkrgb说道:

    buy minocin 50mg generic buy ropinirole pills generic ropinirole

  38. Zkrwxq说道:

    minocin 50mg brand terazosin 5mg brand order ropinirole online cheap

  39. Rwokwk说道:

    order alfuzosin generic heartburn over the counter remedies cure stomach pain when standing

  40. Uxxmtd说道:

    acne treatment for adults dermatologist acne treatment for adults dermatologist buy oxcarbazepine without a prescription

  41. Fpbgni说道:

    order catapres 0.1mg pills order meclizine 25mg online tiotropium bromide 9mcg pills

  42. Eyfyme说道:

    order generic catapres 0.1mg how to get spiriva without a prescription tiotropium bromide 9mcg cheap

  43. Ewdjmn说道:

    acne ointment by prescription only trileptal buy online trileptal 600mg pills

  44. Nwpcwy说道:

    purchase rocaltrol pills tricor 160mg without prescription order tricor 200mg pills

  45. Ysffzj说道:

    amoxicillin where to buy buy generic amoxicillin for sale buy clarithromycin 250mg generic

  46. Ulttfw说道:

    order trimox 500mg generic clarithromycin where to buy order clarithromycin 250mg sale

  47. Dbsciz说道:

    order generic rocaltrol order trandate 100mg online tricor pills

  48. Cucehh说道:

    write essay for money no deposit free money calendar poker online for money

  49. Pnzjla说道:

    term papers writing service air war college essays oral suprax 200mg

  50. Fsztmo说道:

    i need help with my research paper strtpqbu buy cefixime tablets

  51. Fgorvg说道:

    academic writing article win money instantly no deposit quick hits free online slots

  52. Oqcpbt说道:

    buy aspirin 75 mg online casino card games casino online usa

  53. Obbcfr说道:

    buy aspirin 75mg online cheap gambling game online blackjack for money

  54. Zokpmu说道:

    purchase lamisil sale order terbinafine 250mg pills casino game

  55. Idobux说道:

    desyrel 50mg price purchase clindamycin online clindamycin for sale online

  56. Rrqgcn说道:

    buy trazodone 50mg generic suhagra 100mg sale brand clindac a

  57. Qyzevg说道:

    buy generic tadalafil order indomethacin generic buy indomethacin online

  58. Jhztfh说道:

    order cefuroxime online cheap buy bimatoprost medication robaxin 500mg usa

  59. Dutwny说道:

    order tadacip 10mg generic order indomethacin online indocin price

  60. Mdhqdz说道:

    purchase nolvadex online order rhinocort inhalers purchase symbicort inhalers

  61. Oqwrof说道:

    nolvadex over the counter symbicort over the counter buy budesonide online

  62. Dsctqw说道:

    order retin gel without prescription oral avana 200mg avanafil buy online

  63. Drpfju说道:

    buy retin cream sale buy cheap avanafil avanafil tablet

  64. Suguza说道:

    cleocin online buy sildenafil 100mg sale best non prescription ed pills

  65. Ouzbuc说道:

    buy clindamycin pills buy cleocin 150mg pill top ed drugs

  66. Qqanvk说道:

    lamotrigine 200mg generic buy lamotrigine 50mg pills buy mebendazole 100mg generic

  67. Ienzko说道:

    order lamotrigine 200mg for sale buy prazosin 1mg for sale buy nemazole for sale

  68. Zwowmb说道:

    cost flagyl 400mg order keflex 125mg without prescription purchase cephalexin pills

  69. Tgeqyv说道:

    order flagyl 400mg without prescription bactrim uk order keflex 500mg

  70. Qhkcjj说道:

    aurogra 50mg without prescription sildenafil medication estradiol sale

  71. Nyprpa说道:

    buy aurogra without a prescription buy aurogra 50mg pill buy estrace 1mg pills

  72. Iuiotu说道:

    order diflucan pills baycip over the counter brand ciprofloxacin 1000mg

  73. Udgquf说道:

    brand fluconazole 200mg order ampicillin 500mg for sale buy ciprofloxacin 1000mg for sale

  74. Stytfa说道:

    buy cheap generic spironolactone aldactone cost order proscar 1mg for sale

  75. Nospdv说道:

    how to write an essay about my family buy custom research papers help with writing a research paper

  76. Buirej说道:

    research paper help online need help writing a paper thesis writer

  77. Jhtgal说道:

    aldactone over the counter buy generic finasteride 5mg purchase propecia sale

  78. Teyvgl说道:

    purchase tamsulosin pills buy generic tamsulosin 0.4mg zocor 10mg generic

  79. Mxzwmh说道:

    motilium us order coreg 6.25mg sale buy tetracycline sale

  80. Fryqxa说道:

    buy generic domperidone carvedilol sale order sumycin 250mg pills

  81. Fufikd说道:

    flomax 0.4mg oral cost zofran 8mg order simvastatin 20mg sale

  82. Fnkcby说道:

    zantac pills cheap celebrex 200mg celebrex online buy

  83. Ysrudw说道:

    order buspar 5mg order cordarone 100mg generic purchase cordarone sale

  84. Ilothm说道:

    buspar 5mg canada buspin generic buy amiodarone pills

  85. Jbjehy说道:

    buy ranitidine 150mg pills oral meloxicam 15mg celecoxib 200mg over the counter

  86. Skfzpy说道:

    buy generic sumatriptan 50mg cost sumatriptan 25mg avodart oral

  87. Hodkjk说道:

    buy generic zyloprim over the counter rosuvastatin medication purchase rosuvastatin online

  88. Hvtgrh说道:

    order allopurinol 100mg generic rosuvastatin pill crestor online buy

  89. Uyfdjw说道:

    nexium order online mirtazapine 30mg pill buy topamax no prescription

  90. Pwnmml说道:

    nexium 20mg canada order esomeprazole 20mg generic purchase topiramate sale

  91. Akkshr说道:

    where to buy azelastine without a prescription order azelastine 10 ml online cheap irbesartan order online

  92. Eflayq说道:

    order azelastine 10ml generic avalide pills order irbesartan 300mg generic

  93. Mgpmqa说道:

    where to buy famotidine without a prescription pepcid 20mg canada order prograf 1mg generic

  94. Heopky说道:

    famotidine 40mg ca buy hyzaar paypal buy tacrolimus without prescription

  95. Dbcvli说道:

    coumadin 2mg uk buy generic paroxetine online maxolon us

  96. Esfbhg说道:

    order orlistat 60mg sale buy asacol 400mg pills diltiazem over the counter

  97. Dsknxd说道:

    buy orlistat 60mg generic purchase diltiazem without prescription brand diltiazem 180mg

  98. Xtqvhm说道:

    order medex without prescription paroxetine 10mg oral order metoclopramide generic

  99. Vuetqd说道:

    buy nortriptyline generic nortriptyline order online paracetamol usa

  100. Jwcizn说道:

    nortriptyline 25mg for sale where to buy methotrexate without a prescription order anacin without prescription

  101. Wysoxq说道:

    buy amaryl 4mg generic how to get etoricoxib without a prescription order arcoxia 60mg pills

  102. Dmorwn说道:

    propranolol usa buy cheap generic motrin buy cheap plavix

  103. Scsxum说道:

    amaryl 1mg pill cytotec over the counter order arcoxia 60mg sale

  104. Hsycph说道:

    purchase inderal generic order ibuprofen 400mg generic order generic clopidogrel 75mg

  105. Yizchi说道:

    fosamax pills colcrys 0.5mg tablet cost macrodantin 100 mg

  106. Rnwptg说道:

    order fosamax pill fosamax uk nitrofurantoin 100mg pills

  107. Xxcxbr说道:

    purchase lioresal pills ketorolac oral ketorolac pills

  108. Arobxq说道:

    buy ozobax tablets baclofen 10mg oral toradol 10mg without prescription

  109. Fvfzbj说道:

    how to get loratadine without a prescription buy claritin pill priligy for sale online

  110. Prpyyg说道:

    loratadine 10mg brand dapoxetine 30mg oral dapoxetine online buy

  111. Kjfmqt说道:

    baclofen 25mg sale ketorolac pills buy ketorolac generic

  112. Rwvuio说道:

    baclofen canada order lioresal generic toradol without prescription

  113. Mtfdmr说道:

    dilantin drug cheap flexeril order ditropan 2.5mg pills

  114. Wslzco说道:

    aceon canada coversum for sale online buy cheap generic allegra

  115. Uzbaxc说道:

    coversum over the counter perindopril 8mg uk allegra online order

  116. Xgzxqu说道:

    dilantin 100 mg ca flexeril sale where to buy oxybutynin without a prescription

  117. Hwlmiu说道:

    buy levitra 20mg for sale where to buy zanaflex without a prescription how to get zanaflex without a prescription

  118. Qzsbcg说道:

    buy vardenafil paypal order tizanidine without prescription purchase tizanidine for sale

  119. Nhahtb说道:

    buy methylprednisolone 8mg online order nifedipine 30mg pill purchase aristocort online

  120. Zzexog说道:

    purchase medrol generic how to buy aristocort triamcinolone 4mg pills

  121. Xaqdea说道:

    clomiphene online order generic azathioprine order azathioprine pill

  122. Maaffn说道:

    buy clomid 100mg without prescription order clomiphene 50mg for sale imuran 25mg oral

  123. Rflzfs说道:

    online roulette game real money slots meaning synthroid without prescription

  124. Ixydal说道:

    best casino games blackjack online free purchase synthroid for sale

  125. Gaoebx说道:

    amantadine us order dapsone brand avlosulfon 100mg

  126. Gkggxk说道:

    buy symmetrel generic symmetrel 100mg for sale purchase avlosulfon

  127. Smrtfi说道:

    casino online roulette real money stromectol where to buy ivermectin 8000 mcg

  128. Wkmpso说道:

    free casino slot games buy generic albuterol for sale albuterol over the counter

  129. Htrmwm说道:

    order pantoprazole online cheap buy zestril generic order pyridium 200 mg online

  130. Qxgult说道:

    buy pantoprazole 20mg generic purchase lisinopril generic pyridium 200mg us

  131. Rvtequ说道:

    hollywood casino online real money strongest over the counter allergy albuterol without prescription

  132. Qlrofg说道:

    best online casinos that payout free blackjack buy furosemide 100mg generic

  133. Dbpfhx说道:

    internet roulette free spins no deposit lasix 100mg oral

  134. Qzeoiz说道:

    azipro 500mg us prednisolone 20mg uk neurontin cheap

  135. Aexijp说道:

    atorvastatin over the counter lipitor 80mg ca norvasc 5mg sale

  136. Guxqtq说道:

    buy lipitor 80mg online cheap buy norvasc generic norvasc price

  137. Fquncw说道:

    order isotretinoin 10mg sale azithromycin 250mg pills buy generic azithromycin for sale

  138. Yrfadd说道:

    accutane 40mg sale isotretinoin 10mg uk zithromax 500mg for sale

  139. Byzimz说道:

    cefdinir without prescription prevacid 15mg price prevacid canada

  140. Nqrcrc说道:

    omnicef drug buy omnicef no prescription buy lansoprazole 15mg sale

  141. Pltjmx说道:

    provigil drug buy cheap generic provigil prednisone 20mg for sale

  142. Aosakj说道:

    order provigil without prescription order promethazine deltasone 40mg over the counter

  143. Ornnms说道:

    cenforce 50mg sale naproxen usa buy chloroquine generic

  144. Bcwwxf说道:

    cenforce 100mg without prescription order cenforce online chloroquine buy online

  145. Ncbcjt说道:

    tadalafil 40mg usa tadalafil cheap viagra 100mg pills for sale

  146. Tobjup说道:

    order telmisartan 20mg generic purchase plaquenil order molnupiravir 200 mg generic

  147. Emdwny说道:

    cheap cialis pill cialis 10mg over the counter sildenafil 50mg brand

  148. Pbppxt说道:

    buy cheap prilosec order singulair without prescription buy generic lopressor 50mg

  149. Evkvvl说道:

    buy cheap generic omeprazole purchase prilosec sale lopressor 100mg us

  150. Ahwnqt说道:

    order generic premarin 600 mg buy dostinex online viagra buy online

  151. Bieszy说道:

    cheap premarin viagra 50mg viagra medication

  152. Lxkoih说道:

    buy betahistine 16 mg sale order haldol 10mg online cheap probalan tablet

  153. Pggqah说道:

    betahistine 16mg drug order haldol 10mg for sale buy probenecid 500mg generic

  154. Ztqdzj说道:

    xalatan ca buy generic xalatan buy rivastigmine 6mg without prescription

  155. Zwhujr说道:

    xalatan canada exelon 3mg uk rivastigmine pills

  156. Cnmmty说道:

    buy generic vasotec over the counter doxazosin 1mg price duphalac for sale online

  157. Glohmg说道:

    purchase enalapril sale doxazosin pills buy duphalac paypal

  158. Kpfpiy说道:

    order mestinon 60mg pills buy piroxicam 20mg for sale maxalt 10mg usa

  159. Pkhdxh说道:

    ferrous sulfate pill order betapace 40mg betapace 40mg usa

  160. Pcqyyg说道:

    ferrous 100mg over the counter order risedronate 35mg pills order betapace 40 mg for sale

  161. Lzjmhl说道:

    pyridostigmine 60 mg without prescription oral maxalt order maxalt sale

  162. Vokvpd说道:

    etodolac 600mg sale colospa 135 mg oral buy generic cilostazol 100mg

  163. Kkmzic说道:

    prasugrel sale order thorazine 100mg pills order detrol 2mg without prescription

  164. Qygmcq说道:

    buy cheap prasugrel chlorpromazine online order tolterodine us

  165. Nugoyp说道:

    etodolac 600 mg cheap colospa canada pletal where to buy

  166. Ocgyjw说道:

    order florinef 100 mcg pills order generic imodium order loperamide 2mg for sale

  167. Ehprvm说道:

    order fludrocortisone 100 mcg online bisacodyl price pill imodium

  168. Reztln说道:

    order dydrogesterone buy januvia 100mg sale jardiance generic

  169. Mffjqe说道:

    buy duphaston 10mg sale buy jardiance online buy generic jardiance 25mg

  170. Sbqfre说道:

    buy meloset 3mg sale danocrine canada buy generic danocrine for sale

  171. Vwlfkf说道:

    dipyridamole 100mg pills order plendil 10mg without prescription buy pravastatin generic

  172. Qfntfe说道:

    purchase dipyridamole pills purchase pravachol sale pravachol order

  173. Hxapxe说道:

    meloset pill buy desogestrel pills for sale buy danocrine sale

  174. Alomtr说道:

    buy aspirin levoflox 250mg pill zovirax over the counter

  175. Tldhrd说道:

    buy aspirin sale purchase imiquad cream imiquad buy online

  176. Gbibef说道:

    purchase acarbose online purchase fulvicin for sale fulvicin 250mg cost

  177. Lyyaui说道:

    order precose 25mg generic prandin 2mg cheap buy fulvicin 250 mg without prescription

  178. Dptebo说道:

    where to buy minoxytop without a prescription order generic cialis erectile dysfunction medicines

  179. Ypbedu说道:

    mintop order online where to buy otc ed pills best pill for ed

  180. Punmbm说道:

    zaditor without prescription tofranil 25mg drug buy tofranil pills

  181. Mtemel说道:

    ketotifen cost buy generic doxepin 75mg buy imipramine online

  182. Hwvocw说道:

    cialis 40mg over the counter purchase sildenafil pill sildenafil pills 100mg

  183. Bdipnt说道:

    tadalafil 10mg ca buy viagra 100mg sale buy sildenafil 100mg

  184. Yjfagg说道:

    order tricor 160mg online cheap cheap fenofibrate fenofibrate 200mg uk

  185. Pfzzpn说道:

    buy cheap generic fenofibrate fenofibrate 200mg sale buy tricor for sale

发表评论

您的电子邮箱地址不会被公开。

CAPTCHAis initialing...