Click here to Skip to main content
15,891,409 members
Home / Discussions / C#
   

C#

 
GeneralRe: couldn't remove controls Pin
netJP12L26-Jul-08 10:46
netJP12L26-Jul-08 10:46 
GeneralRe: couldn't remove controls Pin
Mark Salsbery26-Jul-08 10:51
Mark Salsbery26-Jul-08 10:51 
GeneralRe: couldn't remove controls Pin
Luc Pattyn26-Jul-08 10:54
sitebuilderLuc Pattyn26-Jul-08 10:54 
GeneralRe: couldn't remove controls Pin
Luc Pattyn26-Jul-08 12:59
sitebuilderLuc Pattyn26-Jul-08 12:59 
Questiondatagrid column binding Pin
bfis10813726-Jul-08 8:43
bfis10813726-Jul-08 8:43 
QuestionCounting duplicate entries in an ArrayList Pin
Jacob Dixon26-Jul-08 7:21
Jacob Dixon26-Jul-08 7:21 
AnswerRe: Counting duplicate entries in an ArrayList Pin
Luc Pattyn26-Jul-08 8:10
sitebuilderLuc Pattyn26-Jul-08 8:10 
AnswerRe: Counting duplicate entries in an ArrayList Pin
PIEBALDconsult26-Jul-08 8:20
mvePIEBALDconsult26-Jul-08 8:20 
In a database, right?

If you have a table of Admins (with ID)
and a table of Tickets (with AssignedTo (foreign key to Admin.ID))
then you might do well with something like this to get the list of admins and how many tickets they have:

SELECT Admin.ID
,HowMany=COUNT(Ticket.ID)
FROM Admin
LEFT OUTER JOIN Ticket
ON Admin.ID=Ticket.AssignedTo
GROUP BY Admin.ID
ORDER BY COUNT(Ticket.ID)


You may choose to get only the TOP 1 record.

And you may choose to only query for the ID and not the number of tickets. In which case an ExecuteScalar can be used.

You will need to decide what to do when more than one admin tie for fewest tickets.
GeneralRe: Counting duplicate entries in an ArrayList Pin
Jacob Dixon26-Jul-08 8:37
Jacob Dixon26-Jul-08 8:37 
GeneralRe: Counting duplicate entries in an ArrayList Pin
PIEBALDconsult26-Jul-08 11:18
mvePIEBALDconsult26-Jul-08 11:18 
GeneralRe: Counting duplicate entries in an ArrayList Pin
Jacob Dixon26-Jul-08 12:53
Jacob Dixon26-Jul-08 12:53 
GeneralRe: Counting duplicate entries in an ArrayList Pin
PIEBALDconsult26-Jul-08 18:04
mvePIEBALDconsult26-Jul-08 18:04 
JokeRe: Counting duplicate entries in an ArrayList Pin
Luc Pattyn26-Jul-08 13:18
sitebuilderLuc Pattyn26-Jul-08 13:18 
GeneralRe: Counting duplicate entries in an ArrayList Pin
Jacob Dixon26-Jul-08 13:29
Jacob Dixon26-Jul-08 13:29 
GeneralRe: Counting duplicate entries in an ArrayList Pin
PIEBALDconsult26-Jul-08 17:59
mvePIEBALDconsult26-Jul-08 17:59 
GeneralRe: Counting duplicate entries in an ArrayList Pin
Luc Pattyn26-Jul-08 18:04
sitebuilderLuc Pattyn26-Jul-08 18:04 
GeneralRe: Counting duplicate entries in an ArrayList Pin
PIEBALDconsult26-Jul-08 18:16
mvePIEBALDconsult26-Jul-08 18:16 
GeneralRe: Counting duplicate entries in an ArrayList Pin
Jacob Dixon27-Jul-08 6:40
Jacob Dixon27-Jul-08 6:40 
GeneralRe: Counting duplicate entries in an ArrayList Pin
PIEBALDconsult27-Jul-08 18:03
mvePIEBALDconsult27-Jul-08 18:03 
QuestionBackgroundWorker completes immediately [modified] Pin
#realJSOP26-Jul-08 6:32
mve#realJSOP26-Jul-08 6:32 
AnswerRe: BackgroundWorker completes immediately Pin
Mark Salsbery26-Jul-08 7:21
Mark Salsbery26-Jul-08 7:21 
GeneralRe: BackgroundWorker completes immediately Pin
#realJSOP26-Jul-08 7:27
mve#realJSOP26-Jul-08 7:27 
GeneralRe: BackgroundWorker completes immediately Pin
Mark Salsbery26-Jul-08 8:59
Mark Salsbery26-Jul-08 8:59 
GeneralRe: BackgroundWorker completes immediately Pin
#realJSOP26-Jul-08 10:26
mve#realJSOP26-Jul-08 10:26 
GeneralRe: BackgroundWorker completes immediately Pin
Mark Salsbery26-Jul-08 10:43
Mark Salsbery26-Jul-08 10:43 

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.