Exemple #1
0
        Label CreateLabel(Entity.Web.Passenger s)
        {
            var lbl = new PassengerLabel(s);

            tip.SetToolTip(lbl, String.Format("姓名:{0}\r\n证件:{1}\r\n类型:{2}", s.Name, s.IdNo, ParamData.PassengerType[s.Type]));
            lbl.Enabled = !CheckIsInAvailableFilter(s);
            lbl.Click  += LabelClick;
            return(lbl);
        }
Exemple #2
0
        /// <summary>
        /// 检测是否位于过滤列表中
        /// </summary>
        /// <returns></returns>
        bool CheckIsInAvailableFilter(Entity.Web.Passenger p)
        {
            if (AvailableFilter == null)
            {
                return(false);
            }

            return(AvailableFilter.Any(s => s.Name.IsIgnoreCaseEqualTo(p.Name) && s.IdNo.IsIgnoreCaseEqualTo(p.IdNo)));
        }