Click here to Skip to main content
15,903,362 members
Home / Discussions / C#
   

C#

 
Questiononclick event [modified] Pin
netJP12L11-Nov-08 7:14
netJP12L11-Nov-08 7:14 
AnswerRe: onclick event Pin
#realJSOP11-Nov-08 7:20
professional#realJSOP11-Nov-08 7:20 
GeneralRe: onclick event Pin
netJP12L11-Nov-08 8:11
netJP12L11-Nov-08 8:11 
GeneralRe: onclick event Pin
#realJSOP11-Nov-08 8:46
professional#realJSOP11-Nov-08 8:46 
GeneralRe: onclick event Pin
netJP12L11-Nov-08 8:53
netJP12L11-Nov-08 8:53 
AnswerRe: onclick event Pin
ScottM111-Nov-08 20:47
ScottM111-Nov-08 20:47 
QuestionSearch through datatable for item in ListView? Pin
kanchoette11-Nov-08 4:49
kanchoette11-Nov-08 4:49 
QuestionLinq to SQL two combobox [modified] Pin
mutafa8111-Nov-08 4:00
mutafa8111-Nov-08 4:00 
we devlop program for big ISP company
have 3 SQL table
Provider Table [Combobox1]
ID Name
1 prov1
2 prov2
3 Prov3
////
Location Table [Combobox2]
ID Name
1 Loc1
2 Loc2
3 Loc3
////
End_User Table [Listview1]
ID Name Provider_ID Location_ID
1 ab 1 2
2 bc 1 3
3 cd null 1
4 de 2 null
////
Actually we add "All Provider" to provider combo also "All Lcoation" for location combo to get all even null. value for both "All Provider" & "All Location" set to 0

I can get fill listview user with specific provider
like

var user = from s in db.End_User
where s.Provider_ID == comboprov.value...
slect s
foreach(.......

this good if all location slected in comoboboxlocation or nonvalue select)

i need to fill full four condition in this one statement for Linq to sql
A- prov = 2 & Loc = 0(all)
B- prov = 0(all) & loc = 1
c- prov = 1 & loc = -1(nothinselect)
D- prov = -1(nothinselect) & Loc = 3

something like

var user = from s in db.End_User
where s.Provider_ID = {"*" @(if combopro.value == 0) || combopro.value} + {s.Location_ID = {"*" @(if comboloc.value == 0) || combopro.value}
select s.
foreach(.......


Thank you...

modified on Tuesday, November 11, 2008 10:39 AM

QuestionC# dependencies and security Pin
Dirso10-Nov-08 23:07
Dirso10-Nov-08 23:07 
AnswerRe: C# dependencies and security Pin
leppie10-Nov-08 23:51
leppie10-Nov-08 23:51 
GeneralRe: C# dependencies and security Pin
Dirso11-Nov-08 5:31
Dirso11-Nov-08 5:31 
AnswerRe: C# dependencies and security Pin
Thomas Stockwell11-Nov-08 2:44
professionalThomas Stockwell11-Nov-08 2:44 
GeneralRe: C# dependencies and security Pin
Dirso11-Nov-08 5:28
Dirso11-Nov-08 5:28 
Questionhow to get ports using in the local machie Pin
prasadbuddhika10-Nov-08 23:03
prasadbuddhika10-Nov-08 23:03 
AnswerRe: how to get ports using in the local machie Pin
leppie10-Nov-08 23:52
leppie10-Nov-08 23:52 
QuestionCreating forum Pin
B8710-Nov-08 22:20
B8710-Nov-08 22:20 
AnswerRe: Creating forum Pin
Simon P Stevens10-Nov-08 22:27
Simon P Stevens10-Nov-08 22:27 
AnswerRe: Creating forum Pin
Mohammad Dayyan10-Nov-08 22:47
Mohammad Dayyan10-Nov-08 22:47 
GeneralRe: Creating forum Pin
leppie11-Nov-08 0:05
leppie11-Nov-08 0:05 
GeneralRe: Creating forum Pin
Mohammad Dayyan11-Nov-08 0:34
Mohammad Dayyan11-Nov-08 0:34 
GeneralRe: Creating forum Pin
Paul Conrad11-Nov-08 6:17
professionalPaul Conrad11-Nov-08 6:17 
Questionusing System.IO ----- File.Encrypt(); Pin
jas0n2310-Nov-08 22:14
jas0n2310-Nov-08 22:14 
AnswerRe: using System.IO ----- File.Encrypt(); Pin
Guffa10-Nov-08 22:24
Guffa10-Nov-08 22:24 
GeneralRe: using System.IO ----- File.Encrypt(); Pin
jas0n2310-Nov-08 22:41
jas0n2310-Nov-08 22:41 
GeneralRe: using System.IO ----- File.Encrypt(); Pin
N a v a n e e t h10-Nov-08 22:46
N a v a n e e t h10-Nov-08 22:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.