Esempio n. 1
0
        private void tmEdit_Click(object sender, EventArgs e)
        {
            if (tvType.SelectedNode.Parent == null)
            {
                return;
            }
            string strSQL = "select * from t_Class where F_ID = '" + tvType.SelectedNode.Tag.ToString() + "'";

            DataLib.DataHelper myHelper = new DataLib.DataHelper();
            DataSet            ds       = myHelper.GetDs(strSQL);

            if (ds.Tables[0].Rows.Count == 0)
            {
                return;
            }
            //TreeNode Node = GetFactory(tvType.SelectedNode);
            frmTypeEdit myTypeEdit = new frmTypeEdit();

            //myTypeEdit.strFactory = Node.Tag.ToString();
            myTypeEdit.strPID         = tvType.SelectedNode.Parent.Tag.ToString();
            myTypeEdit.strCID         = tvType.SelectedNode.Tag.ToString();
            myTypeEdit.textEdit3.Text = ds.Tables[0].Rows[0]["F_Name"].ToString();
            ds.Dispose();
            myTypeEdit.ShowDialog();
            myTypeEdit.Dispose();
        }
Esempio n. 2
0
        private void tmAdd_Click(object sender, EventArgs e)
        {
            //TreeNode Node = GetFactory(tvType.SelectedNode);

            frmTypeEdit myTypeEdit = new frmTypeEdit();

            //myTypeEdit.strFactory = Node.Tag.ToString();
            myTypeEdit.strPID   = tvType.SelectedNode.Tag.ToString();
            myTypeEdit.strTable = strTable;
            myTypeEdit.strKey   = strKey;
            myTypeEdit.ShowDialog();
            myTypeEdit.Dispose();
        }