Ejemplo n.º 1
0
        public void CmbFill()
        {
            try
            {
                List <string> lstStr  = new List <string>();
                DAWords       daWords = new DAWords();

                DataTable dt = daWords.GetAllLettersLst();
                lstStr.Add("בחר אותיות לבחינה");

                foreach (DataRow dr in dt.Rows)
                {
                    lstStr.Add(dr["startingLet"].ToString());
                }

                cmbLetters.ItemsSource = lstStr;
                // cmbLetters.SelectedIndex = 0;
                //*****************Difflvl**************************

                List <string> lstDif = new List <string>();
                DADiffLevel   daDiff = new DADiffLevel();

                DataTable dtdiff = daDiff.GetDiffLevelData();


                cmbDiffLvl.ItemsSource = DiffLevel.GetLstFromDb();
            }
            catch (Exception ex)
            {
                Globals.GetExData("CmbFill", "Frmmain", ex);
            }
        }
Ejemplo n.º 2
0
        public static List <DiffLevel> GetLstFromDb()
        {
            List <DiffLevel> Reslst = new List <DiffLevel>();

            DADiffLevel daDiff = new DADiffLevel();

            DataTable dt;

            dt = daDiff.GetDiffLevelData();
            foreach (DataRow dr in dt.Rows)
            {
                int tempid = 0;
                int.TryParse(dr["id"].ToString(), out tempid);
                Reslst.Add(new DiffLevel(tempid, dr["diff"].ToString()));
            }



            return(Reslst);
        }