public void ClearActivity() { IsTurnSkipped = false; Role?.ClearActivity(); foreach (var item in ActivityList) { item.Cancel(); } ActivityList.Clear(); }
public void GetActivityPatient() { DBClass.openConnection(); //) CAST(DateOfBirth AS date), convert(Date, DateOfBirth, 23) //select distinct convert(VARCHAR, DataDiagnosis, 23) , NotesDiagnosis, LastNameTherapist from therapists, diagnosis where(diagnosis.IDPatient = '2') and therapists.LastNameTherapist = (select LastNameTherapist from therapists where IDTherapist = '2') DBClass.sql = "select distinct IDActivities, convert(VARCHAR, DateActivity, 23) , ActivityNote, LastNameTherapist " + "from therapists, activities " + "where (activities.IDTherapy = '" + data[0] + "') and therapists.LastNameTherapist = (select LastNameTherapist from therapists where IDTherapist = '2')"; DBClass.cmd.CommandType = CommandType.Text; DBClass.cmd.CommandText = DBClass.sql; DBClass.da = new SqlDataAdapter(DBClass.cmd); DBClass.dt = new DataTable(); DBClass.da.Fill(DBClass.dt); // wyciągamy dane int j = 0; ActivityList.Clear(); using (SqlDataReader reader = DBClass.cmd.ExecuteReader()) { while (reader.Read()) { for (j = 0; j <= reader.FieldCount - 1; j++) // Looping throw colums { data[j] = reader.GetValue(j).ToString(); } if (data[7] == null) { data[7] = ""; } ActivityList.Add(new ActivityModel { IDActivity = (data[0]), DataActivity = data[1], NotesActivity = data[2], LastNameTherapist = data[3] }); //Console.WriteLine("IDTherapist - " + data[7] + data[8]); } } }
public async void LoadAsync() { try { if (IsLoad == true) { return; } IsLoad = true; var result = await _blRouter.GetActivityListAsync(_dateTime); ActivityList.Clear(); foreach (var item in result) { ActivityList.Add(item); } IsLoad = false; } catch (Exception e) { IsLoad = false; } }
public void ClearItems() { ActivityList.Clear(); }
public void ClearSelectedItems() { ActivityList.Clear(); }