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(); }
void UpdateCreteria() { IsFiltred = false; if (BaseCriteria == null) { return; } FiltredCriteria = (ICriteria)BaseCriteria.Clone(); if (!checkShowDeleted.Active) { FiltredCriteria.Add(Restrictions.Eq("Deleted", false)); IsFiltred = true; } OnRefiltered(); }
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(); }
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(); }
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(); }