Esempio n. 1
0
        public void AddTabControl(UserControl userControl, string itemTabName)
        {
            bool isExists = false;

            foreach (XtraTabPage tabItem in xtcHDBH.TabPages)
            {
                if (tabItem.Text == itemTabName)
                {
                    isExists = true;
                    xtcHDBH.SelectedTabPage = tabItem;
                }
            }
            if (!isExists)
            {
                AddTab addtab = new AddTab();
                addtab.AddTabControl(xtcHDBH, itemTabName, userControl);
            }
        }
Esempio n. 2
0
        private void addTabControl(UserControl userControl, string itemTabName, string icon)
        {
            bool isExist = false;

            foreach (XtraTabPage tabItem in xtraTabControlMain.TabPages)
            {
                if (tabItem.Text == itemTabName)
                {
                    isExist = true;
                    xtraTabControlMain.SelectedTabPage = tabItem;
                }
            }

            if (isExist == false)
            {
                AddTab addTab = new AddTab();
                addTab.AddTabControl(xtraTabControlMain, itemTabName, icon, userControl);
            }
        }
        public void AddCtl(frmMain ParentForm)
        {
            cltViewAllAccount clt = new cltViewAllAccount();

            addTab.AddTabControl(xtraTabControl, clt, "Thông tin tài khản");
        }
        private void btnKhachVayCamDo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            ctlPhieuCam clt = new ctlPhieuCam();

            addTab.AddTabControl(tabMain, clt, "Phiếu cầm đồ");
        }
        private void btnKho_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int t = 0;

            foreach (DevExpress.XtraTab.XtraTabPage tab in xtraTabControl1.TabPages)
            {
                if (tab.Text == "Xuất Hàng")
                {
                    xtraTabControl1.SelectedTabPage = tab;
                    t = 1;
                }
            }
            if (t == 1)
            {
            }
            else
            {
                add.AddTabControl(xtraTabControl1, "", "Xuất Hàng", new TaoHoaDonXuat());
            }

            //panelControl1.Controls.Clear();
            //TaoHoaDonXuat hoadonxuat = new TaoHoaDonXuat(manv, tennv, loaitk);
            //hoadonxuat.Show();
            //hoadonxuat.Dock = DockStyle.Fill;
            //panelControl1.Controls.Add(hoadonxuat);
        }