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
buy escitalopram 20mg generic buy naltrexone sale naltrexone oral
buy lasix generic diuretic furosemide pill buy albuterol without a prescription
buy furosemide paypal order albuterol 2mg without prescription cheap albuterol 2mg
buy lexapro naltrexone usa buy revia 50mg
oral strattera buy seroquel for sale brand zoloft 50mg
order strattera 25mg pills order strattera 25mg pills zoloft 50mg drug
order actigall generic order zyban 150mg order cetirizine 5mg generic
order actigall pills bupropion brand buy cetirizine 10mg for sale
order azithromycin 500mg pills prednisolone 5mg without prescription buy gabapentin 600mg pills
zithromax 250mg uk buy omnacortil cheap neurontin ca
safest daily antacid names of anti nausea medication medicine to reduce flatulence
can paracetamol upset your stomach nausea medication list what to take for flatulence
order prednisone 40mg online cheap generic accutane 10mg amoxil 1000mg sale
buy prednisone 20mg amoxicillin without prescription order amoxil 1000mg pills
free online birth control pills buy birth control pills walgreens does muira puama increase semen volume
promethazine pills promethazine price stromectol without prescription
promethazine us stromectol 6mg cost ivermectina online
non bleeding erosive gastropathy treatment nhs treatment for stomach ulcers different types of uti bacteria
what causes duodenal erosion tests to determine stomach ulcers urinary tract infection treatment pharmacy
how to buy duloxetine cymbalta pills provigil 100mg for sale
where can i buy cymbalta order glipizide 5mg generic order modafinil 200mg without prescription
anti fungi tablets without perscriptions tablets for nail fungal infection most popular blood pressure meds
fungus clear fix reviews hsv 2 cure progress blood pressure medication starts with an o
buy periactin 4 mg fluvoxamine for sale generic ketoconazole
daily suppressive herpes medication type 2 diabetes blood test results explained diabetic pill medicine
buy cyproheptadine 4mg online cheap oral luvox 100mg buy nizoral 200 mg online
genital herpes medication costs valacyclovir shingles still spreading latest treatment for diabetics
homeopathic way to quit smoking medication used to treat arthritis buy pain meds online no script needed
buy medroxyprogesterone for sale microzide 25mg cheap buy microzide 25 mg for sale
order medroxyprogesterone without prescription brand biltricide 600 mg order hydrochlorothiazide 25 mg generic
nicorette 12 week quit plan where to buy pain medication online buy painkillers online overnight delivery
buy sleeping tablets online usa fastest weight loss pills buy weight loss medications online
buy femara 2.5 mg online cheap letrozole 2.5mg cost aripiprazole 20mg pill
order femara without prescription buy femara for sale order abilify 30mg online
doxylamine uk over the counter sleeping tablets online shop weight loss medication prescribed online
buy uroxatral 10mg pill best otc heartburn med heartburn after taking antibiotics
buy minocin 50mg generic buy ropinirole pills generic ropinirole
minocin 50mg brand terazosin 5mg brand order ropinirole online cheap
order alfuzosin generic heartburn over the counter remedies cure stomach pain when standing
acne treatment for adults dermatologist acne treatment for adults dermatologist buy oxcarbazepine without a prescription
order catapres 0.1mg pills order meclizine 25mg online tiotropium bromide 9mcg pills
order generic catapres 0.1mg how to get spiriva without a prescription tiotropium bromide 9mcg cheap
acne ointment by prescription only trileptal buy online trileptal 600mg pills
purchase rocaltrol pills tricor 160mg without prescription order tricor 200mg pills
amoxicillin where to buy buy generic amoxicillin for sale buy clarithromycin 250mg generic
order trimox 500mg generic clarithromycin where to buy order clarithromycin 250mg sale
order generic rocaltrol order trandate 100mg online tricor pills
write essay for money no deposit free money calendar poker online for money
term papers writing service air war college essays oral suprax 200mg
i need help with my research paper strtpqbu buy cefixime tablets
academic writing article win money instantly no deposit quick hits free online slots
buy aspirin 75 mg online casino card games casino online usa
buy aspirin 75mg online cheap gambling game online blackjack for money
lamisil order buy terbinafine 250mg without prescription online card games
purchase lamisil sale order terbinafine 250mg pills casino game
desyrel 50mg price purchase clindamycin online clindamycin for sale online
buy trazodone 50mg generic suhagra 100mg sale brand clindac a
generic ceftin order methocarbamol 500mg without prescription buy robaxin
buy generic tadalafil order indomethacin generic buy indomethacin online
order cefuroxime online cheap buy bimatoprost medication robaxin 500mg usa
order tadacip 10mg generic order indomethacin online indocin price
purchase nolvadex online order rhinocort inhalers purchase symbicort inhalers
nolvadex over the counter symbicort over the counter buy budesonide online
order retin gel without prescription oral avana 200mg avanafil buy online
buy retin cream sale buy cheap avanafil avanafil tablet
cleocin online buy sildenafil 100mg sale best non prescription ed pills
buy clindamycin pills buy cleocin 150mg pill top ed drugs
lamotrigine 200mg generic buy lamotrigine 50mg pills buy mebendazole 100mg generic
order lamotrigine 200mg for sale buy prazosin 1mg for sale buy nemazole for sale
cost flagyl 400mg order keflex 125mg without prescription purchase cephalexin pills
order flagyl 400mg without prescription bactrim uk order keflex 500mg
aurogra 50mg without prescription sildenafil medication estradiol sale
buy aurogra without a prescription buy aurogra 50mg pill buy estrace 1mg pills
order diflucan pills baycip over the counter brand ciprofloxacin 1000mg
brand fluconazole 200mg order ampicillin 500mg for sale buy ciprofloxacin 1000mg for sale
buy cheap generic spironolactone aldactone cost order proscar 1mg for sale
how to write an essay about my family buy custom research papers help with writing a research paper
research paper help online need help writing a paper thesis writer
aldactone over the counter buy generic finasteride 5mg purchase propecia sale
purchase tamsulosin pills buy generic tamsulosin 0.4mg zocor 10mg generic
motilium us order coreg 6.25mg sale buy tetracycline sale
buy generic domperidone carvedilol sale order sumycin 250mg pills
flomax 0.4mg oral cost zofran 8mg order simvastatin 20mg sale
zantac pills cheap celebrex 200mg celebrex online buy
order buspar 5mg order cordarone 100mg generic purchase cordarone sale
buspar 5mg canada buspin generic buy amiodarone pills
buy ranitidine 150mg pills oral meloxicam 15mg celecoxib 200mg over the counter
buy generic sumatriptan 50mg cost sumatriptan 25mg avodart oral
buy generic zyloprim over the counter rosuvastatin medication purchase rosuvastatin online
order allopurinol 100mg generic rosuvastatin pill crestor online buy
nexium order online mirtazapine 30mg pill buy topamax no prescription
nexium 20mg canada order esomeprazole 20mg generic purchase topiramate sale
where to buy azelastine without a prescription order azelastine 10 ml online cheap irbesartan order online
order azelastine 10ml generic avalide pills order irbesartan 300mg generic
where to buy famotidine without a prescription pepcid 20mg canada order prograf 1mg generic
famotidine 40mg ca buy hyzaar paypal buy tacrolimus without prescription
coumadin 2mg uk buy generic paroxetine online maxolon us
order orlistat 60mg sale buy asacol 400mg pills diltiazem over the counter
buy orlistat 60mg generic purchase diltiazem without prescription brand diltiazem 180mg
order medex without prescription paroxetine 10mg oral order metoclopramide generic
buy nortriptyline generic nortriptyline order online paracetamol usa
nortriptyline 25mg for sale where to buy methotrexate without a prescription order anacin without prescription
buy amaryl 4mg generic how to get etoricoxib without a prescription order arcoxia 60mg pills
propranolol usa buy cheap generic motrin buy cheap plavix
amaryl 1mg pill cytotec over the counter order arcoxia 60mg sale
purchase inderal generic order ibuprofen 400mg generic order generic clopidogrel 75mg
fosamax pills colcrys 0.5mg tablet cost macrodantin 100 mg
order fosamax pill fosamax uk nitrofurantoin 100mg pills
purchase lioresal pills ketorolac oral ketorolac pills
buy ozobax tablets baclofen 10mg oral toradol 10mg without prescription
how to get loratadine without a prescription buy claritin pill priligy for sale online
loratadine 10mg brand dapoxetine 30mg oral dapoxetine online buy
baclofen 25mg sale ketorolac pills buy ketorolac generic
baclofen canada order lioresal generic toradol without prescription
dilantin drug cheap flexeril order ditropan 2.5mg pills
aceon canada coversum for sale online buy cheap generic allegra
coversum over the counter perindopril 8mg uk allegra online order
dilantin 100 mg ca flexeril sale where to buy oxybutynin without a prescription
buy levitra 20mg for sale where to buy zanaflex without a prescription how to get zanaflex without a prescription
buy vardenafil paypal order tizanidine without prescription purchase tizanidine for sale
buy methylprednisolone 8mg online order nifedipine 30mg pill purchase aristocort online
purchase medrol generic how to buy aristocort triamcinolone 4mg pills
clomiphene online order generic azathioprine order azathioprine pill
buy clomid 100mg without prescription order clomiphene 50mg for sale imuran 25mg oral
online roulette game real money slots meaning synthroid without prescription
best casino games blackjack online free purchase synthroid for sale
amantadine us order dapsone brand avlosulfon 100mg
buy symmetrel generic symmetrel 100mg for sale purchase avlosulfon
casino online roulette real money stromectol where to buy ivermectin 8000 mcg
free casino slot games buy generic albuterol for sale albuterol over the counter
order pantoprazole online cheap buy zestril generic order pyridium 200 mg online
buy pantoprazole 20mg generic purchase lisinopril generic pyridium 200mg us
hollywood casino online real money strongest over the counter allergy albuterol without prescription
best online casinos that payout free blackjack buy furosemide 100mg generic
internet roulette free spins no deposit lasix 100mg oral
azipro 500mg us prednisolone 20mg uk neurontin cheap
atorvastatin over the counter lipitor 80mg ca norvasc 5mg sale
buy lipitor 80mg online cheap buy norvasc generic norvasc price
order isotretinoin 10mg sale azithromycin 250mg pills buy generic azithromycin for sale
accutane 40mg sale isotretinoin 10mg uk zithromax 500mg for sale
cefdinir without prescription prevacid 15mg price prevacid canada
omnicef drug buy omnicef no prescription buy lansoprazole 15mg sale
provigil drug buy cheap generic provigil prednisone 20mg for sale
order provigil without prescription order promethazine deltasone 40mg over the counter
cenforce 50mg sale naproxen usa buy chloroquine generic
cenforce 100mg without prescription order cenforce online chloroquine buy online
tadalafil 40mg usa tadalafil cheap viagra 100mg pills for sale
order telmisartan 20mg generic purchase plaquenil order molnupiravir 200 mg generic
cheap cialis pill cialis 10mg over the counter sildenafil 50mg brand
buy cheap prilosec order singulair without prescription buy generic lopressor 50mg
buy cheap generic omeprazole purchase prilosec sale lopressor 100mg us
order generic premarin 600 mg buy dostinex online viagra buy online
cheap premarin viagra 50mg viagra medication
buy betahistine 16 mg sale order haldol 10mg online cheap probalan tablet
betahistine 16mg drug order haldol 10mg for sale buy probenecid 500mg generic
xalatan ca buy generic xalatan buy rivastigmine 6mg without prescription
xalatan canada exelon 3mg uk rivastigmine pills
buy generic vasotec over the counter doxazosin 1mg price duphalac for sale online
purchase enalapril sale doxazosin pills buy duphalac paypal
order mestinon 60mg pills buy piroxicam 20mg for sale maxalt 10mg usa
ferrous sulfate pill order betapace 40mg betapace 40mg usa
ferrous 100mg over the counter order risedronate 35mg pills order betapace 40 mg for sale
pyridostigmine 60 mg without prescription oral maxalt order maxalt sale
etodolac 600mg sale colospa 135 mg oral buy generic cilostazol 100mg
prasugrel sale order thorazine 100mg pills order detrol 2mg without prescription
buy cheap prasugrel chlorpromazine online order tolterodine us
etodolac 600 mg cheap colospa canada pletal where to buy
order florinef 100 mcg pills order generic imodium order loperamide 2mg for sale
order fludrocortisone 100 mcg online bisacodyl price pill imodium
order dydrogesterone buy januvia 100mg sale jardiance generic
buy duphaston 10mg sale buy jardiance online buy generic jardiance 25mg
buy meloset 3mg sale danocrine canada buy generic danocrine for sale
dipyridamole 100mg pills order plendil 10mg without prescription buy pravastatin generic
purchase dipyridamole pills purchase pravachol sale pravachol order
meloset pill buy desogestrel pills for sale buy danocrine sale
buy aspirin levoflox 250mg pill zovirax over the counter
buy aspirin sale purchase imiquad cream imiquad buy online
purchase acarbose online purchase fulvicin for sale fulvicin 250mg cost
order precose 25mg generic prandin 2mg cheap buy fulvicin 250 mg without prescription
where to buy minoxytop without a prescription order generic cialis erectile dysfunction medicines
mintop order online where to buy otc ed pills best pill for ed
zaditor without prescription tofranil 25mg drug buy tofranil pills
ketotifen cost buy generic doxepin 75mg buy imipramine online
cialis 40mg over the counter purchase sildenafil pill sildenafil pills 100mg
tadalafil 10mg ca buy viagra 100mg sale buy sildenafil 100mg
order tricor 160mg online cheap cheap fenofibrate fenofibrate 200mg uk
buy cheap generic fenofibrate fenofibrate 200mg sale buy tricor for sale