Пример #1
0
 public static void ButtonSee(UserControls.TableTeacherGroup ttg)
 {
     if (ttg.cmbTeacherNames.SelectedIndex > -1 && ttg.cmbCiclo.SelectedIndex > -1)
     {
         ttg.btnVerNomina.IsEnabled = true;
     }
 }
Пример #2
0
        public static void InitializeCiclo(UserControls.TableTeacherGroup ttg, int teacherID)
        {
            livexEntities context = new livexEntities();
            List <grupo>  lstg    = new List <grupo>();
            List <ciclo>  lstc    = new List <ciclo>();

            lstg = context.grupo.Where(x => x.MaestroID == teacherID).ToList();
            foreach (grupo g in lstg)
            {
                lstc.Add(context.ciclo.FirstOrDefault(x => x.idciclo == g.CicloID));
            }
            //c= context.ciclo.Where(x=>x.idciclo==g.)
            ttg.cmbCiclo.IsEnabled   = true;
            ttg.cmbCiclo.ItemsSource = lstc;
        }
Пример #3
0
        public static void InitializeForm1(UserControls.TableTeacherGroup ttg)
        {
            livexEntities context = new livexEntities();

            List <ciclo> lstCiclo = new List <ciclo>();

            ttg.cmbTeacherNames.ItemsSource       = context.teacher.Select(x => new { x.idteacher, x.teacher_names }).ToList();
            ttg.cmbTeacherNames.DisplayMemberPath = "teacher_names";
            ttg.cmbTeacherNames.SelectedValuePath = "idteacher";

            lstCiclo = context.ciclo.Where(x => x.year == DateTime.Today.Year && x.ciclo_side == "A" || x.ciclo_side == "B").OrderBy(x => x.ciclo_num).ToList();
            List <string> ciclostring = new List <string>();

            foreach (ciclo c in lstCiclo)
            {
                string ciclo = "Ciclo " + c.ciclocol + " del " + c.Fecha_inicio + " al " + c.Fecha_fin;
                ciclostring.Add(ciclo);
            }

            ttg.cmbCiclo.ItemsSource = ciclostring;
        }