コード例 #1
0
 void UpdateCreteria()
 {
     IsFiltred = false;
     if (BaseCriteria == null)
     {
         filtredCriteria = null;
         return;
     }
     filtredCriteria = (ICriteria)BaseCriteria.Clone();
     if (entryrefEquipmentKind.Subject is EquipmentKind)
     {
         filtredCriteria.Add(Restrictions.Eq("Type", entryrefEquipmentKind.Subject));
     }
     IsFiltred = true;
     OnRefiltered();
 }
コード例 #2
0
ファイル: BankFilter.cs プロジェクト: kozlov-d/QSProjects
        void UpdateCreteria()
        {
            IsFiltred = false;
            if (BaseCriteria == null)
            {
                return;
            }
            FiltredCriteria = (ICriteria)BaseCriteria.Clone();

            if (!checkShowDeleted.Active)
            {
                FiltredCriteria.Add(Restrictions.Eq("Deleted", false));
                IsFiltred = true;
            }

            OnRefiltered();
        }
コード例 #3
0
 void UpdateCreteria()
 {
     IsFiltred = false;
     if (BaseCriteria == null)
     {
         return;
     }
     FiltredCriteria = (ICriteria)BaseCriteria.Clone();
     if (checkSelectOutdated.Active)
     {
         FiltredCriteria.Add(Restrictions.Lt("LastServiceDate", DateTime.Now.AddMonths(-5).AddDays(-14)));
         IsFiltred = true;
     }
     if (entryrefEquipmentKind.Subject != null)
     {
         FiltredCriteria.CreateAlias("Nomenclature", "nomenclatureAlias");
         FiltredCriteria.Add(Restrictions.Eq("nomenclatureAlias.Type", entryrefEquipmentKind.Subject));
     }
     OnRefiltered();
 }
コード例 #4
0
        void UpdateCreteria()
        {
            IsFiltred = false;
            if (BaseCriteria == null)
            {
                return;
            }
            FiltredCriteria = (ICriteria)BaseCriteria.Clone();

            if (!checkShowArchive.Active)
            {
                FiltredCriteria.Add(Restrictions.Eq(Projections.Property <Nomenclature>(x => x.IsArchive), false));
                IsFiltred = true;
            }

            if (!chkShowDilers.Active)
            {
                FiltredCriteria.Add(Restrictions.Eq(Projections.Property <Nomenclature>(x => x.IsDiler), false));
                IsFiltred = true;
            }

            if ((NomenclatureCategory)enumcomboType.SelectedItem == NomenclatureCategory.water)
            {
                FiltredCriteria.Add(Restrictions.Eq(Projections.Property <Nomenclature>(x => x.IsDisposableTare), chkOnlyDisposableTare.Active));
                IsFiltred = true;
            }

            if (enumcomboType.SelectedItem is NomenclatureCategory)
            {
                FiltredCriteria.Add(Restrictions.Eq("Category", enumcomboType.SelectedItem));
                IsFiltred = true;
            }
            else
            {
                FiltredCriteria.AddOrder(NHibernate.Criterion.Order.Asc("Category"));
            }
            OnRefiltered();
        }
コード例 #5
0
        void UpdateCreteria()
        {
            IsFiltred = false;
            if (BaseCriteria == null)
            {
                return;
            }
            FiltredCriteria = (ICriteria)BaseCriteria.Clone();

            if (!checkFired.Active)
            {
                FiltredCriteria.Add(Restrictions.Eq("IsFired", false));
                IsFiltred = true;
            }

            if (enumcomboCategory.SelectedItem is EmployeeCategory)
            {
                FiltredCriteria.Add(Restrictions.Eq("Category", enumcomboCategory.SelectedItem));
                IsFiltred = true;
            }

            OnRefiltered();
        }