示例#1
0
        private void Search()
        {
            List <Expression <Func <Mold, bool> > > expressions = new List <Expression <Func <Mold, bool> > >();

            if (!chkAllStatus.Checked)
            {
                GlobalConstants.StatusValue statusValue;
                Enum.TryParse <GlobalConstants.StatusValue>((chkUsing.Checked ? GlobalConstants.StatusValue.Using.ToString() : GlobalConstants.StatusValue.NoUse.ToString()), out statusValue);
                expressions.Add(_ => _.Status == statusValue);
            }
            dgvDuLieu.DataSource = _moldRepository.Find(expressions);
            Control();
        }