Esempio n. 1
0
        //drivers
        public void bindRecordDriverForm(Drivers drivers)
        {
            Driver_Record objForm = new Driver_Record(drivers, 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();
        }
Esempio n. 2
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         if (driverRecord == null)
         {
             driverRecord = new Driver_Record(this);
             driverRecord.Show();
             driverRecord.Focus();
         }
         else
         {
             driverRecord.Show();
             driverRecord.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }