Beispiel #1
0
 public IEnumerable <CGridFilterForWndDataGrid> GetPossibleFilters()
 {
     if (m_champCustom == null)
     {
         return(new CGridFilterForWndDataGrid[0]);
     }
     if (m_champCustom.TypeDonnee.TypeDotNetNatif == typeof(int) ||
         m_champCustom.TypeDonnee.TypeDotNetNatif == typeof(int?) ||
         m_champCustom.TypeDonnee.TypeDotNetNatif == typeof(double) ||
         m_champCustom.TypeDonnee.TypeDotNetNatif == typeof(double?))
     {
         return(CGridFilterNumericComparison.GetFiltresNumeriques());
     }
     if (m_champCustom.TypeDonnee.TypeDotNetNatif == typeof(bool) ||
         m_champCustom.TypeDonnee.TypeDotNetNatif == typeof(bool?))
     {
         return(CGridFilterChecked.GetFiltresBool());
     }
     if (m_champCustom.TypeDonnee.TypeDotNetNatif == typeof(DateTime) ||
         m_champCustom.TypeDonnee.TypeDotNetNatif == typeof(DateTime?) ||
         m_champCustom.TypeDonnee.TypeDotNetNatif == typeof(CDateTimeEx))
     {
         return(CGridFilterDateComparison.GetFiltresDate());
     }
     return(CGridFilterTextComparison.GetFiltresTexte());
 }
Beispiel #2
0
        public IEnumerable <CGridFilterForWndDataGrid> GetPossibleFilters()
        {
            Type tp = typeof(string);

            if (m_expression != null)
            {
                tp = m_expression.TypeDonnee.TypeDotNetNatif;
            }
            if (tp == typeof(int) || tp == typeof(double))
            {
                return(CGridFilterNumericComparison.GetFiltresNumeriques());
            }
            else if (tp == typeof(bool))
            {
                return(CGridFilterChecked.GetFiltresBool());
            }
            else if (tp == typeof(DateTime))
            {
                return(CGridFilterDateComparison.GetFiltresDate());
            }
            return(CGridFilterTextComparison.GetFiltresTexte());
        }
Beispiel #3
0
 //-------------------------------------------------------------------------
 public IEnumerable <CGridFilterForWndDataGrid> GetPossibleFilters()
 {
     return(CGridFilterChecked.GetFiltresBool());
 }