コード例 #1
0
 /// <summary>
 /// Creates a new instance of this class.
 /// </summary>
 /// <param name="left">Table to the left of the join.</param>
 /// <param name="right">Table to the right of the join.</param>
 /// <param name="alias">Optional alias for the result of the join operation.  If this is
 /// set, then SQL builders should group the result of the join under the given alias.</param>
 public JoinedTable(ITable left, ITable right, TableJoins joinType, Condition joinCondition, string alias = null)
     : base(alias)
 {
     Guard.IsNotNull(left, nameof(left));
     Guard.IsNotNull(right, nameof(right));
     Guard.AreNotEqual(joinType, TableJoins.Unknown, nameof(joinType));
     Left          = left;
     Right         = right;
     JoinType      = joinType;
     JoinCondition = joinCondition;
 }
コード例 #2
0
ファイル: CmdJoinDatasource.cs プロジェクト: secondii/Yutai
 public override void OnClick()
 {
     try
     {
         TableJoins frm = new TableJoins();
         if (frm.ShowDialog() == DialogResult.OK)
         {
             if (frm._joinsGrid1.JoinModels == null || frm._joinsGrid1.JoinModels.Count <= 0)
             {
                 return;
             }
             foreach (JoinModel joinModel in frm._joinsGrid1.JoinModels)
             {
                 _view.CurrentGridView.VirtualGridView.JoinTable(joinModel.Table as IFeatureClass,
                                                                 joinModel.FromField, joinModel.ToField, joinModel.Fields.Split(',').ToList());
             }
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message);
     }
 }