Exemplo n.º 1
0
 public void SortByDep()
 {
     ProjectStruct[] tempNameListt = new ProjectStruct[MyProjectDetailCollection.Count];
     tempNameListt = MyProjectDetailCollection.ToArray();
     string[] tempstringNameList = new string[MyProjectDetailCollection.Count];
     for (int i = 0; i < MyProjectDetailCollection.Count; i++)
     {
         tempstringNameList[i] = MyProjectDetailCollection[i].ProjectStaffDep;
     }
     Array.Sort(tempstringNameList, tempNameListt);
     MyProjectDetailCollection.Clear();
     MyProjectDetailCollection = tempNameListt.ToList();
 }
Exemplo n.º 2
0
 public void SortByName(ref List <ProjectStruct> tempMyProjectDetailCollection)
 {
     ProjectStruct[] tempNameListt = new ProjectStruct[tempMyProjectDetailCollection.Count];
     tempNameListt = tempMyProjectDetailCollection.ToArray();
     string[] tempstringNameList = new string[tempMyProjectDetailCollection.Count];
     for (int i = 0; i < tempMyProjectDetailCollection.Count; i++)
     {
         tempstringNameList[i] = tempMyProjectDetailCollection[i].ProjectStaffName;
     }
     Array.Sort(tempstringNameList, tempNameListt);
     tempMyProjectDetailCollection.Clear();
     tempMyProjectDetailCollection = tempNameListt.ToList();
 }