Going Insane!!!

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Sep 2007
Posts: 8
Reputation: partyanimal is an unknown quantity at this point 
Solved Threads: 0
partyanimal partyanimal is offline Offline
Newbie Poster

Going Insane!!!

 
0
  #1
Sep 14th, 2007
I have been asked to create a system where that can rate colleagues with colours

the colours are as follows starting with the highest first

Gold
Silver
Bronze
Blue
Orange
Black

the colleagues all will start on Orange.

now the tricky part.

If the colleague sells a quantity of 4 a week and had 0 or 1 rejects then he goes up to Blue and so on

But if the colleague sells a quatity of 4 and had 2 rejects then he stays on that colour

if the colleague gets up to silver they need to sell 6 and have 0 rejects to get up to gold.

but if they get any rejects they go back to silver.

ANYONE WITH ANY IDEAS HOW TO DO THIS would be gratefully helpful.

Thanks.

Andy.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 85
Reputation: williamrojas78 is an unknown quantity at this point 
Solved Threads: 4
williamrojas78's Avatar
williamrojas78 williamrojas78 is offline Offline
Junior Poster in Training

Re: Going Insane!!!

 
0
  #2
Sep 14th, 2007
Hi

Probably the easiest is to use a datagrid; then you will have to compare the number of sales of the week and change the row accordingly.

Who is going to be inputting the data of the number of sales per peron? probably tat wil be the tricky part.

Hope it helps
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 8
Reputation: partyanimal is an unknown quantity at this point 
Solved Threads: 0
partyanimal partyanimal is offline Offline
Newbie Poster

Re: Going Insane!!!

 
0
  #3
Sep 14th, 2007
Originally Posted by williamrojas78 View Post
Hi

Probably the easiest is to use a datagrid; then you will have to compare the number of sales of the week and change the row accordingly.

Who is going to be inputting the data of the number of sales per peron? probably tat wil be the tricky part.

Hope it helps
how would you code a datagrid to do that???
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: Going Insane!!!

 
0
  #4
Sep 14th, 2007
Have you not been given any training at all?

Do you know how to use Visual Studio to start a project?

Your first task before you code anything is to identify the objects. They become your classes the first obvious one is 'Colleague' do you know how to create a class in VB.NET?
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 82
Reputation: preetham.saroja is an unknown quantity at this point 
Solved Threads: 1
preetham.saroja's Avatar
preetham.saroja preetham.saroja is offline Offline
Junior Poster in Training

Re: Going Insane!!!

 
0
  #5
Sep 14th, 2007
to code in datagrid...
just drag& drop it from toolbox& to colour the datagrid based on the there sales(with orange,green,yellow...etc).use datagrid_itemdatabound function....
--------------------------write this code in pageload& just drop datagrid on form,,,
Private Sub LoadData()
Dim strSQL As String = "SELECT * FROM table1 order by ID "
Dim cnn As String = ConfigurationSettings.AppSettings("preeconn")
Dim cmd As New SqlCommand(strSQL, New SqlConnection(cnn))
cmd.Connection.Open()
Dim myCommand As New SqlDataAdapter(strSQL, cnn)
Dim ds As New DataSet
myCommand.Fill(ds, "table1")
datagrid1.DataSource = cmd.ExecuteReader
Dim sumTotal As Integer
sumTotal = ds.Tables(0).Compute("SUM(Age)", String.Empty).ToString
datagrid1.Columns(2).FooterText = "TOTAL: "
datagrid1.Columns(3).FooterText = sumTotal
datagrid1.DataBind()
cmd.Connection.Close()
cmd.Connection.Dispose()
End Sub

--------------And for datagrid_itemdatabound...then use this function..manipulate the functions based on ur requirements,,,

ProtectedSub datagrid1_itemdatabound(ByVal sender AsObject, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles datagrid1.ItemDataBound
If (e.Item.ItemType = ListItemType.Item) Or (e.Item.ItemType = ListItemType.AlternatingItem) Then
Dim value AsString = Trim(e.Item.DataItem("Sex"))
If Len(value) = 4 Then
e.Item.BackColor = System.Drawing.Color.Chocolate ' i is the index of the particular column
' 'e.Item.Cells(4).Text = "hai"
End If
End If
------------------if u have any prblm,just scrap it over here& w will solve it.....
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC