Exemplo n.º 1
0
        public void showProductRefresh()
        {
            foreach (Control item in FormDashboard.Instance.panelContent.Controls.OfType <UserControlProducts>())
            {
                FormDashboard.Instance.panelContent.Controls.Remove(item);
            }
            UserControlProducts proda = new UserControlProducts(Allproducts);

            proda.Dock = DockStyle.Fill;
            FormDashboard.Instance.PanelContent.Controls.Add(proda);
            FormDashboard.Instance.PanelContent.Controls["UserControlProducts"].BringToFront();
        }
Exemplo n.º 2
0
 private void btnProducts_Click(object sender, EventArgs e)
 {
     sidePanel.Height = btnProducts.Height;
     sidePanel.Top    = btnProducts.Top;
     lblTitle.Text    = "PRODUCTS";
     btnactivate(btnProducts);
     //userControlProducts1.BringToFront();
     //userControlProducts1.Visible = true;
     //btnProducts.ForeColor = Color.FromArgb(255, 230, 109);
     if (!PanelContent.Controls.ContainsKey("userControlProducts"))
     {
         UserControlProducts prod = new UserControlProducts(Allproducts);
         prod.Dock = DockStyle.Fill;
         PanelContent.Controls.Add(prod);
     }
     PanelContent.Controls["userControlProducts"].BringToFront();
 }
Exemplo n.º 3
0
 //function for show usercontrol
 public void showForm(String name)
 {
     if (name == "UserControlProducts")
     {
         if (!PanelContent.Controls.ContainsKey(name))
         {
             UserControlProducts prod = new UserControlProducts(Allproducts);
             prod.Dock = DockStyle.Fill;
             PanelContent.Controls.Add(prod);
         }
         PanelContent.Controls[name].BringToFront();
     }
     if (name == "UserControlCustomer")
     {
         foreach (Control item in FormDashboard.Instance.panelContent.Controls.OfType <UserControlCustomer>())
         {
             FormDashboard.Instance.panelContent.Controls.Remove(item);
         }
         if (!PanelContent.Controls.ContainsKey(name))
         {
             UserControlCustomer prod = new UserControlCustomer();
             prod.Dock = DockStyle.Fill;
             PanelContent.Controls.Add(prod);
         }
         PanelContent.Controls[name].BringToFront();
     }
     if (name == "UserControlCreateCustomer")
     {
         if (!PanelContent.Controls.ContainsKey(name))
         {
             UserControlCreateCustomer prod = new UserControlCreateCustomer();
             prod.Dock = DockStyle.Fill;
             PanelContent.Controls.Add(prod);
         }
         PanelContent.Controls[name].BringToFront();
     }
     if (name == "UserControlOrder")
     {
         if (!PanelContent.Controls.ContainsKey(name))
         {
             UserControlOrder prod = new UserControlOrder(Allproducts);
             prod.Dock = DockStyle.Fill;
             PanelContent.Controls.Add(prod);
         }
         PanelContent.Controls[name].BringToFront();
     }
     if (name == "UserControlDashboard")
     {
         if (!PanelContent.Controls.ContainsKey(name))
         {
             UserControlDashboard prod = new UserControlDashboard();
             prod.Dock = DockStyle.Fill;
             PanelContent.Controls.Add(prod);
         }
         PanelContent.Controls[name].BringToFront();
     }
     if (name == "UserControlReport")
     {
         if (!PanelContent.Controls.ContainsKey(name))
         {
             UserControlReport prod = new UserControlReport();
             prod.Dock = DockStyle.Fill;
             PanelContent.Controls.Add(prod);
         }
         PanelContent.Controls[name].BringToFront();
     }
 }