예제 #1
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         if (driverUpdate == null)
         {
             if (row1 != null)
             {
                 driverUpdate = new Driver_Update(row1, this);
                 driverUpdate.Show();
                 driverUpdate.Focus();
             }
             else
             {
                 MessageBox.Show("Select row");
             }
         }
         else
         {
             driverUpdate.Show();
             driverUpdate.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #2
0
        public void bindUpdateDriverForm(DataRowView DriverRow, Drivers drivers)
        {
            Driver_Update objForm = new Driver_Update(DriverRow, 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();
        }