Mechanism for matching (assigning) Job Applicants to Jobs - Three tables involved. ASP.NET 2.0, SQL, VB

What's a good way to match Job Applicants TO Job Titles AT Work Sites?

I'm Using:  
SQL Server 2000, VS2005/VB.NET, .NET 2.0 to create a Windows Form application.

I Have: Three Tables;  
APPLICANTS (pkApplicantID, fkJobTitleID,fkWorksiteID,Name, City),
JOBTITLES (pkJobTitleID, fkWorksiteID, JobTitle, int_#OfPositions)
WORKSITES (pkWorksiteID, City)

I've tried:  
Three DataGridViews on the Windows Form, one for each Table so the user can see the Applicant's Name and (address) City, the list of Job Titles and how many Positions are available, and the Work Site (location) City.

And a ComboBox with the following databound settings:
Data Source: JobTitlesBindingSource
Display Member: JobTitle
Value Member: pkJobTitleID
Selected Value: ApplicantBindingSource - fkJobTitleID

What works:
I can scroll around in the Job Titles and click on an Applicant in the DataGridView and when I leave the row of the Applicant record the fkJobTitleID will update to the currently selected pkJobTitleID of the Job Title DataGridView.  

What doesn't work:
Save Data is not hooked up, so my updates are not written back to the database.  
I wasn't able to get the BindingNavigator to be automatically added to the form when I added the DataGridView like it was on the "Tab" below.

Something somewhere else that's related that works:
I have another set of DataGridViews for assigning a Job Coach or "Monitor" to a Worksite.  On that "Tab" I have the two DataGridVies, the ComboBox linking them on the keyMonitorID and a BindingNavigator with a "Save" button.  This works similarly to the other one.

My thoughts:
This is very cumbersome and I don't think it's a very good interface for what I'm trying to do, but I have no experience in this area and am just experimenting with methods.

What I'm trying to do:
Make a user interface to match a table full of Job Applicants to a table full of Jobs (in a table by Job Title and number of positions available for that title at a particular Worksite (a third table)).

My previous programming experience: A little HTML and very little VBA.

My deadline:  Monday (two days away)

Main questions:  
1.  Is there a better way to do this?
2.  Are there any examples available I could use to go by?

Thanks in advance for any suggestions and advice.  Some code samples wouldn't hurt either. ;-)
Who is Participating?
Make a datagrid of the applicanst. Add a template field to the grind. Add a dropdown to the template field. Bind that dropdown to a list if Jobs/Job IDs. To bind you'll probably have to use the databind event of the grid and populate the dropdown there. it would be best to create an array or even an XML file of the job list data, and then use that as the source for the dropdown.
megninAuthor Commented:
The largest table is the APPLICANTS table and it has only about 1700 records.  I'm just learning, so although I want to know the "best" way to do it, I'm under a short timeline, so for now I think the "easiest" way is what I need.
I wouldn't know where to begin to create an array or XML file of the job list data.  So if I can bind right to the table I think I'd rather do that right now.  Mostly due to my lack of more advanced experience and not enough time for this project to learn to do it right.

If any of the steps you outlined will not be evident to a beginner once I get started, could you point out details where I might get lost if I'm not familiar with the tools you mentioned?

Thanks for your help!

megninAuthor Commented:
Okay.  I've looked and looked.  I give up.  How do you add a template field to the DataGridView?
I did mention that I'm using .NET 2.0, right?  You said "Make a datagrid"  Wasn't "datagrid" in .Net 1.0? In .Net 2.0 it's now a DataGridView and that's what I'm using.  I just assumed that was what you meant and was just calling it by the old name out of habbit.

I couldn't find anything in VS2005 in the control properties or the little arrow on the control it's self or via a Google search on how to add a template field, other than adding it programatically.

In case you still need it here is an example from ASP.Net 2, You can see ASP:Label controls in this grid. Just use a dropdown control in place of the label control. You probably have to loop trough the grid rows to populate each drop down.:

                            <asp:GridView ID="dgMain" runat="server" AutoGenerateColumns="False" DataKeyNames="Report_ID" CellPadding="1" ForeColor="#333333" GridLines="Vertical" Width="100%" AllowSorting="True" PageSize="50" BorderColor="Transparent" BorderStyle="Solid" BorderWidth="2px" RowHeaderColumn="report_ID" CssClass="label">
                                    <asp:BoundField DataField="report_ID" SortExpression="report_ID" HeaderText="Report_ID" >
                                        <ItemStyle HorizontalAlign=Left VerticalAlign=Top Wrap=False />
                                    <asp:TemplateField HeaderText="Type" SortExpression="Type">
                                        <ItemStyle HorizontalAlign=Left VerticalAlign=Top Wrap=False />
                                            <asp:Label ID="lbl_dgType" runat="server" Text='<%# Bind("shorttype") %>' tooltip='<%# Bind("type") %>'></asp:Label>
                                    <asp:TemplateField HeaderText="Completed" SortExpression="Completiondate">
                                        <ItemStyle HorizontalAlign=Right VerticalAlign=Top Wrap=False />
                                            <asp:Label ID="lbl_dgCompleted" runat="server" Text='<%# Bind("cdate") %>'></asp:Label>
                                        <ItemStyle HorizontalAlign=Left VerticalAlign=Top Wrap=False />
                                            <asp:LinkButton CssClass="button" PostBackUrl='<%# "input.aspx?rid=" & Eval("report_ID") %>' ID="hplEdit" runat="server" NavigateUrl='<%# "input.aspx?rid=" & Eval("report_ID") %>'
                                                Text="edit" ToolTip="Edit Report Properties / Upload Report Files"></asp:LinkButton>
                                    <asp:TemplateField HeaderText="Title" SortExpression="Title">
                                        <ItemStyle HorizontalAlign=Left VerticalAlign=Top />
                                            <asp:HyperLink ID="hplTitle" runat="server" NavigateUrl='<%# "details.aspx?rid=" & Eval("report_ID") %>'
                                                Text='<%# Eval("Title") %>'></asp:HyperLink>
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <RowStyle BackColor="#F7F6F3" Font-Size="Small" ForeColor="#333333" />
                                <EditRowStyle BackColor="#999999" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <PagerStyle HorizontalAlign="Center" />
                                <HeaderStyle BackColor="White" Font-Bold="True" Font-Size="X-Small" ForeColor="DimGray" VerticalAlign="Middle" />
                                <AlternatingRowStyle BackColor="White" Font-Size="Small" ForeColor="#284775" />
                                    <asp:Label ID="lbl_EmptyDataGrid" runat="server" CssClass="validation" Text="No Data Returned"></asp:Label>
Also, to update the dropdown in the grid you loop through the grid and find each drop down in each row and set the valeu. This code does it for checkboxes in an ASP.Net 1.1 datagrid. But, you would likely need something similar. Though I haven't tries this in 2.0:

                Dim iRow
                With users_grid
                    If SelectAll_chk.Checked Then
                        For iRow = 0 To .Items.Count - 1
                            .SelectedIndex = iRow
                            CType(.Items(iRow).Cells(1).Controls(0).FindControl("select_chk"), CheckBox).Checked() = True
                        SelectAll_chk.Text = "Deselect All"
                        For iRow = 0 To .Items.Count - 1
                            .SelectedIndex = iRow
                            CType(.Items(iRow).Cells(1).Controls(0).FindControl("select_chk"), CheckBox).Checked() = False
                        SelectAll_chk.Text = "Select All"
                    End If
                End With
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.