Esempio n. 1
0
 private void btnNewSubDataset_Click(object sender, EventArgs e)
 {
     InfoBindingSource IBS = new InfoBindingSource();
     System.Windows.Forms.TreeNode Node = tvRelation.SelectedNode;
     if (Node != null)
     {
         TDetailItem DetailItem = (TDetailItem)Node.Tag;
         IBS.DataSource = DetailItem.BindingSource;
         fmSelDetail detail1 = new fmSelDetail();
         DataRelation R = DetailItem.Relation;
         if (detail1.ShowSelDetail(IBS, ref R))
         {
             System.Windows.Forms.TreeNode Node1 = Node.Nodes.Add(R.ChildTable.TableName);
             SetNodeData(R, IBS, Node1);
             UpdatelvSelectedFields((TDetailItem)Node1.Tag);
         }
     }
 }
Esempio n. 2
0
 private void btnNewDataset_Click(object sender, EventArgs e)
 {
     InfoBindingSource IBS = new InfoBindingSource();
     System.Windows.Forms.TreeNode node1 = tvRelation.SelectedNode;
     if ((node1 == null) || (node1.Level == 0))
     {
         if (FInfoDataSet.RemoteName == "")
         {
             FInfoDataSet.RemoteName = tbProviderName.Text;
         }
         IBS.DataSource = FInfoDataSet;
         IBS.DataMember = tbTableName.Text;
     }
     else
     {
         TDetailItem item1 = (TDetailItem)node1.Parent.Tag;
         IBS.DataSource = item1.BindingSource;
         IBS.DataMember = item1.Relation.RelationName;
     }
     fmSelDetail detail1 = new fmSelDetail();
     DataRelation R = null;
     if (detail1.ShowSelDetail(IBS, ref R))
     {
         System.Windows.Forms.TreeNode Node = tvRelation.Nodes.Add(R.ChildTable.TableName);
         SetNodeData(R, IBS, Node);
         UpdatelvSelectedFields((TDetailItem)Node.Tag);
     }
 }