Check button screened as many conditions

Check button screened as many conditions

文献种类:专题技术文献
开发工具与关键技术:VS
作者:蛋蛋;
撰写时间:2019/06/15

1. What is the box? CheckBox checkbox control to display,
check box allows the user to select one or more options in a number of choices.
2. First, if multiple (two or more) appears as a multi-criteria to filter box, then how to deal with it?
label class = "col-form- label mr-2" for = "StateID" style = "padding: 5px; margin: 5px;"> Status:
INPUT type = "CheckBox" ID = "StateID" name = "StateType" value = "recovering"> recovery
input type = "checkbox" id = "StateID" name = "StateType" value = " upgrade"> upgrading
input type = "checkbox" id = "StateID" name = "StateType" value = " valid" > effective
input type = "checkbox" id = "StateID" name = "StateType" value = " void"> void
here is a state divided into a different filter condition;
Here Insert Picture Description
renderings above; ID is the same, although there is no guarantee ID is not unique ; however outermost named id = "checkfrom"; condition as a multi-box filters and always different; screening typically drop-down box to select or filter the data input keyword tag inside the filter according to another example of time period ; and because I gave the box with the name ID value is the same name but in the outermost gave a ID;
then the check box to filter it as a condition how?
We first need to declare a global variable (self-named) var AA;
① get the same query var StateType = AA; // state
② not empty judgment data
var = check_StateTypevalue Katex the parse error: the Expected 'the EOF', GOT '#' position AT. 3: ( "INPUT # checkfrom ... (" name among all #ID "input label box)
③ then Analyzing IF (check_StateTypevalue == undefined) {check_StateTypevalue = "";}
④ rendering method and overload; Note: the key here is to StateType: check_StateTypevalue, the left is the right consistency between form controller is followed in the arguments controller code is written with a conventional Lambda expressions like;
state type string so
if {listVIPRename = listVIPRename.Where (m = > m.StateType == StateType) .ToList ((string.IsNullOrEmpty (StateType)!) );}
operator =>, the left is the parameter (if any), the right is the expression or statement!
Here Insert Picture Description
we check to "upgrade" and then click on the Search button in which we first see if the controller breakpoint to get
Here Insert Picture Description
the picture display state It can be obtained; Next we look at the final results, first of all form data
Here Insert Picture Description
Here Insert Picture Description
such as a check box to filter conditions can be achieved!

Guess you like

Origin blog.csdn.net/qq_42577408/article/details/92399624