Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace COMP2614Assign05
  8. {
  9.  
  10.     // Class to hold a collection of SelectionList
  11.     class ProvinceSelectionList : List<string>
  12.     {
  13.         // method that return a list of Provinces via CustomerRepository from the sql database
  14.         public string Provinces(int index)
  15.         {
  16.             CustomerRepository province = new CustomerRepository();
  17.  
  18.             string provinces = province.GetProvince().ElementAt(index-1); // 0,1,2,3,4 > 1,2,3,4,5
  19.  
  20.             return provinces;
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement