hello all,
its a very deficult situation for me, bcoz i am not expert thats way taking help from u all.
problum :
i m creating a project for commission calculation type
in the form i have one combobox which is filled by ms access database containing parent ID.
these parent ID have there Agent under them and the amount deposited by this parent should be distributed to all the agent also.
for example;
if the parent deposite 100 rs then the total amount should be distributed to 2 agent under their parent as per the %ntg.
i am also filling datagridview like this:

Public Sub Fillteam()
        DataAdapter1 = New OleDbDataAdapter("Select * From agency_reg WHERE" _
                                            & "[parentID] = '" & agid.Text & "' ORDER BY agency_ID", Conn)
        Dim ds As New DataSet
        ds.Clear()
        DataAdapter1.Fill(ds, "agency_reg")
        DGVteam.DataSource = ds.Tables(0)
        DGVteam.Refresh()
    End Sub

the column in datagridview are:
1. agent ID
2. agent name
3. rank
4. percentage
so as per the rank and percentage the amount in the textbox must be calculate.
and is it also possible to save this all calculation to database.
sorry i am very new in programming.if want more information then please tell.
kindly help me fort this.
thanks in advance....("_")

Edited 2 Years Ago by pandeysk_13: add

To clarify my own understanding:

  • The grid contains agents
  • All displayed agents are bound by a single parent
  • The text box contains a total amount tied to the parent
  • Agents must be shared a part of the total amount based on their commission percentage

If all of that is true, where does the amount given to each agent get stored? Is there a column in their record in the database or is it in another table?

Sorry for late response
ur all points are correct,thanx 4 understanding my problem.

By thr way the total record are going to be save in the another table which is having following columns:
AgentId
Agent name
Trans id
Trans date
Commission %
Commission amount
all the data I m getting from database table to textboxs but I m confused for this part.
If the number of agents increase then how can I distribute the %teg of amount to all.
Thanks for ur quick response.

Edited 2 Years Ago by pandeysk_13: add

This article has been dead for over six months. Start a new discussion instead.