コード例 #1
0
 public override String AddContraint(String query)
 {
     try
     {
         String mot    = "langue";
         String langue = Utils.FindWord(query, mot);
         if (langue != null ? langue.Trim().Length > 0 : false)
         {
             int idx = Utils.Occurence(langue, '.');
             if (idx > 1)
             {
                 query = query.Replace("WHERE", "INNER JOIN " + Langue.ToTable() + " lang ON " + Utils.FindNextWord(query, ToTable()) + "langue = lang.id WHERE");
                 idx   = langue.IndexOf(mot);
                 if (idx > -1)
                 {
                     idx   = (langue.Substring(0, idx) + "" + langue.Substring(idx, mot.Length)).Length;
                     query = query.Replace(langue, "lang" + langue.Substring(idx, langue.Length - idx));
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Messages.Exception("GroupeMatiere (AddContraint) ", ex);
     }
     return(query);
 }
コード例 #2
0
ファイル: Form_Dictionnaire.cs プロジェクト: dowesw/Scolaris
        private void LoadLangue()
        {
            List <Langue> langues = new LangueBLL().List("select * from " + Langue.ToTable());

            com_langue.DisplayMember = "Reference";
            com_langue.ValueMember   = "Id";
            com_langue.DataSource    = new BindingSource(langues, null);

            foreach (Langue l in langues)
            {
                com_langue.AutoCompleteCustomSource.Add(l.Reference);
            }
            com_langue.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            com_langue.AutoCompleteSource = AutoCompleteSource.CustomSource;

            com_langue_search.Items.Clear();
            com_langue_search.Items.Add("---");
            foreach (Langue l in langues)
            {
                com_langue_search.Items.Add(l.Reference);
                com_langue_search.AutoCompleteCustomSource.Add(l.Reference);
            }
            com_langue_search.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            com_langue_search.AutoCompleteSource = AutoCompleteSource.CustomSource;
        }
コード例 #3
0
ファイル: Form_Langue.cs プロジェクト: dowesw/Scolaris
        private void LoadAll(bool avance, bool init)
        {
            dao.ExecuteDynamicQuery(Langue.ToTable(), "y.code , y.intitule", avance, init);

            objet_langue.ClearDataGridView(true);
            foreach (Langue g in dao.Result)
            {
                Action(g, 1, true);
            }

            btn_prev.Enabled = !dao.disPrev;
            btn_next.Enabled = !dao.disNext;
            lb_position.Text = dao.currentPage + "/" + dao.totalPage;
        }