Beispiel #1
0
        public void bindSparePartForm(DataRowView carRow, Cars cars)
        {
            CarSpareParts objForm = new CarSpareParts(carRow, cars, xtraTabControlCarsContent, this);

            objForm.TopLevel = false;
            XtraTabPage xtraTabPage = getTabPage(xtraTabControlCarsContent, "قطع الغيار");

            if (xtraTabPage == null)
            {
                xtraTabControlCarsContent.TabPages.Add("قطع الغيار");
                xtraTabPage = getTabPage(xtraTabControlCarsContent, "قطع الغيار");
            }
            xtraTabPage.Controls.Clear();
            xtraTabPage.Controls.Add(objForm);
            xtraTabControlCarsContent.SelectedTabPage = xtraTabPage;

            objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            objForm.Dock            = DockStyle.Fill;
            objForm.Show();
        }
Beispiel #2
0
        //function
        //cars
        public void bindRecordCarForm(Cars cars)
        {
            Car_Record objForm = new Car_Record(cars, xtraTabControlCarsContent);

            objForm.TopLevel = false;
            XtraTabPage xtraTabPage = getTabPage(xtraTabControlCarsContent, "أضافة سيارة");

            if (xtraTabPage == null)
            {
                xtraTabControlCarsContent.TabPages.Add("أضافة سيارة");
                xtraTabPage = getTabPage(xtraTabControlCarsContent, "أضافة سيارة");
            }
            xtraTabPage.Controls.Clear();
            xtraTabPage.Controls.Add(objForm);
            xtraTabControlCarsContent.SelectedTabPage = xtraTabPage;

            objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            objForm.Dock            = DockStyle.Fill;
            objForm.Show();
        }
Beispiel #3
0
        public void bindCarDriversForm(DataRowView carRow, Cars cars)
        {
            CarDrivers objForm = new CarDrivers(carRow, cars, xtraTabControlCarsContent);

            objForm.TopLevel = false;
            XtraTabPage xtraTabPage = getTabPage(xtraTabControlCarsContent, "سائقي السيارة");

            if (xtraTabPage == null)
            {
                xtraTabControlCarsContent.TabPages.Add("سائقي السيارة");
                xtraTabPage = getTabPage(xtraTabControlCarsContent, "سائقي السيارة");
            }
            xtraTabPage.Controls.Clear();
            xtraTabPage.Controls.Add(objForm);
            xtraTabControlCarsContent.SelectedTabPage = xtraTabPage;

            objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            objForm.Dock            = DockStyle.Fill;
            objForm.Show();
        }
Beispiel #4
0
        //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(xtraTabControlCarsContent, "السيارات");
                if (xtraTabPage == null)
                {
                    xtraTabControlCarsContent.TabPages.Add("السيارات");
                    xtraTabPage = getTabPage(xtraTabControlCarsContent, "السيارات");
                }

                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);
            }
        }