예제 #1
0
        private void btnSelectSMRNHeaderNo_Click(object sender, EventArgs e)
        {
            if (grdProductTestDetail.Rows.Count != 0)
            {
                DialogResult dialog = MessageBox.Show("Grid Detail will be removed", "Yes", MessageBoxButtons.YesNo);
                if (dialog == DialogResult.Yes)
                {
                    grdProductTestDetail.Rows.Clear();
                }
                else
                {
                    return;
                }
            }
            removeControlsFromForwarderPanelTV();
            tv            = new TreeView();
            tv.CheckBoxes = true;
            tv.Nodes.Clear();
            tv.CheckBoxes            = true;
            pnlForwarder.BorderStyle = BorderStyle.FixedSingle;
            pnlForwarder.Bounds      = new Rectangle(new Point(100, 10), new Size(700, 300));

            tv        = StockItemDB.getStockItemTreeView();
            tv.Bounds = new Rectangle(new Point(50, 50), new Size(600, 200));
            pnlForwarder.Controls.Remove(tv);
            pnlForwarder.Controls.Add(tv);
            //tv.cl
            tv.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterCheck);
            Button lvForwrdOK = new Button();

            lvForwrdOK.Text     = "OK";
            lvForwrdOK.Size     = new Size(150, 20);
            lvForwrdOK.Location = new Point(50, 270);
            lvForwrdOK.Click   += new System.EventHandler(this.tvOK_Click);
            pnlForwarder.Controls.Add(lvForwrdOK);

            Button lvForwardCancel = new Button();

            lvForwardCancel.Text     = "Cancel";
            lvForwardCancel.Size     = new Size(150, 20);
            lvForwardCancel.Location = new Point(250, 270);
            lvForwardCancel.Click   += new System.EventHandler(this.tvCancel_Click);
            pnlForwarder.Controls.Add(lvForwardCancel);
            ////lvForwardCancel.Visible = false;
            //tv.CheckBoxes = true;
            pnlForwarder.Visible = true;
            pnlAddEdit.Controls.Add(pnlForwarder);
            pnlAddEdit.BringToFront();
            pnlForwarder.BringToFront();
            pnlForwarder.Focus();
        }
예제 #2
0
        private void showStockItemTreeView()
        {
            removeControlsFromForwarderPanelTV();
            tv            = new TreeView();
            tv.CheckBoxes = true;
            tv.Nodes.Clear();
            tv.CheckBoxes            = true;
            pnlForwarder.BorderStyle = BorderStyle.FixedSingle;
            pnlForwarder.Bounds      = new Rectangle(new Point(100, 10), new Size(700, 300));

            tv        = StockItemDB.getStockItemTreeView();
            tv.Bounds = new Rectangle(new Point(50, 50), new Size(600, 200));
            pnlForwarder.Controls.Remove(tv);
            pnlForwarder.Controls.Add(tv);
            //tv.cl
            tv.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterCheck);
            Button lvForwrdOK = new Button();

            lvForwrdOK.Text     = "OK";
            lvForwrdOK.Size     = new Size(150, 20);
            lvForwrdOK.Location = new Point(50, 270);
            lvForwrdOK.Click   += new System.EventHandler(this.tvOK_Click);
            pnlForwarder.Controls.Add(lvForwrdOK);

            Button lvForwardCancel = new Button();

            lvForwardCancel.Text     = "Cancel";
            lvForwardCancel.Size     = new Size(150, 20);
            lvForwardCancel.Location = new Point(250, 270);
            lvForwardCancel.Click   += new System.EventHandler(this.tvCancel_Click);
            pnlForwarder.Controls.Add(lvForwardCancel);
            ////lvForwardCancel.Visible = false;
            //tv.CheckBoxes = true;
            pnlForwarder.Visible = true;
            pnlList.Controls.Add(pnlForwarder);
            pnlList.BringToFront();
            pnlForwarder.BringToFront();
            pnlForwarder.Focus();
        }