コード例 #1
0
ファイル: Cars.cs プロジェクト: ayaRayan93/CarsManagment
 //second buttons
 private void CarDraivers_Click(object sender, EventArgs e)
 {
     try
     {
         if (carUpdate == null)
         {
             if (row1 != null)
             {
                 carDrivers = new CarDrivers(row1, this);
                 carDrivers.Show();
                 carDrivers.Focus();
             }
             else
             {
                 MessageBox.Show("Select row");
             }
         }
         else
         {
             carDrivers.Show();
             carDrivers.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #2
0
        public void bindCarDriversForm(DataRowView carRow, Cars cars)
        {
            CarDrivers objForm = new CarDrivers(carRow, cars, xtraTabControlCarsContent);

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

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

            objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            objForm.Dock            = DockStyle.Fill;
            objForm.Show();
        }