/// <summary> /// this is function to make group assignment list from database /// </summary> /// <returns>list of DescriptionDetail</returns> public List <GroupAssignmentList> getGroupAssignments(string groupID) { gpAList.Clear(); List <GroupAssignmentList> groupAssignmentList = new List <GroupAssignmentList>(); int retVal = 0; DataSet ds = Sqlite.ExecuteSQLStatement(Query.getGroupAssignments(groupID), ref retVal); for (int i = 0; i < retVal; i++) { GroupAssignmentList assignmentList = new GroupAssignmentList(); //Description ID if (int.TryParse(ds.Tables[0].Rows[i].ItemArray[0].ToString(), out int id)) { assignmentList.DescId = id; } //create date assignmentList.sDate = ds.Tables[0].Rows[i].ItemArray[1].ToString(); //description name assignmentList.name = ds.Tables[0].Rows[i].ItemArray[2].ToString(); //add to list groupAssignmentList.Add(assignmentList); } return(groupAssignmentList); }
public void addGroupAssignmentList(GroupAssignmentList gal) { gpAList.Add(gal); }