コード例 #1
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     errorProvider1.Clear();
     if (addUpdate == "add")
     {
         if (FillClass() == true)
         {
             curentFixTable.AddToAccess(curentFix);
             MessageBox.Show("תיקון התווסף בהצלחה");
             Car curentCar = new Car(curentFix.CarNumber);
             curentCar.Fix = false;
             CarTable curentTable = new CarTable();
             curentTable.UpdateToAccess(curentCar);
             lblSearch.Visible = false;
             txtSearch.Visible = false;
             btnSearsh.Visible = false;
         }
     }
     if (addUpdate == "update")
     {
         try
         {
             curentFix = new Fixs(Convert.ToInt32(txtSearch.Text));
             if (FillClass() == true)
             {
                 curentFixTable.AddToAccess(curentFix);
                 MessageBox.Show("תיקון התעדכן בהצלחה");
             }
         }
         catch
         {
             MessageBox.Show("לא נמצאו תיקונים מתאימים");
         }
     }
 }
コード例 #2
0
 private void btnSearsh_Click(object sender, EventArgs e)
 {
     try
     {
         curentFix = new Fixs(Convert.ToInt32(txtSearch.Text));
         FillTXT();
     }
     catch
     {
         MessageBox.Show("לא נמצאו תיקונים מתאימים");
     }
 }
コード例 #3
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     try
     {
         curentFix = new Fixs(Convert.ToInt32(txtSearch.Text));
         if (FillClass() == true)
         {
             curentFixTable.UpdateToAccess(curentFix);
             MessageBox.Show("תיקון התעדכן בהצלחה");
             Car curentCar = new Car(curentFix.CarNumber);
             curentCar.Fix = true;
             CarTable curentTable = new CarTable();
             curentTable.UpdateToAccess(curentCar);
         }
     }
     catch
     {
         MessageBox.Show("לא נמצאו תיקונים מתאימים");
     }
 }