Beispiel #1
0
        //ProductItems
        private void btnProductItems_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            try
            {
                restForeColorOfNavBarItem();
                NavBarItem navBarItem = (NavBarItem)sender;
                navBarItem.Appearance.ForeColor = Color.Blue;

                if (!xtraTabControlStoresContent.Visible)
                {
                    xtraTabControlStoresContent.Visible = true;
                }


                XtraTabPage xtraTabPage = getTabPage(xtraTabControlStoresContent, "عناصر البند");
                if (xtraTabPage == null)
                {
                    xtraTabControlStoresContent.TabPages.Add("عناصر البند");
                    xtraTabPage = getTabPage(xtraTabControlStoresContent, "عناصر البند");
                }
                xtraTabPage.Controls.Clear();
                xtraTabControlStoresContent.SelectedTabPage = xtraTabPage;
                ProductItems objForm = new ProductItems();

                objForm.TopLevel = false;
                xtraTabPage.Controls.Add(objForm);
                objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                objForm.Dock            = DockStyle.Fill;
                objForm.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #2
0
 private void BtnProductItemsRecord_Click(object sender, EventArgs e)
 {
     try
     {
         tableLayoutPanelContent.Controls.Clear();
         resetButtonsStoreDetailsPanelStyle();
         Button btn = (Button)sender;
         btn.ForeColor = Color.Black;
         btn.BackColor = Color.White;
         ProductItems objForm = new ProductItems();
         objForm.TopLevel = false;
         tableLayoutPanelContent.Controls.Add(objForm);
         objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         objForm.Dock            = DockStyle.Fill;
         objForm.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }