CSIS Programming Assignment 4 Instructions
You have been asked to provide a program to the church that provides a resource for a list of Sunday school prospects. The information they have is stored in a text file. Each record of the file contains the last name, first name, the age of the prospect, and the potential Sunday School class. When the application opens, the program should display all of this data in a datagridview control. The user should have the option of sorting the data in ascending order or descending order by the last name using radio buttons. The user should be provided the ability to input a Sunday School name to retrieve the full list of prospects for that class. When a search is made a list of scheduled visit dates will appear in the listbox to the user. Each class has assigned weeks.
[Note: You should make the columns large enough to display all of the information. To do this, set the AutoSizeColumnsModeproperty to “All Cells”.]
Requirements:
- The text file, visitation.txt is included in your Instructions folder and should be stored in your project’s bin\debug folder.
- ****This step must be included for your assignment to be accepted. You must include three other rows in the file that include your name, your instructor’s name, and another name with the appropriate data
- Read the values of the text file into an array.
- Use LINQ queries to separate the lines of the text file into their own fields and display these values in a datagridview control. You will find it useful to set the datasource property of the datagridview control to the results of your LINQ query.
- When the user clicks on the Ascending radio button or the Descending radio button, use LINQ queries to sort the array in ascending or descending order by last name and re-display your results in the same datagridview control.
- When the user clicks on the close button, the application closes.
- When the user clicks on the Search menu, the user is prompted with an input box. The program will prompt the user for the name of the Sunday School group. The program will check to see if there is an entry. If there is not an entry the program will produce and error and will not continue. The program will check to see if it is one of the 4 SS groups and if it is not it will produce and error and not continue. Once the error checking is complete the program will display only the SS group for the name entered in the Datagrid. The program will also determine the dates for the upcoming visits. Each class has set weeks to visit. See the chart below. The application will present the next 5 scheduled visits in the listbox using a for/next loop. For example, if the Jones class is scheduled to visit on 10/24 their next visit will not be for 3 more weeks on 11/14.
Name |
Week |
Pender |
1 |
Smith |
2 |
Jones |
3 |
Barnes |
4 |
- The program will provide a sub that will be called and will tally the count of the rows of the datagrid each time a new query is done.
- The form should open with Ascending radio button set.
As in all of your assignments, make sure that you have used appropriate programming techniques (i.e. naming of controls and variables, form has a title, internal documentation/comments are clear.)
This assignment is due by 11:59 p.m. (ET) on Monday of Module/Week 4.
Visitation Text
Smith,Micheal,42,Pender
Jones,Brittany,55,Smith
Pease,Wallace,35,Jones
Smith,John,40,Pender
Johnson,Mary,25,Barnes
Todd,Barbara,37,Jones
Thomas,Carl,29,Jones
Callahand,Rob,45,Pender
Garcia,Joan,42,Pender
Huff,Albert,33,Jones
Davis,Sarah,60,Smith
Ross,Ashley,20,Barnes
Reyes,Adan,27,Barnes