Esempio n. 1
0
 internal static object GetList(菜品信息Filter filter)
 {
     using (var client = new BDKRWS.BDKRWSClient())
     {
         return client.菜品信息_GetList(filter);
     }
 }
Esempio n. 2
0
 private void bbiFind_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     //查询
     var filter = 菜品信息FilterBindingSource.DataSource as 菜品信息Filter;
     if (null == filter)
         filter = new 菜品信息Filter();
     var list = 菜品信息Logic.GetList(filter);
     菜品信息ViewModelBindingSource.DataSource = list;
     gridView1.AutoConfig();
     gridView2.AutoConfig();
 }
Esempio n. 3
0
 public List<菜品信息ViewModel> 菜品信息_GetList(菜品信息Filter filter)
 {
     using (var context = new BDKRContext())
     {
         var q = from t in context.货品信息S
                 where t.是否菜品 == true
                 select t;
         if (filter.关键词 != null && filter.关键词.Length > 0)
             q = from t in q
                 where (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;
     }
 }
Esempio n. 4
0
 private void InitEditors()
 {
     EditorHelper.CheckedComboBoxEditor_货品类别(菜品类别编码TextEdit.Properties);
     var filter = new 菜品信息Filter();
     菜品信息FilterBindingSource.DataSource = filter;
 }