Example #1
0
        private void ShowStockListView()
        {
            frmPopup = new Form();
            frmPopup.StartPosition = FormStartPosition.CenterScreen;
            frmPopup.BackColor     = Color.CadetBlue;

            frmPopup.MaximizeBox     = false;
            frmPopup.MinimizeBox     = false;
            frmPopup.ControlBox      = false;
            frmPopup.FormBorderStyle = FormBorderStyle.FixedSingle;

            frmPopup.Size       = new Size(550, 310);
            lv                  = StockItemDB.getStockItemListView();
            lv.ShowItemToolTips = true;
            lv.ColumnClick     += new ColumnClickEventHandler(LvColumnClick);
            //this.lv.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.listView3_ItemChecked);
            lv.Bounds = new System.Drawing.Rectangle(new System.Drawing.Point(0, 25), new Size(550, 250));
            frmPopup.Controls.Add(lv);

            System.Windows.Forms.Label pnlHeading = new System.Windows.Forms.Label();
            pnlHeading.Size      = new Size(300, 20);
            pnlHeading.Location  = new System.Drawing.Point(5, 5);
            pnlHeading.Text      = "Select StockItem";
            pnlHeading.Font      = new System.Drawing.Font("Arial", 10, FontStyle.Bold);
            pnlHeading.ForeColor = Color.Black;
            frmPopup.Controls.Add(pnlHeading);

            System.Windows.Forms.Button lvOK = new System.Windows.Forms.Button();
            lvOK.BackColor = Color.Tan;
            lvOK.Text      = "OK";
            lvOK.Location  = new Point(40, 280);
            lvOK.Click    += new System.EventHandler(this.lvOK_Click2);
            frmPopup.Controls.Add(lvOK);

            System.Windows.Forms.Button lvCancel = new System.Windows.Forms.Button();
            lvCancel.Text      = "CANCEL";
            lvCancel.BackColor = Color.Tan;
            lvCancel.Location  = new Point(130, 280);
            lvCancel.Click    += new System.EventHandler(this.lvCancel_Click2);
            frmPopup.Controls.Add(lvCancel);

            System.Windows.Forms.Label lblSearch = new System.Windows.Forms.Label();
            lblSearch.Text     = "Search";
            lblSearch.Location = new Point(260, 282);
            lblSearch.Size     = new Size(45, 15);
            frmPopup.Controls.Add(lblSearch);

            txtSearch              = new System.Windows.Forms.TextBox();
            txtSearch.Location     = new Point(310, 280);
            txtSearch.TextChanged += new EventHandler(txtSearch_TextChanged);
            frmPopup.Controls.Add(txtSearch);

            frmPopup.ShowDialog();
        }
Example #2
0
        private void ShowStockListView()
        {
            //removeControlsFromPnlLvPanel();
            //pnllv = new Panel();
            //pnllv.BorderStyle = BorderStyle.FixedSingle;
            //pnllv.Bounds = new System.Drawing.Rectangle(new System.Drawing.Point(100, 100), new Size(600, 300));
            frmPopup = new Form();
            frmPopup.StartPosition = FormStartPosition.CenterScreen;
            frmPopup.BackColor     = Color.CadetBlue;

            frmPopup.MaximizeBox     = false;
            frmPopup.MinimizeBox     = false;
            frmPopup.ControlBox      = false;
            frmPopup.FormBorderStyle = FormBorderStyle.FixedSingle;

            frmPopup.Size   = new Size(450, 300);
            lv              = StockItemDB.getStockItemListView();
            lv.ColumnClick += new ColumnClickEventHandler(LvColumnClick);
            //this.lv.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.listView3_ItemChecked);
            lv.Bounds = new System.Drawing.Rectangle(new System.Drawing.Point(0, 0), new Size(450, 250));
            frmPopup.Controls.Add(lv);

            System.Windows.Forms.Button lvOK = new System.Windows.Forms.Button();
            lvOK.BackColor = Color.Tan;
            lvOK.Text      = "OK";
            lvOK.Location  = new Point(44, 265);
            lvOK.Click    += new System.EventHandler(this.lvOK_Click2);
            frmPopup.Controls.Add(lvOK);

            System.Windows.Forms.Button lvCancel = new System.Windows.Forms.Button();
            lvCancel.Text      = "CANCEL";
            lvCancel.BackColor = Color.Tan;
            lvCancel.Location  = new Point(141, 265);
            lvCancel.Click    += new System.EventHandler(this.lvCancel_Click2);
            frmPopup.Controls.Add(lvCancel);

            System.Windows.Forms.Label lblSearch = new System.Windows.Forms.Label();
            lblSearch.Text     = "Search";
            lblSearch.Location = new Point(250, 267);
            lblSearch.Size     = new Size(45, 15);
            frmPopup.Controls.Add(lblSearch);

            txtSearch              = new System.Windows.Forms.TextBox();
            txtSearch.Location     = new Point(300, 265);
            txtSearch.TextChanged += new EventHandler(txtSearch_TextChanged);
            frmPopup.Controls.Add(txtSearch);

            frmPopup.ShowDialog();
            //pnlAddEdit.Controls.Add(pnllv);
            //pnllv.BringToFront();
            //pnllv.Visible = true;
        }