Пример #1
0
        private void barButtonItemChuyenKho_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            bool falg = false;

            for (int i = 0; i < xtraTabControlNoiDung.TabPages.Count; i++)
            {
                if (xtraTabControlNoiDung.TabPages[i].Name == "xtraTabPageChuyenKho")
                {
                    falg = true;
                    xtraTabControlNoiDung.SelectedTabPage = xtraTabControlNoiDung.TabPages[i];
                    break;
                }
            }
            if (falg == false)
            {
                FormTonKho chuyenKho = new FormTonKho();
                //tao tabpase s do chen vo tabcontrol
                XtraTabPage tab = new XtraTabPage();
                tab.Name = "xtraTabPageChuyenKho";
                tab.Text = "Chuyển Kho";
                xtraTabControlNoiDung.TabPages.Add(tab);
                //nhan vao button hien thi tab
                xtraTabControlNoiDung.SelectedTabPage = tab;

                chuyenKho.TopLevel = false;
                chuyenKho.Parent   = tab;
                //  Form.MdiParent = this;
                chuyenKho.Show();

                chuyenKho.Dock = DockStyle.Fill;
            }
        }
Пример #2
0
 public void HienThiFormTonKho(string name)
 {
     if (!HienThiForm(name))
     {
         FormTonKho f = new FormTonKho();
         f.MdiParent = this;
         f.Show();
     }
 }