static public bool SaveDataPause(Object o, int timeleft, int position, int star) //Tìm nội dung bài tập trong { bool result = false; DTO_Exercise ob = new DTO_Exercise(); ob = o as DTO_Exercise; ob.Position = position; ob.Timeleft = timeleft; ob.Star = star; return(BUS_Exercise.UpdateExercise(ob)); }
public static void getAllExercise(ref ListView lsv) { List <DTO_Exercise> exerciseList = BUS_Exercise.FindAllExercise(); for (int i = 0; i < exerciseList.Count; i++) { ListViewItem ls = lsv.Items.Add((i + 1).ToString()); ls.SubItems.Add(exerciseList[i].ExerciseType); ls.SubItems.Add(exerciseList[i].Title); ls.SubItems.Add(exerciseList[i].Time.ToString()); ls.SubItems.Add(exerciseList[i].Timeleft.ToString()); ls.SubItems.Add(exerciseList[i].Star.ToString()); ls.SubItems.Add(exerciseList[i].Position.ToString()); ls.SubItems.Add(exerciseList[i].FileName); } }