Пример #1
0
        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);
        }
Пример #2
0
        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;
            }
        }
Пример #3
0
 public RaspView(string _userid)
 {
     Items        = CollectionViewSource.GetDefaultView(Rasp.GetDataRas(_userid));
     Items.Filter = FilterPasp;
 }
Пример #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            Rasp Login = new Rasp(doc);

            Login.Show();
        }