Showing posts with label summary. Show all posts
Showing posts with label summary. Show all posts

Saturday, March 24, 2012

summary dilemma

hey all,
i was wondering how you would do this.
i have a webform with a summary page on it. The summary page tells you the
followng:
# of Employees Unchanged
# of Employees Underwriting
# of Employees Approved
On the bottom of the summary table is a grid of employees. initially, i load
all employees for a particular department the viewer belongs to. if the
viewer is an admin the summary table will reflect all employees in all
departments.
the way i have it now is if the viewer is an admin i go ahead and get all
the employees in all departments and load into a dataset. what if there were
8,000? would this be the most efficient way to get the summary table updated
?
my opinion is no but not sure of any other way to do it.
thanks,
rodcharFor the summary table I would use aggregate functions in the SQL
I'm assuming approved and underwriting are bit fields
SELECT SUM(CASE WHEN underwriting = 0 THEN 0 ELSE 1 END) AS
underwritingTotal,
SUM(CASE WHEN approved= 0 THEN 0 ELSE 1 END) AS approvedTotal
FROM employee
Thats the quickest way to do the summary. You probably won't want to show
all 8000 employees on the one page (maybe a paged GridView)
Jon
"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:AD0F63A5-9AA2-41CA-A096-CF5795631BD3@.microsoft.com...
> hey all,
> i was wondering how you would do this.
> i have a webform with a summary page on it. The summary page tells you the
> followng:
> # of Employees Unchanged
> # of Employees Underwriting
> # of Employees Approved
> On the bottom of the summary table is a grid of employees. initially, i
> load
> all employees for a particular department the viewer belongs to. if the
> viewer is an admin the summary table will reflect all employees in all
> departments.
> the way i have it now is if the viewer is an admin i go ahead and get all
> the employees in all departments and load into a dataset. what if there
> were
> 8,000? would this be the most efficient way to get the summary table
> updated?
> my opinion is no but not sure of any other way to do it.
> thanks,
> rodchar
thank you that makes sense.
"Jon" wrote:

> For the summary table I would use aggregate functions in the SQL
> I'm assuming approved and underwriting are bit fields
> SELECT SUM(CASE WHEN underwriting = 0 THEN 0 ELSE 1 END) AS
> underwritingTotal,
> SUM(CASE WHEN approved= 0 THEN 0 ELSE 1 END) AS approvedTotal
> FROM employee
> Thats the quickest way to do the summary. You probably won't want to show
> all 8000 employees on the one page (maybe a paged GridView)
> Jon
> "rodchar" <rodchar@.discussions.microsoft.com> wrote in message
> news:AD0F63A5-9AA2-41CA-A096-CF5795631BD3@.microsoft.com...
>
>

summary dilemma

hey all,

i was wondering how you would do this.

i have a webform with a summary page on it. The summary page tells you the
followng:
# of Employees Unchanged
# of Employees Underwriting
# of Employees Approved

On the bottom of the summary table is a grid of employees. initially, i load
all employees for a particular department the viewer belongs to. if the
viewer is an admin the summary table will reflect all employees in all
departments.

the way i have it now is if the viewer is an admin i go ahead and get all
the employees in all departments and load into a dataset. what if there were
8,000? would this be the most efficient way to get the summary table updated?
my opinion is no but not sure of any other way to do it.

thanks,
rodcharFor the summary table I would use aggregate functions in the SQL
I'm assuming approved and underwriting are bit fields

SELECT SUM(CASE WHEN underwriting = 0 THEN 0 ELSE 1 END) AS
underwritingTotal,
SUM(CASE WHEN approved= 0 THEN 0 ELSE 1 END) AS approvedTotal
FROM employee

Thats the quickest way to do the summary. You probably won't want to show
all 8000 employees on the one page (maybe a paged GridView)

Jon

"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:AD0F63A5-9AA2-41CA-A096-CF5795631BD3@.microsoft.com...
> hey all,
> i was wondering how you would do this.
> i have a webform with a summary page on it. The summary page tells you the
> followng:
> # of Employees Unchanged
> # of Employees Underwriting
> # of Employees Approved
> On the bottom of the summary table is a grid of employees. initially, i
> load
> all employees for a particular department the viewer belongs to. if the
> viewer is an admin the summary table will reflect all employees in all
> departments.
> the way i have it now is if the viewer is an admin i go ahead and get all
> the employees in all departments and load into a dataset. what if there
> were
> 8,000? would this be the most efficient way to get the summary table
> updated?
> my opinion is no but not sure of any other way to do it.
> thanks,
> rodchar
thank you that makes sense.

"Jon" wrote:

