Ejemplo n.º 1
0
 private void btnCarPaper_Click(object sender, EventArgs e)
 {
     try
     {
         if (carPaper == null)
         {
             if (row1 != null)
             {
                 carPaper = new Car_Papers(row1, this);
                 carPaper.Show();
                 carPaper.Focus();
             }
             else
             {
                 MessageBox.Show("Select row");
             }
         }
         else
         {
             carPaper.Show();
             carPaper.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Ejemplo n.º 2
0
        public void bindCarPaperForm(DataRowView carRow, Cars cars)
        {
            Car_Papers objForm = new Car_Papers(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();
        }