private void BtnCarRecord_Click(object sender, EventArgs e)
 {
     try
     {
         tableLayoutPanelContent.Controls.Clear();
         resetButtonsStoreDetailsPanelStyle();
         Button btn = (Button)sender;
         btn.ForeColor = Color.Black;
         btn.BackColor = Color.White;
         Cars objForm = new Cars();
         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);
     }
 }
        //Cars
        private void navBarItem1_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            try
            {
                restForeColorOfNavBarItem();
                NavBarItem navBarItem = (NavBarItem)sender;
                navBarItem.Appearance.ForeColor = Color.Blue;
                if (!xtraTabControlCarsContent.Visible)
                {
                    xtraTabControlCarsContent.Visible = true;
                }

                XtraTabPage xtraTabPage = getTabPage("السيارات");
                if (xtraTabPage == null)
                {
                    xtraTabControlCarsContent.TabPages.Add("السيارات");
                    xtraTabPage = getTabPage("السيارات");
                }

                xtraTabPage.Controls.Clear();
                xtraTabControlCarsContent.SelectedTabPage = xtraTabPage;

                Cars objForm = new Cars(this);

                objForm.TopLevel = false;
                xtraTabPage.Controls.Add(objForm);
                objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                objForm.Dock            = DockStyle.Fill;
                //objForm.DisplayAtaqm();
                objForm.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #3
0
 public Car_Record(Cars cars)
 {
     InitializeComponent();
     dbconnection = new MySqlConnection(connection.connectionString);
     this.cars    = cars;
 }