> For the summary table I would use aggregate functions in the SQL
> I'm assuming approved and underwriting are bit fields
> SELECT SUM(CASE WHEN underwriting = 0 THEN 0 ELSE 1 END) AS
> underwritingTotal,
> SUM(CASE WHEN approved= 0 THEN 0 ELSE 1 END) AS approvedTotal
> FROM employee
> Thats the quickest way to do the summary. You probably won't want to show
> all 8000 employees on the one page (maybe a paged GridView)
> Jon
> "rodchar" <rodchar@.discussions.microsoft.com> wrote in message
> news:AD0F63A5-9AA2-41CA-A096-CF5795631BD3@.microsoft.com...
> > hey all,
> > i was wondering how you would do this.
> > i have a webform with a summary page on it. The summary page tells you the
> > followng:
> > # of Employees Unchanged
> > # of Employees Underwriting
> > # of Employees Approved
> > On the bottom of the summary table is a grid of employees. initially, i
> > load
> > all employees for a particular department the viewer belongs to. if the
> > viewer is an admin the summary table will reflect all employees in all
> > departments.
> > the way i have it now is if the viewer is an admin i go ahead and get all
> > the employees in all departments and load into a dataset. what if there
> > were
> > 8,000? would this be the most efficient way to get the summary table
> > updated?
> > my opinion is no but not sure of any other way to do it.
> > thanks,
> > rodchar
>

Summary of data in ASP.NET

hello

i am pretty new to asp.net and would like advice on how to best summarise data from an sql server database.

i have some data in a table, each record containing someones name and a 'type' field (contains positive or negative) among other stuff . i need to summarise the count of how many times a persons name appears in the table and display how many positive/negative entries there are.

i've used VB6 and VBA for ages and know how to do this by stepping through recordsets etc but want to know what the best approach is in ADO.NET, i'm still trying to get my head round data readers, datassets, data adapters, data tables etc.

any help is greatly appreciated
thanks
mickThis aggregation would probably be best left to your SQL engine of choice.

Based on the table:

PersonName varchar(50)
Active bit

With the values

PersonName Active
Tom 0
Tom 0
Tom 1
Jane 1
Jim 0

The query:

SELECT PersonName, COUNT(PersonName) HitCount, Active
FROM Person
GROUP BY PersonName, Active
ORDER BY PersonName

Should result in:

PersonName HitCount Active
Jane 1 1
Jim 1 0
Tom 2 0
Tom 1 1

From here, any tutorial on querying a database via SQL (a data reader should be fine) should apply.
thanks very much.

Summary Tags in reference.cs

Anyone know how to make my web services add summary tags to the reference.cs file VS makes when the web service is referenced?You'll have to add that yourself each time you reference the web service, as that CS file is a proxy file generated for you.
You'll have to add that yourself each time you reference the web service, as that CS file is a proxy file generated for you.
But I'm writing the web service, I want intellisense to work on client's machines when they develop solutions that use my web service. So they will need <summary> tags in reference.cs.
I know I can have Description lines in the wsdl file, but it is not the easiest thing to read.
Guess MS & W3 haven't thought it out yet.

Summary text doesn't work

I've created a summary text for a method of a class, but it doesn't
appear whem i add it to another project, i can see it only in the same
project.
Thanks
PietroTake a look at this:
http://dotnet.mvps.org/dotnet/faqs/...ntation&lang=en
XML comments (like all comments) aren't part of a .dll (otherwise the .dll
would bloat in size). As such, as for as your other application is
concerned, there is no summary text. One would think that you could use
the DescriptionAttribute, but this unfortunetly doens't work for
intellisense (just th properties window). The above link shows how to hook
the outputted xml file from the original source to the dll you are
referecing in yoru other project...thus preserving the summary information.
karl
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Pietro" <piefox@.uol.com.br> wrote in message
news:eCkWOOPQFHA.3296@.TK2MSFTNGP15.phx.gbl...
> I've created a summary text for a method of a class, but it doesn't
> appear whem i add it to another project, i can see it only in the same
> project.
> Thanks
> Pietro

Summary text doesnt work

I've created a summary text for a method of a class, but it doesn't
appear whem i add it to another project, i can see it only in the same
project.

Thanks
PietroTake a look at this:
http://dotnet.mvps.org/dotnet/faqs/...ntation&lang=en

XML comments (like all comments) aren't part of a .dll (otherwise the .dll
would bloat in size). As such, as for as your other application is
concerned, there is no summary text. One would think that you could use
the DescriptionAttribute, but this unfortunetly doens't work for
intellisense (just th properties window). The above link shows how to hook
the outputted xml file from the original source to the dll you are
referecing in yoru other project...thus preserving the summary information.

karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Pietro" <piefox@.uol.com.br> wrote in message
news:eCkWOOPQFHA.3296@.TK2MSFTNGP15.phx.gbl...
> I've created a summary text for a method of a class, but it doesn't
> appear whem i add it to another project, i can see it only in the same
> project.
> Thanks
> Pietro