- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace fund
- {
- public partial class GCard : Form
- {
- private int i;
- public GCard(int s)
- {
- this.i = s;
- InitializeComponent();
- }
- private void GCard_Load(object sender, EventArgs e)
- {
- var card = from m in Main.DB.CARD
- where m.ZCID==i
- select m;
- this.cARDBindingSource.DataSource = card.ToList();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- Main.DB.SubmitChanges();
- }
- private void pictureBox1_Click(object sender, EventArgs e)
- {
- seclets(lb);
- }
- private void pictureBox2_Click(object sender, EventArgs e)
- {
- seclets(textBox11);
- }
- private void seclets(TextBox t)
- {
- SBM sbm = new SBM();
- if (DialogResult.OK == sbm.ShowDialog())
- {
- t.Text = sbm.NodeText;
- t.Focus();
- }
- }
- }
- }
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace fund
- {
- public partial class SBM : Form
- {
- private string nodeText;
- public string NodeText
- {
- get { return nodeText; }
- set { nodeText = value; }
- }
- public SBM()
- {
- InitializeComponent();
- }
- private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
- {
- // MessageBox.Show(e.Node.Text);
- }
- private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
- {
- this.NodeText = e.Node.Text;
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
- }
- }