Beispiel #1
0
 internal static object GetList(员工信息Filter filter)
 {
     using (var client = new BDKRWS.BDKRWSClient())
     {
         return client.员工信息_GetList(filter);
     }
 }
Beispiel #2
0
 private void LoadData()
 {
     var filter = 员工信息FilterBindingSource.DataSource as 员工信息Filter;
     if (null == filter)
         filter = new 员工信息Filter();
     var list = 员工信息Logic.GetList(filter);
     员工信息ViewModelGridControl.DataSource = list;
     gridView1.AutoConfig();
 }
Beispiel #3
0
 public List<员工信息ViewModel> 员工信息_GetList(员工信息Filter filter)
 {
     using (var context = new BDKRContext())
     {
         var q = from t in context.员工信息S
                 select t;
         if (filter.关键词 != null && filter.关键词.Length > 0)
             q = from t in q
                 where (t.姓名 != null && t.姓名.Contains(filter.关键词))
                 || (t.拼音 != null && t.拼音.Contains(filter.关键词))
                 || (t.工号 != null && t.工号.Contains(filter.关键词))
                 || (t.联系电话 != null && t.联系电话.Contains(filter.关键词))
                 || (t.身份证号 != null && t.身份证号.Contains(filter.关键词))
                 select t;
         if (filter.门店编码 != null && filter.门店编码.Length > 0)
             q = from t in q
                 where filter.门店编码.Contains(t.门店编码)
                 select t;
         var list = new List<员工信息ViewModel>();
         q.ToList()
             .ForEach(t =>
             {
                 list.Add(t.ConvertToViewModel());
             });
         return list;
     }
 }