Example #1
0
 public EmployeeViewModel()
 {
     employeeInfo = new ObservableCollection <Employee>();
     for (int i = 0; i < EmployeeNames.Count(); i++)
     {
         var employee = new Employee();
         employee.EmployeeName  = EmployeeNames[i];
         employee.ContactNumber = random.Next(720, 799).ToString() + " - " + random.Next(3010, 3999).ToString();
         employee.Level         = "Level - " + random.Next(1, 5).ToString();
         employee.Designation   = Desgination[random.Next(0, 19)];
         employee.EmployeeImage = ImageSource.FromResource("MultiLevelGrouping.Images.Image" + random.Next(0, 28) + ".png");
         employeeInfo.Add(employee);
     }
 }
 public EmployeeViewModel()
 {
     employeeInfo = new ObservableCollection <Employee>();
     for (int i = 0; i < EmployeeNames.Count(); i++)
     {
         var employee = new Employee();
         employee.EmployeeName  = EmployeeNames[i];
         employee.DisplayString = employee.EmployeeName[0].ToString();
         employee.ContactNumber = random.Next(720, 799).ToString() + " - " + random.Next(3010, 3999).ToString();
         var groupdata = new GroupingData();
         groupdata.Level         = random.Next(1, 5);
         groupdata.Designation   = Desgination[groupdata.Level];
         groupdata.EmployeeImage = ImageSource.FromResource("GroupingMultipleData.Images.Image" + groupdata.Level + ".png");
         groupdata.GroupingImage = ImageSource.FromResource("GroupingMultipleData.Images.Grouping.png");
         employee.GroupingData   = groupdata;
         employeeInfo.Add(employee);
     }
 }