private bool FilterPasp(object obj) { bool result = true; Rasp dataRas = obj as Rasp; if (!string.IsNullOrWhiteSpace(FilterRasp) && !dataRas.Place.Contains(FilterRasp) && dataRas != null && !dataRas.Day.Contains(FilterRasp) && !dataRas.Teacher.Contains(FilterRasp) && !dataRas.Time.Contains(FilterRasp) && !dataRas.Subject.Contains(FilterRasp) && !dataRas.Type.Contains(FilterRasp)) { return(false); } return(result); }
private void gridtable_SelectionChanged(object sender, SelectionChangedEventArgs e) { Rasp pts = gridtable.SelectedItem as Rasp; registrGANEntities connect = new registrGANEntities(); if (pts != null) { mycls.iddoct = connect.Rasp .Include(x => x.Doctors) .Where(w => w.Doctors.LastName == pts.Doctors.LastName && w.Doctors.FirstName == pts.Doctors.FirstName && w.Doctors.Role == pts.Doctors.Role) .Select(s => s.Doctors.iddoctors) .FirstOrDefault(); mycls.idrasp = connect.Rasp.Where(w => w.Doctors.iddoctors == mycls.iddoct && w.weekday == pts.weekday && w.day == pts.day).Select(s => s.idrasp).FirstOrDefault(); mycls.weekdy = pts.weekday; mycls.daywer = pts.day; } }
public RaspView(string _userid) { Items = CollectionViewSource.GetDefaultView(Rasp.GetDataRas(_userid)); Items.Filter = FilterPasp; }
private void button1_Click(object sender, EventArgs e) { Rasp Login = new Rasp(doc); Login.Show(); }