Ejemplo n.º 1
0
        private void btnAddBill_Click(object sender, EventArgs e)
        {
            frmTabControl fTest = new frmTabControl();
            TabPage       t1    = new TabPage();

            // Set top level
            fTest.TopLevel = false;
            fTest.Parent   = t1;
            tabData.TabPages.Add(t1);
            t1.Text = "Hóa đơn " + next_tab;
            next_tab++;
            fTest.Visible       = true;
            tabData.SelectedTab = t1;
        }
Ejemplo n.º 2
0
        private void tabData_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (tabData.SelectedIndex == tabData.TabCount - 1)
            {
                frmTabControl fTest = new frmTabControl();
                fTest.CurEmployee = curEmployee;
                TabPage tab = new TabPage("*");
                tabData.SelectedTab.Text = "Hóa đơn " + next_tab;
                next_tab++;
                fTest.TopLevel = false;
                fTest.Parent   = tabData.SelectedTab;
                fTest.Visible  = true;
                tabData.TabPages.Add(tab);

                this.StartPosition = FormStartPosition.CenterScreen;
            }
        }
Ejemplo n.º 3
0
        private void frmSale_Load(object sender, EventArgs e)
        {
            // Load for tab 1
            TabPage       t1    = tabData.TabPages[0];
            frmTabControl fTest = new frmTabControl();

            fTest.CurEmployee = CurEmployee;

            // Set top level
            fTest.TopLevel = false;
            fTest.Parent   = t1;
            //tabData.TabPages.Add(t1);
            t1.Text = "Hóa đơn " + next_tab;
            next_tab++;
            fTest.Visible       = true;
            tabData.SelectedTab = t1;
        }