Home Incorporate Custom "OR" and "AND" filters in Asp.net MVC
Reply: 0

Incorporate Custom "OR" and "AND" filters in Asp.net MVC

faux
1#
faux Published in 2017-09-14 05:48:41Z

I have Two filters 1st Filter as Gender with values (Male,Female), and 2nd Filter as SEC with values (A,B,C). We usually assign Filters to users so that filters to them is restricted.

I had 2 approach

1)OR Filteration because user can select any filter

Suppose I assign Gender with values (Male), and SEC with values (A,B)

I save in sql server as various combinations

Gender | SEC

Male | A

Male | B

and disable filters Gender-Female and SEC-C

If the user selects Gender- Male and SEC-A I check in database table and check is there a entry I give user access to resources.

2)AND Filteration because user can select Specific filter.eg he can select only Gender-Male and SEC-B ..not other filters.

Suppose I assign Gender with values (Male), and SEC with values (A,B)

I save in sql server as comma separated values.

Gender | SEC

Male | A,B

and disable filters Gender-Female and SEC-C

If the user selects only Gender- Male and SEC-A,B I check in database table and check ....and not individual filter as Gender-Male. is there a entry I give user access to resources.

Now the problem is I want to incorporate these 2 approaches in my Application.

Please help me in this.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.439257 second(s) , Gzip On .

© 2016 Powered by cudou.com design MATCHINFO