예제 #1
0
        //spare part
        public void bindRecordSparePartForm(SparePart sparepart)
        {
            SparePartRecord objForm = new SparePartRecord(sparepart, 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();
        }
예제 #2
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         if (sparePartRecord == null)
         {
             sparePartRecord = new SparePartRecord(this);
             sparePartRecord.Show();
             sparePartRecord.Focus();
         }
         else
         {
             sparePartRecord.Show();
             sparePartRecord.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }