コード例 #1
0
        private void Query()
        {
            Dictionary<System.Linq.Expressions.Expression, string> expressions = new Dictionary<System.Linq.Expressions.Expression, string>();
            System.Linq.Expressions.ParameterExpression parameter = System.Linq.Expressions.Expression.Parameter(typeof(Customer), "r");
            foreach (var uc in spDisplay.Children)
            {
                var c = ((ConditionBaseBar)uc);
                var ConditionExpreesion = c.GetExpression(Parameter);
                var ConditionRelation = c.GetRelation();
                expressions.Add(ConditionExpreesion, ConditionRelation);
            }

            var where = Condition.Match<Customer>(expressions, Parameter);

            
            var result = customers.Where(where);
            var rlist = result.ToList();
            foreach (var r in rlist) 
            {
                Debug.WriteLine(r.ToString());
            }
        }
コード例 #2
0
ファイル: Model3.Designer.cs プロジェクト: skishchampi/TSLU
 /// <summary>
 /// Create a new Dictionary object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="iSBN">Initial value of the ISBN property.</param>
 /// <param name="title">Initial value of the Title property.</param>
 /// <param name="edition">Initial value of the Edition property.</param>
 /// <param name="volume">Initial value of the Volume property.</param>
 /// <param name="part">Initial value of the Part property.</param>
 /// <param name="publisherId">Initial value of the PublisherId property.</param>
 /// <param name="copies">Initial value of the Copies property.</param>
 /// <param name="words">Initial value of the Words property.</param>
 public static Dictionary CreateDictionary(global::System.Int32 id, global::System.Int32 iSBN, global::System.String title, global::System.Int32 edition, global::System.Int32 volume, global::System.Int32 part, global::System.Int32 publisherId, global::System.String copies, global::System.String words)
 {
     Dictionary dictionary = new Dictionary();
     dictionary.Id = id;
     dictionary.ISBN = iSBN;
     dictionary.Title = title;
     dictionary.Edition = edition;
     dictionary.Volume = volume;
     dictionary.Part = part;
     dictionary.PublisherId = publisherId;
     dictionary.Copies = copies;
     dictionary.Words = words;
     return dictionary;
 }
コード例 #3
0
ファイル: Model3.Designer.cs プロジェクト: skishchampi/TSLU
 /// <summary>
 /// Deprecated Method for adding a new object to the Dictionaries EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToDictionaries(Dictionary dictionary)
 {
     base.AddObject("Dictionaries", dictionary);
 }
コード例 #4
0
ファイル: Model9.Designer.cs プロジェクト: skishchampi/TSLU
 /// <summary>
 /// Create a new Dictionary object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 public static Dictionary CreateDictionary(global::System.Int32 id)
 {
     Dictionary dictionary = new Dictionary();
     dictionary.ID = id;
     return dictionary;
 }